Bug 233492 - [GStreamer][WPE] Control on-disk multimedia buffering via the WPE_SHELL_DISABLE_MEDIA_DISK_CACHE environment variable
Summary: [GStreamer][WPE] Control on-disk multimedia buffering via the WPE_SHELL_DISAB...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Enrique Ocaña
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-25 05:03 PST by Enrique Ocaña
Modified: 2021-11-29 06:33 PST (History)
13 users (show)

See Also:


Attachments
Patch (2.75 KB, patch)
2021-11-25 06:02 PST, Enrique Ocaña
no flags Details | Formatted Diff | Diff
Patch (2.73 KB, patch)
2021-11-26 12:00 PST, Enrique Ocaña
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrique Ocaña 2021-11-25 05:03:24 PST
Embedded platforms often don't have a persistent storage suitable for repetitive writes (eg: caching media files may wear out a flash drive, and RAM memory is scarce enough to use a tmpfs for caching).

Those platforms need a way to disable on-disk caching. Metrological has been successfully using an environment variable for that purpose downstream since 2016. If that implementation is upstreamed, other WPE users can benefit from it.
Comment 1 Enrique Ocaña 2021-11-25 06:02:01 PST
Created attachment 445136 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2021-11-26 03:27:41 PST
Comment on attachment 445136 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=445136&action=review

> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:2565
> +    static bool computed = false;

Please, use std::once...
Comment 3 Enrique Ocaña 2021-11-26 12:00:25 PST
Comment on attachment 445136 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=445136&action=review

>> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:2565
>> +    static bool computed = false;
> 
> Please, use std::once...

I've ended up using std::once_flag and std::call_once. They're very useful and I didn't know about them. Thanks!
Comment 4 Enrique Ocaña 2021-11-26 12:00:56 PST
Created attachment 445207 [details]
Patch
Comment 5 EWS 2021-11-29 06:32:30 PST
Committed r286210 (244592@main): <https://commits.webkit.org/244592@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 445207 [details].
Comment 6 Radar WebKit Bug Importer 2021-11-29 06:33:27 PST
<rdar://problem/85814319>