Unified plan support in webrtcbin

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unified plan support in webrtcbin

Faraz Khan
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 list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Unified plan support in webrtcbin

Matthew Waters
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 list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

OpenPGP_0xC142754D316B47CB.asc (2K) Download Attachment
OpenPGP_signature (505 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Unified plan support in webrtcbin

Faraz Khan
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 <[hidden email]> 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 list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel