Bug 263166

Summary: [GStreamer] Make downloadbuffer limits configurable
Product: WebKit Reporter: Marek Vasut <marex+webkit>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: philn, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Other   
OS: Linux   

Description Marek Vasut 2023-10-14 19:19:34 PDT
Introduce two new environment variables which control the maximum amount of buffered data by the downloadbuffer element. This is useful in case it is necessary to control buffering large files, way larger than the default downloadbuffer limits. The following new variables are added:
    
- WPE_SHELL_MEDIA_DISK_CACHE_SIZE_BYTES ~ downloadbuffer max-size-bytes
- WPE_SHELL_MEDIA_DISK_CACHE_SIZE_NSEC ~ downloadbuffer max-size-time
    
Example HTML file, note esp. the 'preload="auto"' which is mandatory:
```
<video src="./file.mp4" autoplay muted loop preload="auto"></video>
```
    
Example invocation to cache up to 200 MiB per file and 500s per file:
```
$ WPE_SHELL_MEDIA_DISK_CACHE_SIZE_BYTES=268435456 \
  WPE_SHELL_MEDIA_DISK_CACHE_SIZE_NSEC=500000000000 \
  WEBKIT_GST_USE_PLAYBIN3=1 \
  cog http://example/index.html
```
Comment 1 Marek Vasut 2023-10-14 19:39:29 PDT
Pull Request: https://github.com/WebKit/WebKit/pull/19090
Comment 2 EWS 2023-10-15 13:08:12 PDT
Committed 269348@main (d2b242779d24): <https://commits.webkit.org/269348@main>

Reviewed commits have been landed. Closing PR #19090 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-10-15 13:09:14 PDT
<rdar://problem/116987459>