summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
authorYuqing Zhu <b54851@freescale.com>2015-08-10 11:41:42 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-01 21:19:38 +0100
commitaecebf120b9aa605497e866d63277195dfbca0f7 (patch)
tree80245da3a19108df0dc2a063ffe2c9bbf53b1ca7 /meta/recipes-multimedia
parentdd86cb34e6b2b84c8abcad554a0612d2e495661f (diff)
downloadast2050-yocto-poky-aecebf120b9aa605497e866d63277195dfbca0f7.zip
ast2050-yocto-poky-aecebf120b9aa605497e866d63277195dfbca0f7.tar.gz
gstreamer1.0-plugins-base: Set need_segment after sink pad receive 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. (From OE-Core master rev: 48742378cd91297db439ee83576f3663befaa8f9) (From OE-Core rev: 0ecbbc39353d92a66d32ea13075aaec76b590fa0) Signed-off-by: Yuqing Zhu <b54851@freescale.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch69
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb1
2 files changed, 70 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
new file mode 100644
index 0000000..7813915
--- /dev/null
+++ b/meta/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
+
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
index 85e2ad6..ba76bdd 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
@@ -20,6 +20,7 @@ SRC_URI += "file://do-not-change-eos-event-to-gap-event-if.patch \
file://0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch \
file://0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch \
file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
+ file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
"
SRC_URI[md5sum] = "357165af625c0ca353ab47c5d843920e"
OpenPOWER on IntegriCloud