Unified plan support in webrtcbin

Faraz Khan farazrkhan at gmail.com
Mon Oct 19 17:34:47 UTC 2020


Matthew,
It actually is correct and works fine in chrome. The issue is that there is
little documentation on the JS side as well as to how to handle it. In the
RTCPeerConnection.onTrack event handler you have to create a new
mediastream using the 'track' like this (not the stream):

let track = new MediaStream([event.track]);
window.document.getElementById('rearCam').srcObject = track;

All previous documentation points to plan-b semantics in which onTrack
would fire for every separate stream added so the following would only play
the first 'track' in the stream, even though stream has 2 tracks according
to the unified plan:

window.document.getElementById('rearCam').srcObject = event.streams[0];

So surprised there's no documentation on this - or I wonder if I'm
doing something wrong :)

Now trying to figure out why adding fec to the transceiver causes the
second track to stop decoding on the chrome side :)


On Sun, Oct 18, 2020 at 9:31 PM Matthew Waters <ystreet00 at gmail.com> wrote:

> Unified plan SDP's are mostly supported where the interface makes sense.
>
> a=msid is currently a browser-specific thing and GStreamer doesn't really
> have a concept of grouping separate tracks per-se.  Maybe GstStream could
> be useful here for that but that would need to be investigated and
> implemented.
>
> Unfortunately I'm not quite sure exactly how the browsers expect multiple
> streams of the same type to work SDP-wise.
>
> Cheers
> -Matt
>
> On 17/10/20 1:35 pm, Faraz Khan wrote:
>
> Is unified plan sdp semantics supported? I'm trying to negotiate a peer
> connection with 5 streams and though the sdp seems mostly correct it's
> missing a=msid lines (which I could add myself maybe)
>
> If I try to receive this in chrome the peer connection.ontrack method gets
> fired the correct number of times (as many video streams I add) but they
> are all pointing to the first stream.
>
> Is there some way I can munge the sdp manually to make this work?
>
> Thanks!
>
>
> _______________________________________________
> gstreamer-devel mailing listgstreamer-devel at lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20201019/66653d00/attachment-0001.htm>


More information about the gstreamer-devel mailing list