* [meta-fsl-arm][PATCH v4 0/4] 3.14.38-6QP_Beta release
@ 2015-07-30 18:55 Yuqing Zhu
2015-07-30 18:55 ` [meta-fsl-arm][PATCH v4 1/4] gstreamer1.0-plugins-base: Add gstplaybin related patch Yuqing Zhu
` (3 more replies)
0 siblings, 4 replies; 13+ messages in thread
From: Yuqing Zhu @ 2015-07-30 18:55 UTC (permalink / raw)
To: meta-freescale
Fix issue about gstreamer1.0-plugins-base
-gstplaybin: Remove native video flag and deinterlace flag.
-ssaparse: Enhance SSA text lines parsing.
-subparse: Set need_segment after sink pad receive GST_EVENT_SEGMENT.
-encodebin: Need more buffers in output queue for better performance.
Yuqing Zhu (4):
gstreamer1.0-plugins-base: Add gstplaybin related patch
gstreamer1.0-plugins-base: Add ssaparse related patch
gstreamer1.0-plugins-base: Add subparse related patch
gstreamer1.0-plugins-base: Add encodebin related patch
...3-ssaparse-enhance-SSA-text-lines-parsing.patch | 225 +++++++++++++++++++++
...t-need_segment-after-sink-pad-received-GS.patch | 69 +++++++
...eed-more-buffers-in-output-queue-for-bett.patch | 34 ++++
...ch => gstplaybin-remove-flag-deinterlace.patch} | 10 +-
.../gstreamer/gstreamer1.0-plugins-base_%.bbappend | 19 +-
5 files changed, 348 insertions(+), 9 deletions(-)
create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
rename recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/{gstplaybin-enable-native-video.patch => gstplaybin-remove-flag-deinterlace.patch} (79%)
--
1.9.1
^ permalink raw reply [flat|nested] 13+ messages in thread* [meta-fsl-arm][PATCH v4 1/4] gstreamer1.0-plugins-base: Add gstplaybin related patch 2015-07-30 18:55 [meta-fsl-arm][PATCH v4 0/4] 3.14.38-6QP_Beta release Yuqing Zhu @ 2015-07-30 18:55 ` Yuqing Zhu 2015-08-05 20:32 ` Carlos Rafael Giani 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v4 2/4] gstreamer1.0-plugins-base: Add ssaparse " Yuqing Zhu ` (2 subsequent siblings) 3 siblings, 1 reply; 13+ messages in thread From: Yuqing Zhu @ 2015-07-30 18:55 UTC (permalink / raw) To: meta-freescale -Remove default deinterlace flag in playbin for i.MX s/5/6/7 SoCs. -Remove native video flag in playbin for i.MX s/5/6/7 SoCs because it will cause subtitle error. -Enable pango plugin to generate texture of the video movie. It is the specific feature for i.MX 6/7 SoCs. Signed-off-by: Yuqing Zhu <b54851@freescale.com> --- ...deo.patch => gstplaybin-remove-flag-deinterlace.patch} | 10 +++++----- .../gstreamer/gstreamer1.0-plugins-base_%.bbappend | 15 +++++++++++---- 2 files changed, 16 insertions(+), 9 deletions(-) rename recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/{gstplaybin-enable-native-video.patch => gstplaybin-remove-flag-deinterlace.patch} (79%) diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-enable-native-video.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-remove-flag-deinterlace.patch similarity index 79% rename from recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-enable-native-video.patch rename to recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-remove-flag-deinterlace.patch index 15322bd..f237776 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-enable-native-video.patch +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-remove-flag-deinterlace.patch @@ -1,11 +1,11 @@ From 9cfb86cd100904f0ef2626f348695bd2d3416c6a Mon Sep 17 00:00:00 2001 From: Jian Li <jian.li@freescale.com> Date: Mon, 23 Jun 2014 14:14:07 +0800 -Subject: [PATCH] gstplaybin enable native video +Subject: [PATCH] gstplaybin remove default deinterlace flag -- use native video patch in playbin for i.MX SoCs +- remove default deinterlace flag in playbin for i.MX SoCs -Upstream Status: Inappropriate [platform specific] +Upstream-Status: Inappropriate [platform specific] Signed-off-by: Jian Li <jian.li@freescale.com> --- @@ -22,10 +22,10 @@ index fc02ca3..c342438 100644 #define DEFAULT_FLAGS GST_PLAY_FLAG_AUDIO | GST_PLAY_FLAG_VIDEO | GST_PLAY_FLAG_TEXT | \ - GST_PLAY_FLAG_SOFT_VOLUME | GST_PLAY_FLAG_DEINTERLACE | \ - GST_PLAY_FLAG_SOFT_COLORBALANCE -+ GST_PLAY_FLAG_SOFT_VOLUME | GST_PLAY_FLAG_NATIVE_VIDEO ++ GST_PLAY_FLAG_SOFT_VOLUME #define DEFAULT_N_VIDEO 0 #define DEFAULT_CURRENT_VIDEO -1 #define DEFAULT_N_AUDIO 0 --- +-- 1.7.9.5 diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend index 5b939d4..e7e148e 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend @@ -1,9 +1,16 @@ - FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI_append_mxs = " file://gstplaybin-enable-native-video.patch" -SRC_URI_append_mx5 = " file://gstplaybin-enable-native-video.patch" -SRC_URI_append_mx6 = " file://gstplaybin-enable-native-video.patch" +SRC_URI_append_mxs = " file://gstplaybin-remove-flag-deinterlace.patch" +SRC_URI_append_mx5 = " file://gstplaybin-remove-flag-deinterlace.patch" +IMX_PATCHES = " file://gstplaybin-remove-flag-deinterlace.patch" + + +SRC_URI_append_mx6 = "${IMX_PATCHES}" +SRC_URI_append_mx7 = "${IMX_PATCHES}" + +# Enable pango lib for i.MX 6/7 SoCs +PACKAGECONFIG_append_mx6 = " pango " +PACKAGECONFIG_append_mx7 = " pango " PACKAGE_ARCH_mxs = "${MACHINE_SOCARCH}" PACKAGE_ARCH_mx5 = "${MACHINE_SOCARCH}" -- 1.9.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [meta-fsl-arm][PATCH v4 1/4] gstreamer1.0-plugins-base: Add gstplaybin related patch 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v4 1/4] gstreamer1.0-plugins-base: Add gstplaybin related patch Yuqing Zhu @ 2015-08-05 20:32 ` Carlos Rafael Giani 2015-08-05 20:35 ` Otavio Salvador 0 siblings, 1 reply; 13+ messages in thread From: Carlos Rafael Giani @ 2015-08-05 20:32 UTC (permalink / raw) To: Yuqing Zhu, meta-freescale This patch looks generally OK to me. The pango packageconfig could probably even be added to the gstreamer1.0-plugins-base.inc file in OE-core, since pango is present in OE-core. In fact, I don't know why it isn't already included in the default packageconfig of gstreamer1.0-plugins-base. But why do you view pango as mx6/mx7 specific? Am 2015-07-30 um 20:55 schrieb Yuqing Zhu: > -Remove default deinterlace flag in playbin for i.MX s/5/6/7 SoCs. > > -Remove native video flag in playbin for i.MX s/5/6/7 SoCs because it will cause subtitle error. > > -Enable pango plugin to generate texture of the video movie. > It is the specific feature for i.MX 6/7 SoCs. > > Signed-off-by: Yuqing Zhu <b54851@freescale.com> > --- > ...deo.patch => gstplaybin-remove-flag-deinterlace.patch} | 10 +++++----- > .../gstreamer/gstreamer1.0-plugins-base_%.bbappend | 15 +++++++++++---- > 2 files changed, 16 insertions(+), 9 deletions(-) > rename recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/{gstplaybin-enable-native-video.patch => gstplaybin-remove-flag-deinterlace.patch} (79%) > > diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-enable-native-video.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-remove-flag-deinterlace.patch > similarity index 79% > rename from recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-enable-native-video.patch > rename to recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-remove-flag-deinterlace.patch > index 15322bd..f237776 100644 > --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-enable-native-video.patch > +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-remove-flag-deinterlace.patch > @@ -1,11 +1,11 @@ > From 9cfb86cd100904f0ef2626f348695bd2d3416c6a Mon Sep 17 00:00:00 2001 > From: Jian Li <jian.li@freescale.com> > Date: Mon, 23 Jun 2014 14:14:07 +0800 > -Subject: [PATCH] gstplaybin enable native video > +Subject: [PATCH] gstplaybin remove default deinterlace flag > > -- use native video patch in playbin for i.MX SoCs > +- remove default deinterlace flag in playbin for i.MX SoCs > > -Upstream Status: Inappropriate [platform specific] > +Upstream-Status: Inappropriate [platform specific] > > Signed-off-by: Jian Li <jian.li@freescale.com> > --- > @@ -22,10 +22,10 @@ index fc02ca3..c342438 100644 > #define DEFAULT_FLAGS GST_PLAY_FLAG_AUDIO | GST_PLAY_FLAG_VIDEO | GST_PLAY_FLAG_TEXT | \ > - GST_PLAY_FLAG_SOFT_VOLUME | GST_PLAY_FLAG_DEINTERLACE | \ > - GST_PLAY_FLAG_SOFT_COLORBALANCE > -+ GST_PLAY_FLAG_SOFT_VOLUME | GST_PLAY_FLAG_NATIVE_VIDEO > ++ GST_PLAY_FLAG_SOFT_VOLUME > #define DEFAULT_N_VIDEO 0 > #define DEFAULT_CURRENT_VIDEO -1 > #define DEFAULT_N_AUDIO 0 > --- > +-- > 1.7.9.5 > > diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > index 5b939d4..e7e148e 100644 > --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > @@ -1,9 +1,16 @@ > - > FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" > > -SRC_URI_append_mxs = " file://gstplaybin-enable-native-video.patch" > -SRC_URI_append_mx5 = " file://gstplaybin-enable-native-video.patch" > -SRC_URI_append_mx6 = " file://gstplaybin-enable-native-video.patch" > +SRC_URI_append_mxs = " file://gstplaybin-remove-flag-deinterlace.patch" > +SRC_URI_append_mx5 = " file://gstplaybin-remove-flag-deinterlace.patch" > +IMX_PATCHES = " file://gstplaybin-remove-flag-deinterlace.patch" > + > + > +SRC_URI_append_mx6 = "${IMX_PATCHES}" > +SRC_URI_append_mx7 = "${IMX_PATCHES}" > + > +# Enable pango lib for i.MX 6/7 SoCs > +PACKAGECONFIG_append_mx6 = " pango " > +PACKAGECONFIG_append_mx7 = " pango " > > PACKAGE_ARCH_mxs = "${MACHINE_SOCARCH}" > PACKAGE_ARCH_mx5 = "${MACHINE_SOCARCH}" ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [meta-fsl-arm][PATCH v4 1/4] gstreamer1.0-plugins-base: Add gstplaybin related patch 2015-08-05 20:32 ` Carlos Rafael Giani @ 2015-08-05 20:35 ` Otavio Salvador 2015-08-05 20:44 ` Carlos Rafael Giani 0 siblings, 1 reply; 13+ messages in thread From: Otavio Salvador @ 2015-08-05 20:35 UTC (permalink / raw) To: Carlos Rafael Giani; +Cc: meta-freescale@yoctoproject.org On Wed, Aug 5, 2015 at 5:32 PM, Carlos Rafael Giani <dv@pseudoterminal.org> wrote: > This patch looks generally OK to me. If it is split, dropping the pango change, it seems acceptable. > The pango packageconfig could probably even be added to the > gstreamer1.0-plugins-base.inc file in OE-core, since pango is present in > OE-core. In fact, I don't know why it isn't already included in the default > packageconfig of gstreamer1.0-plugins-base. But why do you view pango as > mx6/mx7 specific? The pango change is not SoC specific and needs to be send to OE-Core. -- Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [meta-fsl-arm][PATCH v4 1/4] gstreamer1.0-plugins-base: Add gstplaybin related patch 2015-08-05 20:35 ` Otavio Salvador @ 2015-08-05 20:44 ` Carlos Rafael Giani 2015-08-05 21:00 ` Carlos Rafael Giani 0 siblings, 1 reply; 13+ messages in thread From: Carlos Rafael Giani @ 2015-08-05 20:44 UTC (permalink / raw) To: Otavio Salvador; +Cc: meta-freescale@yoctoproject.org Am 2015-08-05 um 22:35 schrieb Otavio Salvador: > On Wed, Aug 5, 2015 at 5:32 PM, Carlos Rafael Giani > <dv@pseudoterminal.org> wrote: >> This patch looks generally OK to me. > If it is split, dropping the pango change, it seems acceptable. > >> The pango packageconfig could probably even be added to the >> gstreamer1.0-plugins-base.inc file in OE-core, since pango is present in >> OE-core. In fact, I don't know why it isn't already included in the default >> packageconfig of gstreamer1.0-plugins-base. But why do you view pango as >> mx6/mx7 specific? > The pango change is not SoC specific and needs to be send to OE-Core. > Yes, the flag changes are a reasonable compromise. But I am a bit concerned about the pango issue. Perhaps pango was left out of the standard packageconfig by accident. Perhaps though there is a good reason for it. I didn't see any in my builds though, so okay, lets make the pango addition a separate OE-core patch. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [meta-fsl-arm][PATCH v4 1/4] gstreamer1.0-plugins-base: Add gstplaybin related patch 2015-08-05 20:44 ` Carlos Rafael Giani @ 2015-08-05 21:00 ` Carlos Rafael Giani 2015-08-05 21:06 ` Otavio Salvador 0 siblings, 1 reply; 13+ messages in thread From: Carlos Rafael Giani @ 2015-08-05 21:00 UTC (permalink / raw) To: meta-freescale Am 2015-08-05 um 22:44 schrieb Carlos Rafael Giani: > > > Am 2015-08-05 um 22:35 schrieb Otavio Salvador: >> On Wed, Aug 5, 2015 at 5:32 PM, Carlos Rafael Giani >> <dv@pseudoterminal.org> wrote: >>> This patch looks generally OK to me. >> If it is split, dropping the pango change, it seems acceptable. >> >>> The pango packageconfig could probably even be added to the >>> gstreamer1.0-plugins-base.inc file in OE-core, since pango is >>> present in >>> OE-core. In fact, I don't know why it isn't already included in the >>> default >>> packageconfig of gstreamer1.0-plugins-base. But why do you view >>> pango as >>> mx6/mx7 specific? >> The pango change is not SoC specific and needs to be send to OE-Core. >> > > Yes, the flag changes are a reasonable compromise. But I am a bit > concerned about the pango issue. Perhaps pango was left out of the > standard packageconfig by accident. Perhaps though there is a good > reason for it. I didn't see any in my builds though, so okay, lets > make the pango addition a separate OE-core patch. I just posted a patch for pango in gstreamer1.0-plugins-base to the OE core mailing list. Therefore, the pango part of this patch can be omitted. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [meta-fsl-arm][PATCH v4 1/4] gstreamer1.0-plugins-base: Add gstplaybin related patch 2015-08-05 21:00 ` Carlos Rafael Giani @ 2015-08-05 21:06 ` Otavio Salvador 0 siblings, 0 replies; 13+ messages in thread From: Otavio Salvador @ 2015-08-05 21:06 UTC (permalink / raw) To: Carlos Rafael Giani; +Cc: meta-freescale@yoctoproject.org On Wed, Aug 5, 2015 at 6:00 PM, Carlos Rafael Giani <dv@pseudoterminal.org> wrote: > Am 2015-08-05 um 22:44 schrieb Carlos Rafael Giani: >> >> >> >> Am 2015-08-05 um 22:35 schrieb Otavio Salvador: >>> >>> On Wed, Aug 5, 2015 at 5:32 PM, Carlos Rafael Giani >>> <dv@pseudoterminal.org> wrote: >>>> >>>> This patch looks generally OK to me. >>> >>> If it is split, dropping the pango change, it seems acceptable. >>> >>>> The pango packageconfig could probably even be added to the >>>> gstreamer1.0-plugins-base.inc file in OE-core, since pango is present in >>>> OE-core. In fact, I don't know why it isn't already included in the >>>> default >>>> packageconfig of gstreamer1.0-plugins-base. But why do you view pango as >>>> mx6/mx7 specific? >>> >>> The pango change is not SoC specific and needs to be send to OE-Core. >>> >> >> Yes, the flag changes are a reasonable compromise. But I am a bit >> concerned about the pango issue. Perhaps pango was left out of the standard >> packageconfig by accident. Perhaps though there is a good reason for it. I >> didn't see any in my builds though, so okay, lets make the pango addition a >> separate OE-core patch. > > > I just posted a patch for pango in gstreamer1.0-plugins-base to the OE core > mailing list. Therefore, the pango part of this patch can be omitted. I acked it on OE-Core mailing list; thanks for handling it. -- Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [meta-fsl-arm][PATCH v4 2/4] gstreamer1.0-plugins-base: Add ssaparse related patch 2015-07-30 18:55 [meta-fsl-arm][PATCH v4 0/4] 3.14.38-6QP_Beta release Yuqing Zhu 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v4 1/4] gstreamer1.0-plugins-base: Add gstplaybin related patch Yuqing Zhu @ 2015-07-30 18:55 ` Yuqing Zhu 2015-08-05 20:36 ` Carlos Rafael Giani 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v4 3/4] gstreamer1.0-plugins-base: Add subparse " Yuqing Zhu 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v5 4/4] gstreamer1.0-plugins-base: Add encodebin " Yuqing Zhu 3 siblings, 1 reply; 13+ messages in thread From: Yuqing Zhu @ 2015-07-30 18:55 UTC (permalink / raw) To: meta-freescale Enhance SSA text lines parsing. Signed-off-by: Yuqing Zhu <b54851@freescale.com> --- ...3-ssaparse-enhance-SSA-text-lines-parsing.patch | 225 +++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-base_%.bbappend | 4 +- 2 files changed, 228 insertions(+), 1 deletion(-) create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch new file mode 100644 index 0000000..7666998 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch @@ -0,0 +1,225 @@ +From be6163cfa3a255493f9d75bad9541cbfe1723fee Mon Sep 17 00:00:00 2001 +From: Mingke Wang <mingke.wang@freescale.com> +Date: Thu, 19 Mar 2015 14:17:10 +0800 +Subject: [PATCH 3/4] ssaparse: enhance SSA text lines parsing. + +some parser will pass in the original ssa text line which starts with "Dialog:" +and there's are maybe multiple Dialog lines in one input buffer. + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Mingke Wang <mingke.wang@freescale.com> + +diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c +old mode 100644 +new mode 100755 +index 06ecef9..0ab5dce +--- a/gst/subparse/gstssaparse.c ++++ b/gst/subparse/gstssaparse.c +@@ -260,6 +260,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) + * gst_ssa_parse_push_line: + * @parse: caller element + * @txt: text to push ++ * @size: text size need to be parse + * @start: timestamp for the buffer + * @duration: duration for the buffer + * +@@ -269,27 +270,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) + * Returns: result of the push of the created buffer + */ + static GstFlowReturn +-gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, ++gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, gint size, + GstClockTime start, GstClockTime duration) + { + GstFlowReturn ret; + GstBuffer *buf; +- gchar *t, *escaped; ++ gchar *t, *text, *p, *escaped, *p_start, *p_end; + gint num, i, len; ++ GstClockTime start_time = G_MAXUINT64, end_time = 0; + +- num = atoi (txt); +- GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT, +- num, GST_TIME_ARGS (start)); +- +- /* skip all non-text fields before the actual text */ ++ p = text = g_malloc(size + 1); ++ *p = '\0'; + t = txt; +- for (i = 0; i < 8; ++i) { +- t = strchr (t, ','); ++ ++ /* there are may have multiple dialogue lines at a time */ ++ while (*t) { ++ /* ignore leading white space characters */ ++ while (isspace(*t)) ++ t++; ++ ++ /* ignore Format: and Style: lines */ ++ if (strncmp(t, "Format:", 7) == 0 || strncmp(t, "Style:", 6) == 0) { ++ while (*t != '\0' && *t != '\n') { ++ t++; ++ } ++ } ++ ++ if (*t == '\0') ++ break; ++ ++ /* continue with next line */ ++ if (*t == '\n') { ++ t++; ++ continue; ++ } ++ ++ if(strncmp(t, "Dialogue:", 9) != 0) { ++ /* not started with "Dialogue:", it must be a line trimmed by demuxer */ ++ num = atoi (t); ++ GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT, ++ num, GST_TIME_ARGS (start)); ++ ++ /* skip all non-text fields before the actual text */ ++ for (i = 0; i < 8; ++i) { ++ t = strchr (t, ','); ++ if (t == NULL) ++ break; ++ ++t; ++ } ++ } else { ++ /* started with "Dialogue:", update timestamp and duration */ ++ /* time format are like Dialog:Mark,0:00:01.02,0:00:03.04,xx,xxx,... */ ++ guint hour, min, sec, msec, len; ++ GstClockTime tmp; ++ gchar t_str[12] = {0}; ++ ++ /* find the first ',' */ ++ p_start = strchr (t, ','); ++ if (p_start) ++ p_end = strchr (++p_start, ','); ++ ++ if (p_start && p_end) { ++ /* copy text between first ',' and second ',' */ ++ strncpy(t_str, p_start, p_end - p_start); ++ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) { ++ tmp = ((hour*3600) + (min*60) + sec) * GST_SECOND + msec*GST_MSECOND; ++ GST_DEBUG_OBJECT (parse, "Get start time:%02d:%02d:%02d:%03d\n", ++ hour, min, sec, msec); ++ if (start_time > tmp) ++ start_time = tmp; ++ } else { ++ GST_WARNING_OBJECT (parse, ++ "failed to parse ssa start timestamp string :%s", t_str); ++ } ++ ++ p_start = p_end; ++ p_end = strchr (++p_start, ','); ++ if (p_end) { ++ /* copy text between second ',' and third ',' */ ++ strncpy(t_str, p_start, p_end - p_start); ++ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) { ++ tmp = ((hour*3600) + (min*60) + sec)*GST_SECOND + msec*GST_MSECOND; ++ GST_DEBUG_OBJECT(parse, "Get end time:%02d:%02d:%02d:%03d\n", ++ hour, min, sec, msec); ++ if (end_time < tmp) ++ end_time = tmp; ++ } else { ++ GST_WARNING_OBJECT (parse, ++ "failed to parse ssa end timestamp string :%s", t_str); ++ } ++ } ++ } ++ ++ /* now skip all non-text fields before the actual text */ ++ for (i = 0; i <= 8; ++i) { ++ t = strchr (t, ','); ++ if (t == NULL) ++ break; ++ ++t; ++ } ++ } ++ ++ /* line end before expected number of ',', not a Dialogue line */ + if (t == NULL) +- return GST_FLOW_ERROR; +- ++t; ++ break; ++ ++ /* if not the first line, and the last character of previous line is '\0', ++ * then replace it with '\N' */ ++ if (p != text && *p == '\0') { ++ *p++ = '\\'; ++ *p++ = 'N'; ++ } ++ ++ /* copy all actual text of this line */ ++ while ((*t != '\0') && (*t != '\n')) ++ *p++ = *t++; ++ ++ /* add a terminator at the end */ ++ *p = '\0'; ++ } ++ ++ /* not valid text found in this buffer return OK to let caller unref buffer */ ++ if (strlen(text) <= 0) { ++ GST_WARNING_OBJECT (parse, "Not valid text found in this buffer\n"); ++ return GST_FLOW_ERROR; + } + ++ t = text; + GST_LOG_OBJECT (parse, "Text : %s", t); + + if (gst_ssa_parse_remove_override_codes (parse, t)) { +@@ -307,13 +414,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, + gst_buffer_fill (buf, 0, escaped, len + 1); + gst_buffer_set_size (buf, len); + g_free (escaped); ++ g_free(t); ++ ++ if (start_time != G_MAXUINT64) ++ GST_BUFFER_TIMESTAMP (buf) = start_time; ++ else ++ GST_BUFFER_TIMESTAMP (buf) = start; + +- GST_BUFFER_TIMESTAMP (buf) = start; +- GST_BUFFER_DURATION (buf) = duration; ++ if (end_time > start_time) ++ GST_BUFFER_DURATION (buf) = end_time - start_time; ++ else ++ GST_BUFFER_DURATION (buf) = duration; + + GST_LOG_OBJECT (parse, "Pushing buffer with timestamp %" GST_TIME_FORMAT +- " and duration %" GST_TIME_FORMAT, GST_TIME_ARGS (start), +- GST_TIME_ARGS (duration)); ++ " and duration %" GST_TIME_FORMAT, ++ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), ++ GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); + + ret = gst_pad_push (parse->srcpad, buf); + +@@ -333,6 +449,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) + GstClockTime ts; + gchar *txt; + GstMapInfo map; ++ gint size; + + if (G_UNLIKELY (!parse->framed)) + goto not_framed; +@@ -350,13 +467,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) + /* make double-sure it's 0-terminated and all */ + gst_buffer_map (buf, &map, GST_MAP_READ); + txt = g_strndup ((gchar *) map.data, map.size); ++ size = map.size; + gst_buffer_unmap (buf, &map); + + if (txt == NULL) + goto empty_text; + + ts = GST_BUFFER_TIMESTAMP (buf); +- ret = gst_ssa_parse_push_line (parse, txt, ts, GST_BUFFER_DURATION (buf)); ++ ret = gst_ssa_parse_push_line (parse, txt, size, ts, GST_BUFFER_DURATION (buf)); + + if (ret != GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (ts)) { + GstSegment segment; +-- +1.7.9.5 + diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend index e7e148e..977c26e 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend @@ -2,7 +2,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SRC_URI_append_mxs = " file://gstplaybin-remove-flag-deinterlace.patch" SRC_URI_append_mx5 = " file://gstplaybin-remove-flag-deinterlace.patch" -IMX_PATCHES = " file://gstplaybin-remove-flag-deinterlace.patch" +IMX_PATCHES = " file://gstplaybin-remove-flag-deinterlace.patch \ + file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \ +" SRC_URI_append_mx6 = "${IMX_PATCHES}" -- 1.9.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [meta-fsl-arm][PATCH v4 2/4] gstreamer1.0-plugins-base: Add ssaparse related patch 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v4 2/4] gstreamer1.0-plugins-base: Add ssaparse " Yuqing Zhu @ 2015-08-05 20:36 ` Carlos Rafael Giani 0 siblings, 0 replies; 13+ messages in thread From: Carlos Rafael Giani @ 2015-08-05 20:36 UTC (permalink / raw) To: Yuqing Zhu, meta-freescale Is this also marked i.MX specific because it is still under discussion with the community? Do you have a link to the discussion in Bugzilla? If so, use "Upstream-Status: Submitted [<Bugzilla link>]" instead. Am 2015-07-30 um 20:55 schrieb Yuqing Zhu: > Enhance SSA text lines parsing. > > Signed-off-by: Yuqing Zhu <b54851@freescale.com> > --- > ...3-ssaparse-enhance-SSA-text-lines-parsing.patch | 225 +++++++++++++++++++++ > .../gstreamer/gstreamer1.0-plugins-base_%.bbappend | 4 +- > 2 files changed, 228 insertions(+), 1 deletion(-) > create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch > > diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch > new file mode 100644 > index 0000000..7666998 > --- /dev/null > +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch > @@ -0,0 +1,225 @@ > +From be6163cfa3a255493f9d75bad9541cbfe1723fee Mon Sep 17 00:00:00 2001 > +From: Mingke Wang <mingke.wang@freescale.com> > +Date: Thu, 19 Mar 2015 14:17:10 +0800 > +Subject: [PATCH 3/4] ssaparse: enhance SSA text lines parsing. > + > +some parser will pass in the original ssa text line which starts with "Dialog:" > +and there's are maybe multiple Dialog lines in one input buffer. > + > +Upstream-Status: Inappropriate [i.MX specific] > + > +Signed-off-by: Mingke Wang <mingke.wang@freescale.com> > + > +diff --git a/gst/subparse/gstssaparse.c b/gst/subparse/gstssaparse.c > +old mode 100644 > +new mode 100755 > +index 06ecef9..0ab5dce > +--- a/gst/subparse/gstssaparse.c > ++++ b/gst/subparse/gstssaparse.c > +@@ -260,6 +260,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) > + * gst_ssa_parse_push_line: > + * @parse: caller element > + * @txt: text to push > ++ * @size: text size need to be parse > + * @start: timestamp for the buffer > + * @duration: duration for the buffer > + * > +@@ -269,27 +270,133 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt) > + * Returns: result of the push of the created buffer > + */ > + static GstFlowReturn > +-gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, > ++gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, gint size, > + GstClockTime start, GstClockTime duration) > + { > + GstFlowReturn ret; > + GstBuffer *buf; > +- gchar *t, *escaped; > ++ gchar *t, *text, *p, *escaped, *p_start, *p_end; > + gint num, i, len; > ++ GstClockTime start_time = G_MAXUINT64, end_time = 0; > + > +- num = atoi (txt); > +- GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT, > +- num, GST_TIME_ARGS (start)); > +- > +- /* skip all non-text fields before the actual text */ > ++ p = text = g_malloc(size + 1); > ++ *p = '\0'; > + t = txt; > +- for (i = 0; i < 8; ++i) { > +- t = strchr (t, ','); > ++ > ++ /* there are may have multiple dialogue lines at a time */ > ++ while (*t) { > ++ /* ignore leading white space characters */ > ++ while (isspace(*t)) > ++ t++; > ++ > ++ /* ignore Format: and Style: lines */ > ++ if (strncmp(t, "Format:", 7) == 0 || strncmp(t, "Style:", 6) == 0) { > ++ while (*t != '\0' && *t != '\n') { > ++ t++; > ++ } > ++ } > ++ > ++ if (*t == '\0') > ++ break; > ++ > ++ /* continue with next line */ > ++ if (*t == '\n') { > ++ t++; > ++ continue; > ++ } > ++ > ++ if(strncmp(t, "Dialogue:", 9) != 0) { > ++ /* not started with "Dialogue:", it must be a line trimmed by demuxer */ > ++ num = atoi (t); > ++ GST_LOG_OBJECT (parse, "Parsing line #%d at %" GST_TIME_FORMAT, > ++ num, GST_TIME_ARGS (start)); > ++ > ++ /* skip all non-text fields before the actual text */ > ++ for (i = 0; i < 8; ++i) { > ++ t = strchr (t, ','); > ++ if (t == NULL) > ++ break; > ++ ++t; > ++ } > ++ } else { > ++ /* started with "Dialogue:", update timestamp and duration */ > ++ /* time format are like Dialog:Mark,0:00:01.02,0:00:03.04,xx,xxx,... */ > ++ guint hour, min, sec, msec, len; > ++ GstClockTime tmp; > ++ gchar t_str[12] = {0}; > ++ > ++ /* find the first ',' */ > ++ p_start = strchr (t, ','); > ++ if (p_start) > ++ p_end = strchr (++p_start, ','); > ++ > ++ if (p_start && p_end) { > ++ /* copy text between first ',' and second ',' */ > ++ strncpy(t_str, p_start, p_end - p_start); > ++ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) { > ++ tmp = ((hour*3600) + (min*60) + sec) * GST_SECOND + msec*GST_MSECOND; > ++ GST_DEBUG_OBJECT (parse, "Get start time:%02d:%02d:%02d:%03d\n", > ++ hour, min, sec, msec); > ++ if (start_time > tmp) > ++ start_time = tmp; > ++ } else { > ++ GST_WARNING_OBJECT (parse, > ++ "failed to parse ssa start timestamp string :%s", t_str); > ++ } > ++ > ++ p_start = p_end; > ++ p_end = strchr (++p_start, ','); > ++ if (p_end) { > ++ /* copy text between second ',' and third ',' */ > ++ strncpy(t_str, p_start, p_end - p_start); > ++ if (sscanf (t_str, "%u:%u:%u.%u", &hour, &min, &sec, &msec) == 4) { > ++ tmp = ((hour*3600) + (min*60) + sec)*GST_SECOND + msec*GST_MSECOND; > ++ GST_DEBUG_OBJECT(parse, "Get end time:%02d:%02d:%02d:%03d\n", > ++ hour, min, sec, msec); > ++ if (end_time < tmp) > ++ end_time = tmp; > ++ } else { > ++ GST_WARNING_OBJECT (parse, > ++ "failed to parse ssa end timestamp string :%s", t_str); > ++ } > ++ } > ++ } > ++ > ++ /* now skip all non-text fields before the actual text */ > ++ for (i = 0; i <= 8; ++i) { > ++ t = strchr (t, ','); > ++ if (t == NULL) > ++ break; > ++ ++t; > ++ } > ++ } > ++ > ++ /* line end before expected number of ',', not a Dialogue line */ > + if (t == NULL) > +- return GST_FLOW_ERROR; > +- ++t; > ++ break; > ++ > ++ /* if not the first line, and the last character of previous line is '\0', > ++ * then replace it with '\N' */ > ++ if (p != text && *p == '\0') { > ++ *p++ = '\\'; > ++ *p++ = 'N'; > ++ } > ++ > ++ /* copy all actual text of this line */ > ++ while ((*t != '\0') && (*t != '\n')) > ++ *p++ = *t++; > ++ > ++ /* add a terminator at the end */ > ++ *p = '\0'; > ++ } > ++ > ++ /* not valid text found in this buffer return OK to let caller unref buffer */ > ++ if (strlen(text) <= 0) { > ++ GST_WARNING_OBJECT (parse, "Not valid text found in this buffer\n"); > ++ return GST_FLOW_ERROR; > + } > + > ++ t = text; > + GST_LOG_OBJECT (parse, "Text : %s", t); > + > + if (gst_ssa_parse_remove_override_codes (parse, t)) { > +@@ -307,13 +414,22 @@ gst_ssa_parse_push_line (GstSsaParse * parse, gchar * txt, > + gst_buffer_fill (buf, 0, escaped, len + 1); > + gst_buffer_set_size (buf, len); > + g_free (escaped); > ++ g_free(t); > ++ > ++ if (start_time != G_MAXUINT64) > ++ GST_BUFFER_TIMESTAMP (buf) = start_time; > ++ else > ++ GST_BUFFER_TIMESTAMP (buf) = start; > + > +- GST_BUFFER_TIMESTAMP (buf) = start; > +- GST_BUFFER_DURATION (buf) = duration; > ++ if (end_time > start_time) > ++ GST_BUFFER_DURATION (buf) = end_time - start_time; > ++ else > ++ GST_BUFFER_DURATION (buf) = duration; > + > + GST_LOG_OBJECT (parse, "Pushing buffer with timestamp %" GST_TIME_FORMAT > +- " and duration %" GST_TIME_FORMAT, GST_TIME_ARGS (start), > +- GST_TIME_ARGS (duration)); > ++ " and duration %" GST_TIME_FORMAT, > ++ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), > ++ GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); > + > + ret = gst_pad_push (parse->srcpad, buf); > + > +@@ -333,6 +449,7 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) > + GstClockTime ts; > + gchar *txt; > + GstMapInfo map; > ++ gint size; > + > + if (G_UNLIKELY (!parse->framed)) > + goto not_framed; > +@@ -350,13 +467,14 @@ gst_ssa_parse_chain (GstPad * sinkpad, GstObject * parent, GstBuffer * buf) > + /* make double-sure it's 0-terminated and all */ > + gst_buffer_map (buf, &map, GST_MAP_READ); > + txt = g_strndup ((gchar *) map.data, map.size); > ++ size = map.size; > + gst_buffer_unmap (buf, &map); > + > + if (txt == NULL) > + goto empty_text; > + > + ts = GST_BUFFER_TIMESTAMP (buf); > +- ret = gst_ssa_parse_push_line (parse, txt, ts, GST_BUFFER_DURATION (buf)); > ++ ret = gst_ssa_parse_push_line (parse, txt, size, ts, GST_BUFFER_DURATION (buf)); > + > + if (ret != GST_FLOW_OK && GST_CLOCK_TIME_IS_VALID (ts)) { > + GstSegment segment; > +-- > +1.7.9.5 > + > diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > index e7e148e..977c26e 100644 > --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > @@ -2,7 +2,9 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" > > SRC_URI_append_mxs = " file://gstplaybin-remove-flag-deinterlace.patch" > SRC_URI_append_mx5 = " file://gstplaybin-remove-flag-deinterlace.patch" > -IMX_PATCHES = " file://gstplaybin-remove-flag-deinterlace.patch" > +IMX_PATCHES = " file://gstplaybin-remove-flag-deinterlace.patch \ > + file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \ > +" > > > SRC_URI_append_mx6 = "${IMX_PATCHES}" ^ permalink raw reply [flat|nested] 13+ messages in thread
* [meta-fsl-arm][PATCH v4 3/4] gstreamer1.0-plugins-base: Add subparse related patch 2015-07-30 18:55 [meta-fsl-arm][PATCH v4 0/4] 3.14.38-6QP_Beta release Yuqing Zhu 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v4 1/4] gstreamer1.0-plugins-base: Add gstplaybin related patch Yuqing Zhu 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v4 2/4] gstreamer1.0-plugins-base: Add ssaparse " Yuqing Zhu @ 2015-07-30 18:55 ` Yuqing Zhu 2015-08-05 20:40 ` Carlos Rafael Giani 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v5 4/4] gstreamer1.0-plugins-base: Add encodebin " Yuqing Zhu 3 siblings, 1 reply; 13+ messages in thread From: Yuqing Zhu @ 2015-07-30 18:55 UTC (permalink / raw) To: meta-freescale Set need_segment after sink pad receive GST_EVENT_SEGMENT. Signed-off-by: Yuqing Zhu <b54851@freescale.com> --- ...t-need_segment-after-sink-pad-received-GS.patch | 69 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-base_%.bbappend | 1 + 2 files changed, 70 insertions(+) create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch new file mode 100644 index 0000000..b119fb1 --- /dev/null +++ b/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: Inappropriate [i.MX specific] + +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/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend index 977c26e..683f330 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend @@ -4,6 +4,7 @@ SRC_URI_append_mxs = " file://gstplaybin-remove-flag-deinterlace.patch" SRC_URI_append_mx5 = " file://gstplaybin-remove-flag-deinterlace.patch" IMX_PATCHES = " file://gstplaybin-remove-flag-deinterlace.patch \ file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \ + file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \ " -- 1.9.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [meta-fsl-arm][PATCH v4 3/4] gstreamer1.0-plugins-base: Add subparse related patch 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v4 3/4] gstreamer1.0-plugins-base: Add subparse " Yuqing Zhu @ 2015-08-05 20:40 ` Carlos Rafael Giani 0 siblings, 0 replies; 13+ messages in thread From: Carlos Rafael Giani @ 2015-08-05 20:40 UTC (permalink / raw) To: Yuqing Zhu, meta-freescale Same here with regards to "i.MX specific". This is a proposed patch from https://bugzilla.gnome.org/show_bug.cgi?id=747498 , so use "Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747498]" instead. Am 2015-07-30 um 20:55 schrieb Yuqing Zhu: > Set need_segment after sink pad receive GST_EVENT_SEGMENT. > > Signed-off-by: Yuqing Zhu <b54851@freescale.com> > --- > ...t-need_segment-after-sink-pad-received-GS.patch | 69 ++++++++++++++++++++++ > .../gstreamer/gstreamer1.0-plugins-base_%.bbappend | 1 + > 2 files changed, 70 insertions(+) > create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch > > diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch > new file mode 100644 > index 0000000..b119fb1 > --- /dev/null > +++ b/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: Inappropriate [i.MX specific] > + > +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/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > index 977c26e..683f330 100644 > --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > @@ -4,6 +4,7 @@ SRC_URI_append_mxs = " file://gstplaybin-remove-flag-deinterlace.patch" > SRC_URI_append_mx5 = " file://gstplaybin-remove-flag-deinterlace.patch" > IMX_PATCHES = " file://gstplaybin-remove-flag-deinterlace.patch \ > file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \ > + file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \ > " > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* [meta-fsl-arm][PATCH v5 4/4] gstreamer1.0-plugins-base: Add encodebin related patch 2015-07-30 18:55 [meta-fsl-arm][PATCH v4 0/4] 3.14.38-6QP_Beta release Yuqing Zhu ` (2 preceding siblings ...) 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v4 3/4] gstreamer1.0-plugins-base: Add subparse " Yuqing Zhu @ 2015-07-30 18:55 ` Yuqing Zhu 2015-08-05 20:42 ` Carlos Rafael Giani 3 siblings, 1 reply; 13+ messages in thread From: Yuqing Zhu @ 2015-07-30 18:55 UTC (permalink / raw) To: meta-freescale Need more buffers in output queue for better performance. Signed-off-by: Yuqing Zhu <b54851@freescale.com> --- ...eed-more-buffers-in-output-queue-for-bett.patch | 34 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-base_%.bbappend | 1 + 2 files changed, 35 insertions(+) create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch new file mode 100644 index 0000000..91a297d --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch @@ -0,0 +1,34 @@ +From 540e02c92c75e08b90326863dc787fa5cadf9da6 Mon Sep 17 00:00:00 2001 +From: Song Bing <b06498@freescale.com> +Date: Fri, 13 Mar 2015 18:04:31 +0800 +Subject: [PATCH] encodebin: Need more buffers in output queue for better + performance + +Need more buffers in output queue for better performance + +https://bugzilla.gnome.org/show_bug.cgi?id=744191 + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Song Bing <b06498@freescale.com> +--- + gst/encoding/gstencodebin.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c +index 6728e58..32daae4 100644 +--- a/gst/encoding/gstencodebin.c ++++ b/gst/encoding/gstencodebin.c +@@ -1138,8 +1138,7 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof, + * We only use a 1buffer long queue here, the actual queueing will be done + * in the input queue */ + last = sgroup->outqueue = gst_element_factory_make ("queue", NULL); +- g_object_set (sgroup->outqueue, "max-size-buffers", (guint32) 1, +- "max-size-bytes", (guint32) 0, "max-size-time", (guint64) 0, ++ g_object_set (sgroup->outqueue, "max-size-time", (guint64) 0, + "silent", TRUE, NULL); + + gst_bin_add (GST_BIN (ebin), sgroup->outqueue); +-- +1.7.9.5 + diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend index 683f330..95af102 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend @@ -5,6 +5,7 @@ SRC_URI_append_mx5 = " file://gstplaybin-remove-flag-deinterlace.patch" IMX_PATCHES = " file://gstplaybin-remove-flag-deinterlace.patch \ file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \ file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \ + file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \ " -- 1.9.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [meta-fsl-arm][PATCH v5 4/4] gstreamer1.0-plugins-base: Add encodebin related patch 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v5 4/4] gstreamer1.0-plugins-base: Add encodebin " Yuqing Zhu @ 2015-08-05 20:42 ` Carlos Rafael Giani 0 siblings, 0 replies; 13+ messages in thread From: Carlos Rafael Giani @ 2015-08-05 20:42 UTC (permalink / raw) To: Yuqing Zhu, meta-freescale OK, this one is easy :) Just change: Upstream-Status: Inappropriate [i.MX specific] to: Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=744191] Am 2015-07-30 um 20:55 schrieb Yuqing Zhu: > Need more buffers in output queue for better performance. > > Signed-off-by: Yuqing Zhu <b54851@freescale.com> > --- > ...eed-more-buffers-in-output-queue-for-bett.patch | 34 ++++++++++++++++++++++ > .../gstreamer/gstreamer1.0-plugins-base_%.bbappend | 1 + > 2 files changed, 35 insertions(+) > create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch > > diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch > new file mode 100644 > index 0000000..91a297d > --- /dev/null > +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch > @@ -0,0 +1,34 @@ > +From 540e02c92c75e08b90326863dc787fa5cadf9da6 Mon Sep 17 00:00:00 2001 > +From: Song Bing <b06498@freescale.com> > +Date: Fri, 13 Mar 2015 18:04:31 +0800 > +Subject: [PATCH] encodebin: Need more buffers in output queue for better > + performance > + > +Need more buffers in output queue for better performance > + > +https://bugzilla.gnome.org/show_bug.cgi?id=744191 > + > +Upstream-Status: Inappropriate [i.MX specific] > + > +Signed-off-by: Song Bing <b06498@freescale.com> > +--- > + gst/encoding/gstencodebin.c | 3 +-- > + 1 file changed, 1 insertion(+), 2 deletions(-) > + > +diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c > +index 6728e58..32daae4 100644 > +--- a/gst/encoding/gstencodebin.c > ++++ b/gst/encoding/gstencodebin.c > +@@ -1138,8 +1138,7 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof, > + * We only use a 1buffer long queue here, the actual queueing will be done > + * in the input queue */ > + last = sgroup->outqueue = gst_element_factory_make ("queue", NULL); > +- g_object_set (sgroup->outqueue, "max-size-buffers", (guint32) 1, > +- "max-size-bytes", (guint32) 0, "max-size-time", (guint64) 0, > ++ g_object_set (sgroup->outqueue, "max-size-time", (guint64) 0, > + "silent", TRUE, NULL); > + > + gst_bin_add (GST_BIN (ebin), sgroup->outqueue); > +-- > +1.7.9.5 > + > diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > index 683f330..95af102 100644 > --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend > @@ -5,6 +5,7 @@ SRC_URI_append_mx5 = " file://gstplaybin-remove-flag-deinterlace.patch" > IMX_PATCHES = " file://gstplaybin-remove-flag-deinterlace.patch \ > file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \ > file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \ > + file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \ > " > > ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2015-08-05 21:07 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-07-30 18:55 [meta-fsl-arm][PATCH v4 0/4] 3.14.38-6QP_Beta release Yuqing Zhu 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v4 1/4] gstreamer1.0-plugins-base: Add gstplaybin related patch Yuqing Zhu 2015-08-05 20:32 ` Carlos Rafael Giani 2015-08-05 20:35 ` Otavio Salvador 2015-08-05 20:44 ` Carlos Rafael Giani 2015-08-05 21:00 ` Carlos Rafael Giani 2015-08-05 21:06 ` Otavio Salvador 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v4 2/4] gstreamer1.0-plugins-base: Add ssaparse " Yuqing Zhu 2015-08-05 20:36 ` Carlos Rafael Giani 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v4 3/4] gstreamer1.0-plugins-base: Add subparse " Yuqing Zhu 2015-08-05 20:40 ` Carlos Rafael Giani 2015-07-30 18:55 ` [meta-fsl-arm][PATCH v5 4/4] gstreamer1.0-plugins-base: Add encodebin " Yuqing Zhu 2015-08-05 20:42 ` Carlos Rafael Giani
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.