GST_DEBUG_OBJECT (parse, "hello");
if (G_UNLIKELY (parse->priv->push_stream_start)) {
+ gchar *stream_id;
+
+ stream_id =
+ gst_pad_create_stream_id (parse->srcpad, GST_ELEMENT_CAST (parse),
+ NULL);
+
GST_DEBUG_OBJECT (parse, "Pushing STREAM_START");
- gst_pad_push_event (parse->srcpad, gst_event_new_stream_start ());
+ gst_pad_push_event (parse->srcpad, gst_event_new_stream_start (stream_id));
parse->priv->push_stream_start = FALSE;
+ g_free (stream_id);
}
/* reverse playback:
gboolean ret = TRUE;
if (src->priv->stream_start_pending) {
- ret = gst_pad_push_event (src->srcpad, gst_event_new_stream_start ());
+ gchar *stream_id;
+
+ 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));
src->priv->stream_start_pending = FALSE;
+ g_free (stream_id);
}
return ret;
GstPadMode mode, gboolean active)
{
gboolean res;
+ GstBaseSrc *src = GST_BASE_SRC (parent);
+
+ src->priv->stream_start_pending = FALSE;
switch (mode) {
case GST_PAD_MODE_PULL:
res = gst_base_src_activate_pull (pad, parent, active);
break;
case GST_PAD_MODE_PUSH:
+ src->priv->stream_start_pending = active;
res = gst_base_src_activate_push (pad, parent, active);
break;
default:
case GST_STATE_CHANGE_NULL_TO_READY:
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
- basesrc->priv->stream_start_pending = TRUE;
no_preroll = gst_base_src_is_live (basesrc);
break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
* already did this */
g_atomic_int_set (&basesrc->priv->pending_eos, FALSE);
gst_event_replace (&basesrc->pending_seek, NULL);
- basesrc->priv->stream_start_pending = FALSE;
break;
}
case GST_STATE_CHANGE_READY_TO_NULL:
UNDERRUN_WAIT ();
UNDERRUN_UNLOCK ();
- gst_pad_push_event (mysrcpad, gst_event_new_stream_start ());
+ gst_pad_push_event (mysrcpad, gst_event_new_stream_start ("test"));
fail_unless (underrun_count == 1);
fail_unless (overrun_count == 0);
UNDERRUN_WAIT ();
UNDERRUN_UNLOCK ();
- gst_pad_push_event (mysrcpad, gst_event_new_stream_start ());
+ gst_pad_push_event (mysrcpad, gst_event_new_stream_start ("test"));
fail_unless (overrun_count == 0);
fail_unless (underrun_count == 1);
UNDERRUN_WAIT ();
UNDERRUN_UNLOCK ();
- gst_pad_push_event (mysrcpad, gst_event_new_stream_start ());
+ gst_pad_push_event (mysrcpad, gst_event_new_stream_start ("test"));
fail_unless (overrun_count == 0);
fail_unless (underrun_count == 1);
UNDERRUN_WAIT ();
UNDERRUN_UNLOCK ();
- gst_pad_push_event (mysrcpad, gst_event_new_stream_start ());
+ gst_pad_push_event (mysrcpad, gst_event_new_stream_start ("test"));
/* push buffer without duration */
buffer = gst_buffer_new_and_alloc (4);
UNDERRUN_WAIT ();
UNDERRUN_UNLOCK ();
- gst_pad_push_event (mysrcpad, gst_event_new_stream_start ());
+ gst_pad_push_event (mysrcpad, gst_event_new_stream_start ("test"));
gst_segment_init (&segment, GST_FORMAT_TIME);
segment.start = 1 * GST_SECOND;
push_one_stream_start (GstPad * pad)
{
GST_DEBUG_OBJECT (pad, "Pushing STREAM_START event");
- gst_pad_push_event (pad, gst_event_new_stream_start ());
+ gst_pad_push_event (pad, gst_event_new_stream_start ("test"));
return NULL;
}
gst_pad_set_active (srcpad, TRUE);
/* push an event, it should be sticky on the srcpad */
- gst_pad_push_event (srcpad, gst_event_new_stream_start ());
+ gst_pad_push_event (srcpad, gst_event_new_stream_start ("test"));
/* make a caps event */
caps = gst_caps_new_empty_simple ("foo/bar");