Sending video streams with different capabilities using webrtcbin

Serhan Gül serhan at fastmail.com
Thu Jun 10 10:34:11 UTC 2021


Hi,

I have a pipeline that generates two test patterns using videotestsrc and sends them to two osxvideosink elements reciprocally:

webrtcbin name=webrtcbin1 videotestsrc name=source1 ! video/x-raw,width=1280,height=720 ! queue ! x264enc name=video ! rtph264pay ! queue ! application/x-rtp,media=video,payload=96,encoding-name=H264 ! webrtcbin1. webrtcbin name=webrtcbin2 videotestsrc name=source2 pattern=ball ! video/x-raw,width=1280,height=720 ! queue ! x264enc ! rtph264pay ! queue ! application/x-rtp,media=video,payload=96,encoding-name=H264 ! webrtcbin2.

I connected the "pad-added" signal to both webrtcbin and linked to the corresponding depayloader and decoder elements in the callback. Then osxvideosink renders the video. The callback contains this code:

out = gst_parse_bin_from_description(
      "rtph264depay ! avdec_h264 ! "
      "videoconvert ! queue ! osxvideosink",
      TRUE, NULL );
gst_bin_add( GST_BIN( pipe ), out );
gst_element_sync_state_with_parent( out );
sink = (GstPad*)out->sinkpads->data; 
gst_pad_link( new_pad, sink );

This works well if I have the same capabilities for the both videotestsrc elements e.g. video/x-raw,width=1280,height=720 as above. However, if change for instance the video resolution and set one of the caps to something like video/x-raw,width=640,height=360, I get an "Internal data stream error" from gst_parse_launch. Why does this error occur, is it related to the media negotiation for WebRTC or perhaps something about osxvideosink?  Is there a way to send video streams using different capabilities? 

Thanks,
Serhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210610/d7c27ae1/attachment.htm>


More information about the gstreamer-devel mailing list