From 1588cda9a1e86614e1761d2fd16726d89c1c0d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 8 May 2013 16:02:05 +0200 Subject: [PATCH] videomixer2: Send stream-start before caps event https://bugzilla.gnome.org/show_bug.cgi?id=699895 --- gst/videomixer/videomixer2.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gst/videomixer/videomixer2.c b/gst/videomixer/videomixer2.c index 31f232b45d..09a8218f87 100644 --- a/gst/videomixer/videomixer2.c +++ b/gst/videomixer/videomixer2.c @@ -1608,6 +1608,17 @@ gst_videomixer2_src_setcaps (GstPad * pad, GstVideoMixer2 * mix, GstCaps * caps) } GST_VIDEO_MIXER2_UNLOCK (mix); + if (mix->send_stream_start) { + gchar s_id[32]; + + /* stream-start (FIXME: create id based on input ids) */ + g_snprintf (s_id, sizeof (s_id), "mix-%08x", g_random_int ()); + if (!gst_pad_push_event (mix->srcpad, gst_event_new_stream_start (s_id))) { + GST_WARNING_OBJECT (mix->srcpad, "Sending stream start event failed"); + } + mix->send_stream_start = FALSE; + } + ret = gst_pad_set_caps (pad, caps); done: