diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.4.5/0005-Fix_alaw_mulaw_channel_position.patch b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.4.5/0005-Fix_alaw_mulaw_channel_position.patch deleted file mode 100644 index 066d9fcf6..000000000 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.4.5/0005-Fix_alaw_mulaw_channel_position.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Lyon Wang -Date: Thu, 18 Jun 2015 17:38:09 +0800 -Subject: [PATCH] audioringbuffer: Fix alaw/mulaw channel positions - - For alaw/mulaw we should also try to initialize the channel positions in the - ringbuffer's audio info. This allow pulsesink to directly use the channel - positions instead of using the default zero-initialized ones, which doesn't - work well. - -Bugzilla URL: https://bugzilla.gnome.org/show_bug.cgi?id=751144 - -Upstream-Status: Backport [1.5.2] - -diff --git a/gst-libs/gst/audio/gstaudioringbuffer.c b/gst-libs/gst/audio/gstaudioringbuffer.c -index 7f4b17b017d6..66335250fc5c 100644 ---- a/gst-libs/gst/audio/gstaudioringbuffer.c -+++ b/gst-libs/gst/audio/gstaudioringbuffer.c -@@ -218,6 +218,10 @@ gst_audio_ring_buffer_parse_caps (GstAudioRingBufferSpec * spec, GstCaps * caps) - gst_structure_get_int (structure, "channels", &info.channels))) - goto parse_error; - -+ if (!(gst_audio_channel_positions_from_mask (info.channels, 0, -+ info.position))) -+ goto parse_error; -+ - spec->type = GST_AUDIO_RING_BUFFER_FORMAT_TYPE_A_LAW; - info.bpf = info.channels; - } else if (g_str_equal (mimetype, "audio/x-mulaw")) { -@@ -226,6 +230,10 @@ gst_audio_ring_buffer_parse_caps (GstAudioRingBufferSpec * spec, GstCaps * caps) - gst_structure_get_int (structure, "channels", &info.channels))) - goto parse_error; - -+ if (!(gst_audio_channel_positions_from_mask (info.channels, 0, -+ info.position))) -+ goto parse_error; -+ - spec->type = GST_AUDIO_RING_BUFFER_FORMAT_TYPE_MU_LAW; - info.bpf = info.channels; - } else if (g_str_equal (mimetype, "audio/x-iec958")) { diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch new file mode 100644 index 000000000..ace9590b1 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch @@ -0,0 +1,75 @@ +From: Mingke Wang +Date: Fri, 16 Oct 2015 19:31:32 +0800 +Subject: [PATCH] basetextoverlay: make memory copy when video buffer's memory + is ready only + +1. since gst_buffer_make_writable just lookup the refcount to determine if + a buffer is writable, and it will use _gst_buffer_copy() which don't + perform a deep memory copy even if the flag of a memory is set to + GST_MEMORY_FLAG_READONLY. So, we detect the memory flag and use + gst_buffer_copy_region with GST_BUFFER_COPY_DEEP parameter to perform + deep memory copy. if the allocator of a memory don't support mem_copy + interface, the it will return NULL, if this case, we can use + gst_buffer_make_writable() to get a shared memory buffer or the orignal + buffer if the buffer's refcount is 1. + +Signed-off-by: Mingke Wang +Signed-off-by: Lyon Wang +--- + ext/pango/gstbasetextoverlay.c | 32 ++++++++++++++++++++++++++++++-- + 1 file changed, 30 insertions(+), 2 deletions(-) + mode change 100644 => 100755 ext/pango/gstbasetextoverlay.c + +diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c +old mode 100644 +new mode 100755 +index e3de7c1eaa1d..50981a77c0c9 +--- a/ext/pango/gstbasetextoverlay.c ++++ b/ext/pango/gstbasetextoverlay.c +@@ -2220,16 +2220,44 @@ gst_base_text_overlay_push_frame (GstBaseTextOverlay * overlay, + if (gst_pad_check_reconfigure (overlay->srcpad)) + gst_base_text_overlay_negotiate (overlay, NULL); + +- video_frame = gst_buffer_make_writable (video_frame); +- + if (overlay->attach_compo_to_buffer) { + GST_DEBUG_OBJECT (overlay, "Attaching text overlay image to video buffer"); ++ video_frame = gst_buffer_make_writable (video_frame); + gst_buffer_add_video_overlay_composition_meta (video_frame, + overlay->composition); + /* FIXME: emulate shaded background box if want_shading=true */ + goto done; + } + ++ gint idx = 0; ++ gboolean mem_rdonly = FALSE; ++ GstMemory *mem; ++ ++ while (mem = gst_buffer_get_memory(video_frame, idx++)) { ++ if (GST_MEMORY_IS_READONLY(mem)) { ++ gst_memory_unref (mem); ++ mem_rdonly = TRUE; ++ break; ++ } ++ gst_memory_unref (mem); ++ } ++ ++ if (mem_rdonly) { ++ GstBuffer *new_buf = gst_buffer_copy_region (video_frame, ++ GST_BUFFER_COPY_ALL | GST_BUFFER_COPY_DEEP, 0, -1); ++ ++ if (!new_buf) { ++ GST_WARNING_OBJECT(overlay, ++ "buffer memory read only, but copy memory failed"); ++ goto done; ++ } else { ++ gst_buffer_unref (video_frame); ++ video_frame = new_buf; ++ } ++ } else { ++ video_frame = gst_buffer_make_writable (video_frame); ++ } ++ + if (!gst_video_frame_map (&frame, &overlay->info, video_frame, + GST_MAP_READWRITE)) + goto invalid_frame; diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch new file mode 100644 index 000000000..75b0c7153 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch @@ -0,0 +1,31 @@ +From: Mingke Wang +Date: Thu, 19 Mar 2015 14:15:25 +0800 +Subject: [PATCH] gstplaysink: don't set async of custom text-sink to false + +set async to false lead to A/V sync problem when seeking. +the preroll need use GAP event instead of set async to false. + +Upstream Status: Inappropriate [i.MX specific] + +Signed-off-by: Mingke Wang +Signed-off-by: Lyon Wang +--- + gst/playback/gstplaysink.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + mode change 100644 => 100755 gst/playback/gstplaysink.c + +diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c +old mode 100644 +new mode 100755 +index e17c4392af4e..d12a11a7bcd7 +--- a/gst/playback/gstplaysink.c ++++ b/gst/playback/gstplaysink.c +@@ -2433,7 +2433,7 @@ gen_text_chain (GstPlaySink * playsink) + G_TYPE_BOOLEAN); + if (elem) { + /* make sure the sparse subtitles don't participate in the preroll */ +- g_object_set (elem, "async", FALSE, NULL); ++ //g_object_set (elem, "async", FALSE, NULL); + GST_DEBUG_OBJECT (playsink, "adding custom text sink"); + gst_bin_add (bin, chain->sink); + /* NOTE streamsynchronizer needs streams decoupled */ diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0003-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0003-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch new file mode 100644 index 000000000..3e01380e7 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0003-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch @@ -0,0 +1,54 @@ +From: Lyon Wang +Date: Wed, 21 Oct 2015 16:35:43 +0800 +Subject: [PATCH] taglist not send to down stream if all the frame corrupted + +https://bugzilla.gnome.org/show_bug.cgi?id=737246 + +Upstream status: Pending + +Signed-off-by: Jian Li +Signed-off-by: Lyon Wang +--- + gst-libs/gst/audio/gstaudiodecoder.c | 9 +++++++++ + gst-libs/gst/video/gstvideodecoder.c | 8 ++++++++ + 2 files changed, 17 insertions(+) + +diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c +index 8c43cbb74e33..cf73691c0d46 100644 +--- a/gst-libs/gst/audio/gstaudiodecoder.c ++++ b/gst-libs/gst/audio/gstaudiodecoder.c +@@ -2279,6 +2279,15 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event) + ("no valid frames found")); + } + ++ /* send taglist if no valid frame is decoded util EOS */ ++ if (dec->priv->taglist && dec->priv->taglist_changed) { ++ GST_DEBUG_OBJECT (dec, "codec tag %" GST_PTR_FORMAT, dec->priv->taglist); ++ if (!gst_tag_list_is_empty (dec->priv->taglist)) ++ gst_audio_decoder_push_event (dec, ++ gst_event_new_tag (gst_tag_list_ref (dec->priv->taglist))); ++ dec->priv->taglist_changed = FALSE; ++ } ++ + /* Forward EOS because no buffer or serialized event will come after + * EOS and nothing could trigger another _finish_frame() call. */ + if (dec->priv->pending_events) +diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c +index 068b25a681b3..5ba6238555f9 100644 +--- a/gst-libs/gst/video/gstvideodecoder.c ++++ b/gst-libs/gst/video/gstvideodecoder.c +@@ -1176,6 +1176,14 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * decoder, + * parent class' ::sink_event() until a later time. + */ + forward_immediate = TRUE; ++ ++ /* send taglist if no valid frame is decoded util EOS */ ++ if (decoder->priv->tags && decoder->priv->tags_changed) { ++ gst_video_decoder_push_event (decoder, ++ gst_event_new_tag (gst_tag_list_ref (decoder->priv->tags))); ++ decoder->priv->tags_changed = FALSE; ++ } ++ + break; + } + case GST_EVENT_GAP: diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0004-handle-audio-video-decoder-error.patch b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0004-handle-audio-video-decoder-error.patch new file mode 100644 index 000000000..40a6a56db --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0004-handle-audio-video-decoder-error.patch @@ -0,0 +1,62 @@ +From: Lyon Wang +Date: Mon, 15 Dec 2014 16:52:07 +0800 +Subject: [PATCH] handle audio/video decoder error + +When there is input data and no output data to the end of the stream, it will +send GST_ELEMENT_ERROR, So the clips playing will quit. +However, if only one of the tracks is corrupt, there is no need to quit other +tracks playing. + +The patch comments the GST_ELEMENT_ERROR() and just add GST_ERROR_OBJECT() +information instead. + +https://bugzilla.gnome.org/show_bug.cgi?id=741542 + +Upstream Status: Pending + +Signed-off-by: Lyon Wang +--- + gst-libs/gst/audio/gstaudiodecoder.c | 5 +++-- + gst-libs/gst/video/gstvideodecoder.c | 5 +++-- + 2 files changed, 6 insertions(+), 4 deletions(-) + mode change 100644 => 100755 gst-libs/gst/audio/gstaudiodecoder.c + mode change 100644 => 100755 gst-libs/gst/video/gstvideodecoder.c + +diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c +old mode 100644 +new mode 100755 +index cf73691c0d46..0a64c99d3fda +--- a/gst-libs/gst/audio/gstaudiodecoder.c ++++ b/gst-libs/gst/audio/gstaudiodecoder.c +@@ -2274,9 +2274,10 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event) + GST_AUDIO_DECODER_STREAM_UNLOCK (dec); + + if (dec->priv->ctx.had_input_data && !dec->priv->ctx.had_output_data) { +- GST_ELEMENT_ERROR (dec, STREAM, DECODE, ++ /* GST_ELEMENT_ERROR (dec, STREAM, DECODE, + ("No valid frames decoded before end of stream"), +- ("no valid frames found")); ++ ("no valid frames found")); */ ++ GST_ERROR_OBJECT(dec, "No valid frames decoded before end of stream"); + } + + /* send taglist if no valid frame is decoded util EOS */ +diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c +old mode 100644 +new mode 100755 +index 5ba6238555f9..4c90af800b9f +--- a/gst-libs/gst/video/gstvideodecoder.c ++++ b/gst-libs/gst/video/gstvideodecoder.c +@@ -1162,9 +1162,10 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * decoder, + + /* Error out even if EOS was ok when we had input, but no output */ + if (ret && priv->had_input_data && !priv->had_output_data) { +- GST_ELEMENT_ERROR (decoder, STREAM, DECODE, ++ /* GST_ELEMENT_ERROR (decoder, STREAM, DECODE, + ("No valid frames decoded before end of stream"), +- ("no valid frames found")); ++ ("no valid frames found")); */ ++ GST_ERROR_OBJECT(decoder, "No valid frames decoded before end of stream"); + } + + /* Forward EOS immediately. This is required because no diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0005-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0005-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch new file mode 100644 index 000000000..ea6c5bc9d --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0005-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch @@ -0,0 +1,43 @@ +From: Lyon Wang +Date: Tue, 17 Nov 2015 14:56:47 +0800 +Subject: [PATCH] gstaudiobasesink print warning istead of return ERROR. + +For those clips with corrupt audio track, +there might be no output from audio decoder +and thus the audio track have no chance to negotiate. +We can just print error warning instead of return ERROR, +so that other track can be played normally + +https://bugzilla.gnome.org/show_bug.cgi?id=758215 + +Upstream Status: Pending + +Signed-off-by: Lyon Wang +--- + gst-libs/gst/audio/gstaudiobasesink.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + mode change 100644 => 100755 gst-libs/gst/audio/gstaudiobasesink.c + +diff --git a/gst-libs/gst/audio/gstaudiobasesink.c b/gst-libs/gst/audio/gstaudiobasesink.c +old mode 100644 +new mode 100755 +index 62fab35eec10..2f6e6f09b3a5 +--- a/gst-libs/gst/audio/gstaudiobasesink.c ++++ b/gst-libs/gst/audio/gstaudiobasesink.c +@@ -1137,10 +1137,15 @@ gst_audio_base_sink_wait_event (GstBaseSink * bsink, GstEvent * event) + case GST_EVENT_GAP: + /* We must have a negotiated format before starting the ringbuffer */ + if (G_UNLIKELY (!gst_audio_ring_buffer_is_acquired (sink->ringbuffer))) { +- GST_ELEMENT_ERROR (sink, STREAM, FORMAT, (NULL), ++ /* GST_ELEMENT_ERROR (sink, STREAM, FORMAT, (NULL), + ("Sink not negotiated before %s event.", + GST_EVENT_TYPE_NAME (event))); ++ + return GST_FLOW_ERROR; ++ */ ++ /* consider there might be chance that corrupt audio track without output buffer and not negotiated. ++ We'd better not return error and quit play, video track can keep playing.*/ ++ GST_ERROR_OBJECT(sink, "Sink not negotiated before %s event.",GST_EVENT_TYPE_NAME (event)); + } + + gst_audio_base_sink_force_start (sink); diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0006-Disable-orc-optimization-for-lib-video-in-plugins-ba.patch b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0006-Disable-orc-optimization-for-lib-video-in-plugins-ba.patch new file mode 100644 index 000000000..6bdf3c50a --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base-1.8.3/0006-Disable-orc-optimization-for-lib-video-in-plugins-ba.patch @@ -0,0 +1,30 @@ +From: Lyon Wang +Date: Thu, 10 Dec 2015 14:32:43 +0800 +Subject: [PATCH] Disable orc optimization for lib video in plugins-base + +- the orc optimization for lib video in plugins base may +cause segmentation fault +- disalbe orc optimization for lib video and just use the c source + +package: gstreamer1.0-plugins-base +Community ticket: https://bugzilla.gnome.org/show_bug.cgi?id=759286 +Upstream status: pending + +Signed-off-by: Lyon Wang +--- + gst-libs/gst/video/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am +index 44c590a7b88b..b2b5617f693e 100644 +--- a/gst-libs/gst/video/Makefile.am ++++ b/gst-libs/gst/video/Makefile.am +@@ -86,7 +86,7 @@ nodist_libgstvideo_@GST_API_VERSION@include_HEADERS = $(built_headers) + noinst_HEADERS = gstvideoutilsprivate.h + + libgstvideo_@GST_API_VERSION@_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) \ +- $(ORC_CFLAGS) ++ $(ORC_CFLAGS) -DDISABLE_ORC + libgstvideo_@GST_API_VERSION@_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(ORC_LIBS) $(LIBM) + libgstvideo_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) + diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bbappend b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bbappend deleted file mode 100644 index a09cd519d..000000000 --- a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bbappend +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright (C) 2015 Digi International - -FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:" - -SRC_URI += "file://0005-Fix_alaw_mulaw_channel_position.patch" diff --git a/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bbappend b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bbappend new file mode 100644 index 000000000..dd06c5845 --- /dev/null +++ b/meta-digi-dey/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.8.3.bbappend @@ -0,0 +1,12 @@ +# Copyright 2015-2017, Digi International Inc. + +FILESEXTRAPATHS_prepend := "${THISDIR}/${BP}:" + +SRC_URI_append = " \ + 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-taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \ + file://0004-handle-audio-video-decoder-error.patch \ + file://0005-gstaudiobasesink-print-warning-istead-of-return-ERRO.patch \ + file://0006-Disable-orc-optimization-for-lib-video-in-plugins-ba.patch \ +"