summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
diff options
context:
space:
mode:
authorYannick Gicquel <yannick.gicquel@iot.bzh>2016-11-10 14:55:11 +0100
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2016-11-14 08:39:06 +0000
commit0c615e0a7d176c53981b3526528c7a61169b5cf1 (patch)
tree6553376633ca1057d122103e2921e5410855de23 /meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
parent3fc6095e75879cb66ca21d1c51140822f0f36ea5 (diff)
meta-agl-bsp: backport: gstreamer1.0 v1.4.5 recipes
This is a backport from Jethro as meta-rcar-gen3 append on following: - gstreamer1.0-libav_1.4.5 - gstreamer1.0-omx_1.2.0 - gstreamer1.0-plugins-bad_1.4.5 - gstreamer1.0-plugins-good_1.4.5 v2 (jsmoeller): Move into meta-rcar-gen3 subfolder as it only affects that layer. Change-Id: Iefc9a2c10e76c172f1cb1f8d3babf3544828310e Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh> Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch')
-rw-r--r--meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch b/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
new file mode 100644
index 000000000..7813915d8
--- /dev/null
+++ b/meta-agl-bsp/meta-rcar-gen3/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
@@ -0,0 +1,69 @@
+From ed09c8fd2c9c2b5384b72cc70af3728be6694e64 Mon Sep 17 00:00:00 2001
+From: Mingke Wang <mingke.wang@freescale.com>
+Date: Thu, 19 Mar 2015 14:20:26 +0800
+Subject: [PATCH 4/4] subparse: set need_segment after sink pad received
+ GST_EVENT_SEGMENT
+
+subparse works in push mode, chain funciton will be called once
+up stream element finished the seeking and flushing.
+if set need_segment flag in src pad event handler, the segment
+event will be pushed earlier, result in the subtitle text will
+be send out to down stream from the beginning.
+
+Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747498]
+
+Signed-off-by: Mingke Wang <mingke.wang@freescale.com>
+
+diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c
+old mode 100644
+new mode 100755
+index b565e93..7741ccc
+--- a/gst/subparse/gstsubparse.c
++++ b/gst/subparse/gstsubparse.c
+@@ -266,22 +266,20 @@ gst_sub_parse_src_event (GstPad * pad, GstObject * parent, GstEvent * event)
+ goto beach;
+ }
+
++ /* Apply the seek to our segment */
++ gst_segment_do_seek (&self->segment, rate, format, flags,
++ start_type, start, stop_type, stop, &update);
++
++ GST_DEBUG_OBJECT (self, "segment after seek: %" GST_SEGMENT_FORMAT,
++ &self->segment);
++
+ /* Convert that seek to a seeking in bytes at position 0,
+ FIXME: could use an index */
+ ret = gst_pad_push_event (self->sinkpad,
+ gst_event_new_seek (rate, GST_FORMAT_BYTES, flags,
+ GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, 0));
+
+- if (ret) {
+- /* Apply the seek to our segment */
+- gst_segment_do_seek (&self->segment, rate, format, flags,
+- start_type, start, stop_type, stop, &update);
+-
+- GST_DEBUG_OBJECT (self, "segment after seek: %" GST_SEGMENT_FORMAT,
+- &self->segment);
+-
+- self->need_segment = TRUE;
+- } else {
++ if (!ret) {
+ GST_WARNING_OBJECT (self, "seek to 0 bytes failed");
+ }
+
+@@ -1632,8 +1630,10 @@ gst_sub_parse_sink_event (GstPad * pad, GstObject * parent, GstEvent * event)
+ gst_event_parse_segment (event, &s);
+ if (s->format == GST_FORMAT_TIME)
+ gst_event_copy_segment (event, &self->segment);
+- GST_DEBUG_OBJECT (self, "newsegment (%s)",
+- gst_format_get_name (self->segment.format));
++ GST_DEBUG_OBJECT (self, "newsegment (%s) %" GST_SEGMENT_FORMAT,
++ gst_format_get_name (self->segment.format), &self->segment);
++
++ self->need_segment = TRUE;
+
+ /* if not time format, we'll either start with a 0 timestamp anyway or
+ * it's following a seek in which case we'll have saved the requested
+--
+1.7.9.5
+