[webkit-gtk] webRTC discussion.

Danilo Cesar danilo.eu at gmail.com
Tue Jun 19 10:33:38 PDT 2012


Hi guys,

In our work to push the WebRTC implementation using Farstream we
decided that we should use another MediaPlayer (which consist on
adding a new MediaPlayerPrivateInterface class and register as
MediaEngine).

But we're having issues on how to identify if we should use this
player or the gstreamer one, since the
MediaPlayerPrivateInterface::supportsType(type,codec) doesn't have
access to the media's url (which is a blob, in the case of the
webrtc).

As a work around, we've implemented a new method on the
MediaPlayerPrivateInterface supportsProtocol(url) (you can see on the
diff [1]), which responds MediaPlayer::IsSupported if the URL is a
blob (blob://BLOBHASH) generated by the MediaStream, then a new method
to select it
(bestMediaEngineForProtocolTypeAndCodec).
I would like to discuss that with you, if it's the best way of doing that.

I've also played with an alternative, like adding a new parameter
(url) to the MPPI::supportsType(url, type, codec) method, than the URL
could be used and we stay with the bestMediaEngineForTypeAndProtocol
untouched.
However it's a change that affects all ports media players.

As an option I could add this method on  a "#if ENABLE(MEDIA_STREAM)"
block, so it could be used only by the players using it and keep
others untouched. It could be a good solution, however
"ENABLE(ENCRYPTED_MEDIA)" is doing the same trick, so we would end up
with a MEDIA_STRAM OR ENCRYPTED_MEDIA build, both wouldn't work
together (not without adding #if ENABLE(MEDIA_STREAM) &&
ENABLE(ENCRYPTED_MEDIA), which is not elegant ).

What do you guys think about it?

Should I try to keep the first or the second option? Or is there even
a better way to recognize the blob on a MediaPlayerPrivateInterface?

Thanks,
Danilo Cesar

[1] http://pastebin.com/GSkQpQyy

-- 
Danilo Cesar Lemes de Paula
http://www.danilocesar.com


More information about the webkit-gtk mailing list