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
@ -8,8 +8,9 @@ static GMainLoop *loop;
|
|||||||
static GstElement *pipe1, *webrtc1, *webrtc2, *extra_src;
|
static GstElement *pipe1, *webrtc1, *webrtc2, *extra_src;
|
||||||
static GstBus *bus1;
|
static GstBus *bus1;
|
||||||
|
|
||||||
#define SEND_SRC(pattern) "videotestsrc is-live=true pattern=" pattern " ! timeoverlay ! queue ! vp8enc ! rtpvp8pay ! queue ! " \
|
#define SEND_SRC(pattern, pt) "videotestsrc is-live=true pattern=" pattern \
|
||||||
"capsfilter caps=application/x-rtp,media=video,payload=96,encoding-name=VP8"
|
" ! timeoverlay ! queue ! vp8enc ! rtpvp8pay ! queue ! capsfilter " \
|
||||||
|
" caps=application/x-rtp,media=video,payload=" pt ",encoding-name=VP8"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_element_message (GstElement * parent, GstMessage * msg)
|
_element_message (GstElement * parent, GstMessage * msg)
|
||||||
@ -199,8 +200,8 @@ stream_change (gpointer data)
|
|||||||
{
|
{
|
||||||
if (!extra_src) {
|
if (!extra_src) {
|
||||||
g_print ("Adding extra stream\n");
|
g_print ("Adding extra stream\n");
|
||||||
extra_src =
|
extra_src = gst_parse_bin_from_description (SEND_SRC ("circular", "97"),
|
||||||
gst_parse_bin_from_description (SEND_SRC ("circular"), TRUE, NULL);
|
TRUE, NULL);
|
||||||
|
|
||||||
gst_element_set_locked_state (extra_src, TRUE);
|
gst_element_set_locked_state (extra_src, TRUE);
|
||||||
gst_bin_add (GST_BIN (pipe1), extra_src);
|
gst_bin_add (GST_BIN (pipe1), extra_src);
|
||||||
@ -249,8 +250,9 @@ main (int argc, char *argv[])
|
|||||||
gst_init (&argc, &argv);
|
gst_init (&argc, &argv);
|
||||||
|
|
||||||
loop = g_main_loop_new (NULL, FALSE);
|
loop = g_main_loop_new (NULL, FALSE);
|
||||||
pipe1 = gst_parse_launch (SEND_SRC ("smpte")
|
pipe1 = gst_parse_launch (SEND_SRC ("smpte", "96")
|
||||||
" ! webrtcbin name=smpte bundle-policy=max-bundle " SEND_SRC ("ball")
|
" ! webrtcbin name=smpte bundle-policy=max-bundle "
|
||||||
|
SEND_SRC ("ball", "96")
|
||||||
" ! webrtcbin name=ball bundle-policy=max-bundle", NULL);
|
" ! webrtcbin name=ball bundle-policy=max-bundle", NULL);
|
||||||
g_object_set (pipe1, "message-forward", TRUE, NULL);
|
g_object_set (pipe1, "message-forward", TRUE, NULL);
|
||||||
bus1 = gst_pipeline_get_bus (GST_PIPELINE (pipe1));
|
bus1 = gst_pipeline_get_bus (GST_PIPELINE (pipe1));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user