Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement can_play_type for ServoMedia #232
Conversation
|
I would like rather to have a fixed list of mime-types that are possible to play in the web and check if the current gstreamer setup has support for them. Thus the backend won't traverse the whole gstreamer's registry per-call but rather a hash map to look up, just as in The return of the function perhaps should be an enum with Probably and Maybe |
|
Thanks for the PR, @georgeroman I agree with @ceyusa, we should keep a list of mime-types that are supported on the web (we can get it from the WebKit's implementation that @ceyusa shared), lazily intersect that list with what's available in the GStreamer registry and cache the result of that intersection so subsequent calls to this function do not require traversing the entire registry again. |
|
Please not the WebKit code linked here is obsolete, I implemented a new GstreamerRegistryScanner for media-capabilities support, it's used for canPlayType and the media-capabilities spec platform support. |
|
I added some of the requested changes. I would really appreciate some feedback to see whether I'm heading in the right direction with this! |
|
Thanks! |
|
Nice! Just a couple of small changes more and this should be ready to merge. Thanks! |
|
Looks great! Thanks @georgeroman @bors-servo r+ |
|
|
Implement can_play_type for ServoMedia This is related to servo/servo#22299. I tried to follow WebKit's [implementation](https://github.com/WebKit/webkit/blob/ae5a8bdded113530fe844e01ad9c0e72ce85dbe2/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp#L304) of a similar function, as suggested by @ferjm in the issue's comments.
|
|
georgeroman commentedApr 2, 2019
This is related to servo/servo#22299. I tried to follow WebKit's implementation of a similar function, as suggested by @ferjm in the issue's comments.