mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
webrtcrenego: Use payload type correctly for the dynamic stream
All streams were using pt=96 which is incorrect. In some cases that can cause EOS to be sent to both branches of the receiver. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
This commit is contained in:
parent
76b5178260
commit
b0dbc09ea2
1 changed files with 8 additions and 6 deletions
|
@ -8,8 +8,9 @@ static GMainLoop *loop;
|
|||
static GstElement *pipe1, *webrtc1, *webrtc2, *extra_src;
|
||||
static GstBus *bus1;
|
||||
|
||||
#define SEND_SRC(pattern) "videotestsrc is-live=true pattern=" pattern " ! timeoverlay ! queue ! vp8enc ! rtpvp8pay ! queue ! " \
|
||||
"capsfilter caps=application/x-rtp,media=video,payload=96,encoding-name=VP8"
|
||||
#define SEND_SRC(pattern, pt) "videotestsrc is-live=true pattern=" pattern \
|
||||
" ! timeoverlay ! queue ! vp8enc ! rtpvp8pay ! queue ! capsfilter " \
|
||||
" caps=application/x-rtp,media=video,payload=" pt ",encoding-name=VP8"
|
||||
|
||||
static void
|
||||
_element_message (GstElement * parent, GstMessage * msg)
|
||||
|
@ -199,8 +200,8 @@ stream_change (gpointer data)
|
|||
{
|
||||
if (!extra_src) {
|
||||
g_print ("Adding extra stream\n");
|
||||
extra_src =
|
||||
gst_parse_bin_from_description (SEND_SRC ("circular"), TRUE, NULL);
|
||||
extra_src = gst_parse_bin_from_description (SEND_SRC ("circular", "97"),
|
||||
TRUE, NULL);
|
||||
|
||||
gst_element_set_locked_state (extra_src, TRUE);
|
||||
gst_bin_add (GST_BIN (pipe1), extra_src);
|
||||
|
@ -249,8 +250,9 @@ main (int argc, char *argv[])
|
|||
gst_init (&argc, &argv);
|
||||
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
pipe1 = gst_parse_launch (SEND_SRC ("smpte")
|
||||
" ! webrtcbin name=smpte bundle-policy=max-bundle " SEND_SRC ("ball")
|
||||
pipe1 = gst_parse_launch (SEND_SRC ("smpte", "96")
|
||||
" ! webrtcbin name=smpte bundle-policy=max-bundle "
|
||||
SEND_SRC ("ball", "96")
|
||||
" ! webrtcbin name=ball bundle-policy=max-bundle", NULL);
|
||||
g_object_set (pipe1, "message-forward", TRUE, NULL);
|
||||
bus1 = gst_pipeline_get_bus (GST_PIPELINE (pipe1));
|
||||
|
|
Loading…
Reference in a new issue