Commit 8f039997 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

playbin2: disable streamsynchronizer magic for this release

Some things aren't quite right yet and cause problems (0-sized buffers
with PREROLL flag set cause crashes in elements that don't expect those;
getting pipeline back to preroll/playing again when audio/video streams
have different lengths and a seek past the end of one of the stream
happens doesn't always work, etc.). Needs further investigation in the
next cycle.

https://bugzilla.gnome.org/show_bug.cgi?id=633700
https://bugzilla.gnome.org/show_bug.cgi?id=634699
parent 5cb8b39c
......@@ -52,6 +52,8 @@ static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink_%d",
GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY);
static const gboolean passthrough = TRUE;
GST_BOILERPLATE (GstStreamSynchronizer, gst_stream_synchronizer,
GstElement, GST_TYPE_ELEMENT);
......@@ -190,6 +192,9 @@ gst_stream_synchronizer_src_event (GstPad * pad, GstEvent * event)
GstPad *opad;
gboolean ret = FALSE;
if (passthrough)
goto skip_adjustments;
GST_LOG_OBJECT (pad, "Handling event %s: %" GST_PTR_FORMAT,
GST_EVENT_TYPE_NAME (event), event->structure);
......@@ -242,6 +247,8 @@ gst_stream_synchronizer_src_event (GstPad * pad, GstEvent * event)
break;
}
skip_adjustments:
opad = gst_stream_get_other_pad_from_pad (pad);
if (opad) {
ret = gst_pad_push_event (opad, event);
......@@ -263,6 +270,9 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstEvent * event)
GstPad *opad;
gboolean ret = FALSE;
if (passthrough)
goto skip_adjustments;
GST_LOG_OBJECT (pad, "Handling event %s: %" GST_PTR_FORMAT,
GST_EVENT_TYPE_NAME (event), event->structure);
......@@ -521,6 +531,8 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstEvent * event)
break;
}
skip_adjustments:
opad = gst_stream_get_other_pad_from_pad (pad);
if (opad) {
ret = gst_pad_push_event (opad, event);
......@@ -564,6 +576,15 @@ gst_stream_synchronizer_sink_chain (GstPad * pad, GstBuffer * buffer)
GstClockTime timestamp = GST_CLOCK_TIME_NONE;
GstClockTime timestamp_end = GST_CLOCK_TIME_NONE;
if (passthrough) {
opad = gst_stream_get_other_pad_from_pad (pad);
if (opad) {
ret = gst_pad_push (opad, buffer);
gst_object_unref (opad);
}
goto done;
}
GST_LOG_OBJECT (pad, "Handling buffer %p: size=%u, timestamp=%"
GST_TIME_FORMAT " duration=%" GST_TIME_FORMAT
" offset=%" G_GUINT64_FORMAT " offset_end=%" G_GUINT64_FORMAT,
......@@ -661,6 +682,8 @@ gst_stream_synchronizer_sink_chain (GstPad * pad, GstBuffer * buffer)
GST_STREAM_SYNCHRONIZER_UNLOCK (self);
}
done:
gst_object_unref (self);
return ret;
......
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