mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 16:08:51 +00:00
baseparse: Push STREAM_START in pull-mode
This commit is contained in:
parent
634cb80c8e
commit
042d1ff398
1 changed files with 13 additions and 0 deletions
|
@ -337,6 +337,9 @@ struct _GstBaseParsePrivate
|
||||||
gboolean detecting;
|
gboolean detecting;
|
||||||
GList *detect_buffers;
|
GList *detect_buffers;
|
||||||
guint detect_buffers_size;
|
guint detect_buffers_size;
|
||||||
|
|
||||||
|
/* if TRUE, a STREAM_START event needs to be pushed */
|
||||||
|
gboolean push_stream_start;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _GstBaseParseSeek
|
typedef struct _GstBaseParseSeek
|
||||||
|
@ -2846,6 +2849,14 @@ gst_base_parse_loop (GstPad * pad)
|
||||||
parse = GST_BASE_PARSE (gst_pad_get_parent (pad));
|
parse = GST_BASE_PARSE (gst_pad_get_parent (pad));
|
||||||
klass = GST_BASE_PARSE_GET_CLASS (parse);
|
klass = GST_BASE_PARSE_GET_CLASS (parse);
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (parse, "hello");
|
||||||
|
|
||||||
|
if (G_UNLIKELY (parse->priv->push_stream_start)) {
|
||||||
|
GST_DEBUG_OBJECT (parse, "Pushing STREAM_START");
|
||||||
|
gst_pad_push_event (parse->srcpad, gst_event_new_stream_start ());
|
||||||
|
parse->priv->push_stream_start = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* reverse playback:
|
/* reverse playback:
|
||||||
* first fragment (closest to stop time) is handled normally below,
|
* first fragment (closest to stop time) is handled normally below,
|
||||||
* then we pull in fragments going backwards */
|
* then we pull in fragments going backwards */
|
||||||
|
@ -2975,6 +2986,8 @@ gst_base_parse_sink_activate (GstPad * sinkpad, GstObject * parent)
|
||||||
if (!gst_pad_activate_mode (sinkpad, GST_PAD_MODE_PULL, TRUE))
|
if (!gst_pad_activate_mode (sinkpad, GST_PAD_MODE_PULL, TRUE))
|
||||||
goto baseparse_push;
|
goto baseparse_push;
|
||||||
|
|
||||||
|
parse->priv->push_stream_start = TRUE;
|
||||||
|
|
||||||
return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_base_parse_loop,
|
return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_base_parse_loop,
|
||||||
sinkpad, NULL);
|
sinkpad, NULL);
|
||||||
/* fallback */
|
/* fallback */
|
||||||
|
|
Loading…
Reference in a new issue