| Summary: | [MSE][WPE] Parameterize maximum buffer size using the MSE_MAX_BUFFER_SIZE env var | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Enrique Ocaña <eocanha> | ||||||||
| Component: | Media | Assignee: | Enrique Ocaña <eocanha> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | calvaris, cdumez, cgarcia, changseok, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gustavo, gyuyoung.kim, jer.noble, menard, philipj, pnormand, sergio, vjaquez, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Enrique Ocaña
2021-11-25 06:51:32 PST
Created attachment 445206 [details]
Patch
Comment on attachment 445206 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=445206&action=review I think we should move this logic to a virtual method, maybe in SourceBufferPrivate. > Source/WebCore/html/MediaElementSession.cpp:946 > + String s(getenv("MSE_MAX_BUFFER_SIZE")); std:: Created attachment 445411 [details]
Patch
I discussed with Alicia the best place to have the logic and we realized that MediaSessionManagerGLib might also be a good place for the platform logic. SourceBuffer asks HTMLMediaElement, which asks MediaElementSession, a subclass of PlatformMediaSession, which can talk to PlatformMediaSessionManager, which is subclassed by MediaSessionManagerGLib. However, all this Session stuff is related to attributes that can change and be set at runtime, while this platformMaximumBufferSize() is something more static, related to the platform. That's why I still think that SourceBufferPrivate should be its proper place to be. Comment on attachment 445411 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=445411&action=review > Source/WebCore/ChangeLog:24 > + * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp: Read the MSE_MAX_BUFFER_SIZE environment variable and compute the maximum buffer size if the size is specified in the variable for all the track types present in the SourceBufferPrivate. Otherwise, use the default size. This line is too long. > Source/WebCore/platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:285 > +static void maximumBufferSizeDefaults(size_t& maxBufferSizeVideo, size_t& maxBufferSizeAudio, size_t& maxBufferSizeText) If this function is going to operate on statics, I don't think you need the parameters, just use the statics. Besides, I think considering this function is only called inside de std::once call, you could just inline the code there. You would even save a #ifdef. Created attachment 445543 [details]
Patch
Committed r286358 (244717@main): <https://commits.webkit.org/244717@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 445543 [details]. |