Commit 6363216e authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

base: Use new group-id field in stream-start event and message

parent 7c936a4c
......@@ -3019,13 +3019,17 @@ gst_base_parse_loop (GstPad * pad)
if (G_UNLIKELY (parse->priv->push_stream_start)) {
gchar *stream_id;
GstEvent *event;
stream_id =
gst_pad_create_stream_id (parse->srcpad, GST_ELEMENT_CAST (parse),
NULL);
event = gst_event_new_stream_start (stream_id);
gst_event_set_group_id (event, gst_util_group_id_next ());
GST_DEBUG_OBJECT (parse, "Pushing STREAM_START");
gst_pad_push_event (parse->srcpad, gst_event_new_stream_start (stream_id));
gst_pad_push_event (parse->srcpad, event);
parse->priv->push_stream_start = FALSE;
g_free (stream_id);
}
......
......@@ -3008,11 +3008,14 @@ gst_base_sink_default_event (GstBaseSink * basesink, GstEvent * event)
{
GstMessage *message;
guint32 seqnum;
guint group_id;
seqnum = gst_event_get_seqnum (event);
GST_DEBUG_OBJECT (basesink, "Now posting STREAM_START (seqnum:%d)",
seqnum);
message = gst_message_new_stream_start (GST_OBJECT_CAST (basesink));
if (gst_event_parse_group_id (event, &group_id))
gst_message_set_group_id (message, group_id);
gst_message_set_seqnum (message, seqnum);
gst_element_post_message (GST_ELEMENT_CAST (basesink), message);
break;
......
......@@ -840,14 +840,16 @@ gst_base_src_send_stream_start (GstBaseSrc * src)
if (src->priv->stream_start_pending) {
gchar *stream_id;
GstEvent *event;
stream_id =
gst_pad_create_stream_id (src->srcpad, GST_ELEMENT_CAST (src), NULL);
GST_DEBUG_OBJECT (src, "Pushing STREAM_START");
ret =
gst_pad_push_event (src->srcpad,
gst_event_new_stream_start (stream_id));
event = gst_event_new_stream_start (stream_id);
gst_event_set_group_id (event, gst_util_group_id_next ());
ret = gst_pad_push_event (src->srcpad, event);
src->priv->stream_start_pending = FALSE;
g_free (stream_id);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment