mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:56:14 +00:00
videomixer: send stream-start event.
This commit is contained in:
parent
305023fe9d
commit
6b153ce385
2 changed files with 14 additions and 0 deletions
|
@ -962,6 +962,17 @@ gst_videomixer2_collected (GstCollectPads * pads, GstVideoMixer2 * mix)
|
||||||
gst_pad_push_event (mix->srcpad, gst_event_new_flush_stop (TRUE));
|
gst_pad_push_event (mix->srcpad, gst_event_new_flush_stop (TRUE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
GST_VIDEO_MIXER2_LOCK (mix);
|
GST_VIDEO_MIXER2_LOCK (mix);
|
||||||
|
|
||||||
if (mix->newseg_pending) {
|
if (mix->newseg_pending) {
|
||||||
|
@ -1756,6 +1767,7 @@ gst_videomixer2_change_state (GstElement * element, GstStateChange transition)
|
||||||
|
|
||||||
switch (transition) {
|
switch (transition) {
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
|
mix->send_stream_start = TRUE;
|
||||||
GST_LOG_OBJECT (mix, "starting collectpads");
|
GST_LOG_OBJECT (mix, "starting collectpads");
|
||||||
gst_collect_pads_start (mix->collect);
|
gst_collect_pads_start (mix->collect);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -110,6 +110,8 @@ struct _GstVideoMixer2
|
||||||
BlendFunction blend, overlay;
|
BlendFunction blend, overlay;
|
||||||
FillCheckerFunction fill_checker;
|
FillCheckerFunction fill_checker;
|
||||||
FillColorFunction fill_color;
|
FillColorFunction fill_color;
|
||||||
|
|
||||||
|
gboolean send_stream_start;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstVideoMixer2Class
|
struct _GstVideoMixer2Class
|
||||||
|
|
Loading…
Reference in a new issue