Implement can_play_type for ServoMedia #232
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.
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.