From c2c16b3f68c9e28cb987dfab6317ec684da3679b Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Thu, 23 Feb 2017 17:46:15 +0100 Subject: [PATCH] morty migration: gstreamer1.0: update package Also apply patches from meta-fsl-bsp-release (krogoth_4.1.15-2.0.1) https://jira.digi.com/browse/DEL-3459 Signed-off-by: Javier Viguera --- .../0001-handle-base-parse-error.patch} | 27 ++++------ ...st-inspect-Chris-Lord-chris-openedha.patch | 29 +++++++++++ ...et-FLAG_DISCONT-when-push-to-adapter.patch | 30 +++++++++++ ...r-remainning-data-in-pass-through-mo.patch | 50 +++++++++++++++++++ ...ould-proceed-non-active-pad-buffer-e.patch | 48 ++++++++++++++++++ .../gstreamer/gstreamer1.0_1.4.5.bbappend | 5 -- .../gstreamer/gstreamer1.0_1.8.3.bbappend | 11 ++++ 7 files changed, 179 insertions(+), 21 deletions(-) rename meta-digi-dey/recipes-multimedia/gstreamer/{gstreamer1.0-1.4.5/0001-baseparse-handle-base-parse-error.patch => gstreamer1.0-1.8.3/0001-handle-base-parse-error.patch} (59%) create mode 100644 meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0002-Fix-crash-with-gst-inspect-Chris-Lord-chris-openedha.patch create mode 100644 meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0003-unset-FLAG_DISCONT-when-push-to-adapter.patch create mode 100644 meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0004-Need-push-adapter-remainning-data-in-pass-through-mo.patch create mode 100644 meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0005-inputselector-should-proceed-non-active-pad-buffer-e.patch delete mode 100644 meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bbappend create mode 100644 meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bbappend diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.4.5/0001-baseparse-handle-base-parse-error.patch b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0001-handle-base-parse-error.patch similarity index 59% rename from meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.4.5/0001-baseparse-handle-base-parse-error.patch rename to meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0001-handle-base-parse-error.patch index 28728d81a..ca398f2f9 100644 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.4.5/0001-baseparse-handle-base-parse-error.patch +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0001-handle-base-parse-error.patch @@ -1,37 +1,32 @@ -From 430bbeee450e3fd4fc4d0ccb627de7d3f05a9736 Mon Sep 17 00:00:00 2001 From: Lyon Wang -Date: Thu, 23 Apr 2015 14:11:11 +0800 -Subject: [PATCH] [baseparse] handle base parse error +Date: Wed, 14 Oct 2015 14:15:11 +0800 +Subject: [PATCH] handle base parse error There is no need to send GST_ELEMENT_ERROR becuase ohter tracks may still good to play. no need to end the element, just print error message is enough Bugzilla https://bugzilla.gnome.org/show_bug.cgi?id=741542 -Upstream Status: submitted +Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=741542] Signed-off-by: Lyon Wang --- - libs/gst/base/gstbaseparse.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) + libs/gst/base/gstbaseparse.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c -index 57e78bb..31bf0c0 100644 +index 45bc869ffc0a..1d4c9248d2db 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c -@@ -1151,8 +1151,10 @@ gst_base_parse_sink_event_default (GstBaseParse * parse, GstEvent * event) - +@@ -1358,8 +1358,9 @@ gst_base_parse_sink_event_default (GstBaseParse * parse, GstEvent * event) /* If we STILL have zero frames processed, fire an error */ - if (parse->priv->framecount == 0) { + if (parse->priv->framecount == 0 && !parse->priv->saw_gaps && + !parse->priv->first_buffer) { - GST_ELEMENT_ERROR (parse, STREAM, WRONG_TYPE, - ("No valid frames found before end of stream"), (NULL)); + /* GST_ELEMENT_ERROR (parse, STREAM, WRONG_TYPE, + ("No valid frames found before end of stream"), (NULL));*/ + GST_ERROR_OBJECT(parse, "No valid frames decoded before end of stream"); -+ } - /* newsegment and other serialized events before eos */ - gst_base_parse_push_pending_events (parse); --- -1.7.9.5 - + + if (!parse->priv->saw_gaps diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0002-Fix-crash-with-gst-inspect-Chris-Lord-chris-openedha.patch b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0002-Fix-crash-with-gst-inspect-Chris-Lord-chris-openedha.patch new file mode 100644 index 000000000..46bba8597 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0002-Fix-crash-with-gst-inspect-Chris-Lord-chris-openedha.patch @@ -0,0 +1,29 @@ +From: Carlos Rafael Giani +Date: Sat, 6 Apr 2013 23:52:11 +0200 +Subject: [PATCH] Fix crash with gst-inspect Chris Lord + +Upstream-Status: Pending + +Signed-off-by: Carlos Rafael Giani + +Conflicts: + tools/gst-inspect.c + +Signed-off-by: Lyon Wang +--- + tools/gst-inspect.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c +index 845f52e82f23..7c99e647aa8e 100644 +--- a/tools/gst-inspect.c ++++ b/tools/gst-inspect.c +@@ -1511,7 +1511,7 @@ main (int argc, char *argv[]) + g_option_context_add_main_entries (ctx, options, GETTEXT_PACKAGE); + g_option_context_add_group (ctx, gst_init_get_option_group ()); + if (!g_option_context_parse (ctx, &argc, &argv, &err)) { +- g_printerr ("Error initializing: %s\n", err->message); ++ g_printerr ("Error initializing: %s\n", err ? err->message : "(null)"); + g_clear_error (&err); + g_option_context_free (ctx); + return -1; diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0003-unset-FLAG_DISCONT-when-push-to-adapter.patch b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0003-unset-FLAG_DISCONT-when-push-to-adapter.patch new file mode 100644 index 000000000..bde65c43f --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0003-unset-FLAG_DISCONT-when-push-to-adapter.patch @@ -0,0 +1,30 @@ +From: Lyon Wang +Date: Wed, 4 Nov 2015 18:16:52 +0800 +Subject: [PATCH] unset FLAG_DISCONT when push to adapter + +Since DISCONT flag will be handled by priv->discont flag. +There is no need to copy DISCONT flag to adapter. +Otherwise, the DISCONT flag will alwasys been set on each frame, +for the first chain in buffer. + +https://bugzilla.gnome.org/show_bug.cgi?id=757575 + +Upstream-Status: Pending + +Signed-off-by: Lyon Wang +--- + libs/gst/base/gstbaseparse.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c +index 1d4c9248d2db..18667cc4edca 100644 +--- a/libs/gst/base/gstbaseparse.c ++++ b/libs/gst/base/gstbaseparse.c +@@ -3160,6 +3160,7 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) + parse->priv->discont = TRUE; + } + } ++ GST_BUFFER_FLAG_UNSET(buffer, GST_BUFFER_FLAG_DISCONT); + gst_adapter_push (parse->priv->adapter, buffer); + } + diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0004-Need-push-adapter-remainning-data-in-pass-through-mo.patch b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0004-Need-push-adapter-remainning-data-in-pass-through-mo.patch new file mode 100644 index 000000000..b42cc305f --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0004-Need-push-adapter-remainning-data-in-pass-through-mo.patch @@ -0,0 +1,50 @@ +From: Lyon Wang +Date: Fri, 15 Jan 2016 17:30:14 +0800 +Subject: [PATCH] Need push adapter remainning data in pass through mode + +When switching to pass through mode, there might be remainning +data in the adpater, and it will be no chance to push to downstream when +in pass through mode. +So need check adapter available data and push downstream to avoid missing data + +package: gstreamer1.0 +ticket https://bugzilla.gnome.org/show_bug.cgi?id=760513 +Upstream-Status: Pending + +Signed-off-by: Lyon Wang +Signed-off-by: Lyon Wang +--- + libs/gst/base/gstbaseparse.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + mode change 100644 => 100755 libs/gst/base/gstbaseparse.c + +diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c +old mode 100644 +new mode 100755 +index 18667cc4edca..5d22e33a6f98 +--- a/libs/gst/base/gstbaseparse.c ++++ b/libs/gst/base/gstbaseparse.c +@@ -3141,6 +3141,23 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) + && parse->priv->passthrough)) { + GstBaseParseFrame frame; + ++ av = gst_adapter_available (parse->priv->adapter); ++ if (av) { ++ tmpbuf = gst_adapter_get_buffer (parse->priv->adapter, av); ++ ++ if (parse->priv->upstream_format == GST_FORMAT_TIME) { ++ tmpbuf = gst_buffer_make_writable (tmpbuf); ++ GST_BUFFER_PTS (tmpbuf) = parse->priv->next_pts; ++ GST_BUFFER_DTS (tmpbuf) = parse->priv->next_dts; ++ GST_BUFFER_DURATION (tmpbuf) = GST_CLOCK_TIME_NONE; ++ } ++ ++ ret = gst_pad_push (parse->srcpad, tmpbuf); ++ ++ gst_adapter_clear (parse->priv->adapter); ++ ++ } ++ + gst_base_parse_frame_init (&frame); + frame.buffer = gst_buffer_make_writable (buffer); + ret = gst_base_parse_push_frame (parse, &frame); diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0005-inputselector-should-proceed-non-active-pad-buffer-e.patch b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0005-inputselector-should-proceed-non-active-pad-buffer-e.patch new file mode 100644 index 000000000..f1b5c793c --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-1.8.3/0005-inputselector-should-proceed-non-active-pad-buffer-e.patch @@ -0,0 +1,48 @@ +From: Song Bing +Date: Wed, 11 May 2016 16:57:23 +0800 +Subject: [PATCH] inputselector: should proceed non-active pad buffer even if + active pad reach eos + +non-active pad will be blocked if active pad reach eos in inputselector. +Which will cause all pipeline be blocked. +Inputselector should proceed non-active pad buffer based on clock even +if active pad reach eos +Change to sync with clock for better user experience. + +https://bugzilla.gnome.org/show_bug.cgi?id=766261 + +Upstream status: pending + +Signed-off-by: Song Bing bing.song@nxp.com +--- + plugins/elements/gstinputselector.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/plugins/elements/gstinputselector.c b/plugins/elements/gstinputselector.c +index 4af219047e09..441a4e40abba 100644 +--- a/plugins/elements/gstinputselector.c ++++ b/plugins/elements/gstinputselector.c +@@ -763,7 +763,7 @@ gst_input_selector_wait_running_time (GstInputSelector * sel, + } + + cur_running_time = GST_CLOCK_TIME_NONE; +- if (sel->sync_mode == GST_INPUT_SELECTOR_SYNC_MODE_CLOCK) { ++ if (sel->sync_mode == GST_INPUT_SELECTOR_SYNC_MODE_CLOCK || active_selpad->eos) { + clock = gst_element_get_clock (GST_ELEMENT_CAST (sel)); + if (clock) { + GstClockTime base_time; +@@ -805,7 +805,13 @@ gst_input_selector_wait_running_time (GstInputSelector * sel, + "Waiting for active streams to advance. %" GST_TIME_FORMAT " >= %" + GST_TIME_FORMAT, GST_TIME_ARGS (running_time), + GST_TIME_ARGS (cur_running_time)); +- GST_INPUT_SELECTOR_WAIT (sel); ++ if (active_selpad->eos) { ++ GST_INPUT_SELECTOR_UNLOCK (sel); ++ g_usleep (5000); ++ GST_INPUT_SELECTOR_LOCK (sel); ++ } else { ++ GST_INPUT_SELECTOR_WAIT (sel); ++ } + } else { + GST_INPUT_SELECTOR_UNLOCK (sel); + break; diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bbappend b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bbappend deleted file mode 100644 index 6c22bfc03..000000000 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright (C) 2015 Digi International - -FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:" - -SRC_URI += "file://0001-baseparse-handle-base-parse-error.patch" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bbappend b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bbappend new file mode 100644 index 000000000..6126a80f7 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0_1.8.3.bbappend @@ -0,0 +1,11 @@ +# Copyright 2015-2017, Digi International Inc. + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:" + +SRC_URI_append = " \ + file://0001-handle-base-parse-error.patch \ + file://0002-Fix-crash-with-gst-inspect-Chris-Lord-chris-openedha.patch \ + file://0003-unset-FLAG_DISCONT-when-push-to-adapter.patch \ + file://0004-Need-push-adapter-remainning-data-in-pass-through-mo.patch \ + file://0005-inputselector-should-proceed-non-active-pad-buffer-e.patch \ +"