gstreamer1.0-omx: refresh and clean-up patches

fixes:

    WARNING: gstreamer1.0-omx-1.12.4-r0 do_patch:
    Some of the context lines in patches were ignored. This can lead to incorrectly applied patches.
    The context lines in the patches can be updated with devtool:

        devtool modify <recipe>
        devtool finish --force-patch-refresh <recipe> <layer_path>

    Then the updated patches and the source tree (in devtool's workspace)
    should be reviewed to make sure the patches apply in the correct place
    and don't introduce duplicate lines (which can, and does happen
    when some of the context is ignored). Further information:
    http://lists.openembedded.org/pipermail/openembedded-core/2018-March/148675.html
    https://bugzilla.yoctoproject.org/show_bug.cgi?id=10450
    Details:
    Applying patch 0001-config-files-path.patch
    patching file config/bellagio/gstomx.conf
    Hunk #1 succeeded at 1 with fuzz 2.
    Hunk #2 succeeded at 9 with fuzz 2.
    patching file config/rpi/gstomx.conf
    Hunk #8 succeeded at 63 with fuzz 2.
    Hunk #10 succeeded at 82 with fuzz 2.
    Hunk #11 succeeded at 92 with fuzz 2.

    Now at patch 0001-config-files-path.patch

deleted obsolete `gstreamer1.0-omx` directory with duplicated patches that are also in `gstreamer1.0-omx-1.12`.
made file naming for `gstreamer1.0-omx_%.bbappend` consistent with the rest of the layer recipes.

Signed-off-by: Hugo Hromic <hhromic@gmail.com>
This commit is contained in:
Hugo Hromic 2018-03-21 16:20:22 +00:00 committed by Andrei Gherzan
parent f86f9f0013
commit 415c1998a6
11 changed files with 68 additions and 297 deletions

View File

@ -1,4 +1,4 @@
From 2e111e52f96f0b942abda120c30a876629bd73fc Mon Sep 17 00:00:00 2001 From cfb432fcd8868c7a4f32010c61e47e2bf0ff80c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com> From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
Date: Mon, 25 May 2015 14:53:35 +0200 Date: Mon, 25 May 2015 14:53:35 +0200
Subject: [PATCH] Don't try to acquire buffer when src pad isn't active Subject: [PATCH] Don't try to acquire buffer when src pad isn't active
@ -23,15 +23,16 @@ arrive:
gst_omx_video_dec_loop() gst_omx_video_dec_loop()
gst_omx_port_acquire_buffer() gst_omx_port_acquire_buffer()
gst_omx_component_wait_message() gst_omx_component_wait_message()
--- ---
omx/gstomxvideodec.c | 5 +++++ omx/gstomxvideodec.c | 5 +++++
1 file changed, 5 insertions(+) 1 file changed, 5 insertions(+)
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index cd24944..57a61dd 100644 index d12ee8f..fb0100a 100644
--- a/omx/gstomxvideodec.c --- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c
@@ -1247,6 +1247,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self) @@ -1250,6 +1250,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
GstClockTimeDiff deadline; GstClockTimeDiff deadline;
OMX_ERRORTYPE err; OMX_ERRORTYPE err;
@ -43,6 +44,3 @@ index cd24944..57a61dd 100644
#if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL) #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
port = self->eglimage ? self->egl_out_port : self->dec_out_port; port = self->eglimage ? self->egl_out_port : self->dec_out_port;
#else #else
--
1.8.3.2

View File

@ -1,3 +1,14 @@
From 0dc88ed881eb8420dad4cf0934a900d85b6ef313 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 11 Feb 2016 12:53:20 -0800
---
config/bellagio/gstomx.conf | 8 ++++----
config/rpi/gstomx.conf | 22 +++++++++++-----------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/config/bellagio/gstomx.conf b/config/bellagio/gstomx.conf
index 5ca8ba6..8931255 100644
--- a/config/bellagio/gstomx.conf --- a/config/bellagio/gstomx.conf
+++ b/config/bellagio/gstomx.conf +++ b/config/bellagio/gstomx.conf
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@ -6,18 +17,18 @@
-core-name=/usr/local/lib/libomxil-bellagio.so.0 -core-name=/usr/local/lib/libomxil-bellagio.so.0
+core-name=/usr/lib/libomxil-bellagio.so.0 +core-name=/usr/lib/libomxil-bellagio.so.0
component-name=OMX.st.video_decoder.mpeg4 component-name=OMX.st.video_decoder.mpeg4
rank=256 rank=257
in-port-index=0 in-port-index=0
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-chang
[omxh264dec] [omxh264dec]
type-name=GstOMXH264Dec type-name=GstOMXH264Dec
-core-name=/usr/local/lib/libomxil-bellagio.so.0 -core-name=/usr/local/lib/libomxil-bellagio.so.0
+core-name=/usr/lib/libomxil-bellagio.so.0 +core-name=/usr/lib/libomxil-bellagio.so.0
component-name=OMX.st.video_decoder.avc component-name=OMX.st.video_decoder.avc
rank=256 rank=257
in-port-index=0 in-port-index=0
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-chang
[omxmpeg4videoenc] [omxmpeg4videoenc]
type-name=GstOMXMPEG4VideoEnc type-name=GstOMXMPEG4VideoEnc
@ -26,7 +37,7 @@
component-name=OMX.st.video_encoder.mpeg4 component-name=OMX.st.video_encoder.mpeg4
rank=0 rank=0
in-port-index=0 in-port-index=0
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;video-framerate-integer;s
[omxaacenc] [omxaacenc]
type-name=GstOMXAACEnc type-name=GstOMXAACEnc
@ -35,6 +46,8 @@
component-name=OMX.st.audio_encoder.aac component-name=OMX.st.audio_encoder.aac
rank=0 rank=0
in-port-index=0 in-port-index=0
diff --git a/config/rpi/gstomx.conf b/config/rpi/gstomx.conf
index d3ea56a..2508dae 100644
--- a/config/rpi/gstomx.conf --- a/config/rpi/gstomx.conf
+++ b/config/rpi/gstomx.conf +++ b/config/rpi/gstomx.conf
@@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@ -45,7 +58,7 @@
component-name=OMX.broadcom.video_decode component-name=OMX.broadcom.video_decode
rank=257 rank=257
in-port-index=130 in-port-index=130
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@ hacks=no-component-role
[omxmpeg4videodec] [omxmpeg4videodec]
type-name=GstOMXMPEG4VideoDec type-name=GstOMXMPEG4VideoDec
@ -54,7 +67,7 @@
component-name=OMX.broadcom.video_decode component-name=OMX.broadcom.video_decode
rank=257 rank=257
in-port-index=130 in-port-index=130
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@ hacks=no-component-role
[omxh263dec] [omxh263dec]
type-name=GstOMXH263Dec type-name=GstOMXH263Dec
@ -63,7 +76,7 @@
component-name=OMX.broadcom.video_decode component-name=OMX.broadcom.video_decode
rank=257 rank=257
in-port-index=130 in-port-index=130
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@ hacks=no-component-role
[omxh264dec] [omxh264dec]
type-name=GstOMXH264Dec type-name=GstOMXH264Dec
@ -72,7 +85,7 @@
component-name=OMX.broadcom.video_decode component-name=OMX.broadcom.video_decode
rank=257 rank=257
in-port-index=130 in-port-index=130
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@ hacks=no-component-role;signals-premature-eos
[omxtheoradec] [omxtheoradec]
type-name=GstOMXTheoraDec type-name=GstOMXTheoraDec
@ -81,7 +94,7 @@
component-name=OMX.broadcom.video_decode component-name=OMX.broadcom.video_decode
rank=257 rank=257
in-port-index=130 in-port-index=130
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@ hacks=no-component-role
[omxvp8dec] [omxvp8dec]
type-name=GstOMXVP8Dec type-name=GstOMXVP8Dec
@ -90,7 +103,7 @@
component-name=OMX.broadcom.video_decode component-name=OMX.broadcom.video_decode
rank=257 rank=257
in-port-index=130 in-port-index=130
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@ hacks=no-component-role
[omxmjpegdec] [omxmjpegdec]
type-name=GstOMXMJPEGDec type-name=GstOMXMJPEGDec
@ -99,16 +112,16 @@
component-name=OMX.broadcom.video_decode component-name=OMX.broadcom.video_decode
rank=257 rank=257
in-port-index=130 in-port-index=130
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@ hacks=no-component-role
[omxvc1dec] [omxvc1dec]
type-name=GstOMXWMVDec type-name=GstOMXWMVDec
-core-name=/opt/vc/lib/libopenmaxil.so -core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so +core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode component-name=OMX.broadcom.video_decode
rank=256 rank=257
in-port-index=130 in-port-index=130
@@ -73,7 +73,7 @@ @@ -73,7 +73,7 @@ sink-template-caps=video/x-wmv,wmvversion=(int)3,format=(string){WMV3,WVC1},widt
[omxh264enc] [omxh264enc]
type-name=GstOMXH264Enc type-name=GstOMXH264Enc
@ -117,21 +130,21 @@
component-name=OMX.broadcom.video_encode component-name=OMX.broadcom.video_encode
rank=257 rank=257
in-port-index=200 in-port-index=200
@@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@ hacks=no-component-role;no-component-reconfigure
[omxanalogaudiosink] [omxanalogaudiosink]
type-name=GstOMXAnalogAudioSink type-name=GstOMXAnalogAudioSink
-core-name=/opt/vc/lib/libopenmaxil.so -core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so +core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.audio_render component-name=OMX.broadcom.audio_render
rank=256 rank=257
in-port-index=100 in-port-index=100
@@ -92,7 +92,7 @@ @@ -92,7 +92,7 @@ sink-template-caps=audio/x-raw,format=(string){S16LE,S32LE},layout=(string)inter
[omxhdmiaudiosink] [omxhdmiaudiosink]
type-name=GstOMXHdmiAudioSink type-name=GstOMXHdmiAudioSink
-core-name=/opt/vc/lib/libopenmaxil.so -core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so +core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.audio_render component-name=OMX.broadcom.audio_render
rank=257 rank=258
in-port-index=100 in-port-index=100

View File

@ -1,8 +1,16 @@
From fc4773f36aa31b4ae0fc97d3aa3f94db0c88f194 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 11 Feb 2016 12:53:20 -0800
---
omx/gstomx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/omx/gstomx.c b/omx/gstomx.c diff --git a/omx/gstomx.c b/omx/gstomx.c
index 69696c4..c382019 100644 index 0237f3c..45732c3 100644
--- a/omx/gstomx.c --- a/omx/gstomx.c
+++ b/omx/gstomx.c +++ b/omx/gstomx.c
@@ -1508,8 +1508,8 @@ gst_omx_port_set_flushing (GstOMXPort * port, GstClockTime timeout, @@ -1538,8 +1538,8 @@ gst_omx_port_set_flushing (GstOMXPort * port, GstClockTime timeout,
last_error = OMX_ErrorNone; last_error = OMX_ErrorNone;
gst_omx_component_handle_messages (comp); gst_omx_component_handle_messages (comp);
while (signalled && last_error == OMX_ErrorNone && !port->flushed while (signalled && last_error == OMX_ErrorNone && !port->flushed
@ -13,4 +21,3 @@ index 69696c4..c382019 100644
signalled = gst_omx_component_wait_message (comp, timeout); signalled = gst_omx_component_wait_message (comp, timeout);
if (signalled) if (signalled)
gst_omx_component_handle_messages (comp); gst_omx_component_handle_messages (comp);

View File

@ -1,8 +1,16 @@
From 02e49cba402a783fa1b30e445b83a5c280949c1e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 13 Feb 2016 11:42:29 -0800
---
omx/gstomxvideodec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index 0d4e7a1..a0d9c74 100644 index fb0100a..bad6335 100644
--- a/omx/gstomxvideodec.c --- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c
@@ -1697,9 +1697,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder) @@ -1713,9 +1713,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder)
g_cond_broadcast (&self->drain_cond); g_cond_broadcast (&self->drain_cond);
g_mutex_unlock (&self->drain_lock); g_mutex_unlock (&self->drain_lock);

View File

@ -1,20 +1,20 @@
From 80dddfd13aaf2fe7272765f8cf291215fe375e28 Mon Sep 17 00:00:00 2001 From f00912f0628aff15e882bdc1619f5de1ddf5c720 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com> From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
Date: Tue, 17 Nov 2015 16:51:27 +0000 Date: Tue, 17 Nov 2015 16:51:27 +0000
Subject: [PATCH] Properly handle drain requests while flushing Subject: [PATCH] Properly handle drain requests while flushing
Without this commit the decoder streaming thread stops without ever attending Without this commit the decoder streaming thread stops without ever attending
the drain request, leaving the decoder input thread waiting forever. the drain request, leaving the decoder input thread waiting forever.
---
omx/gstomx.c | 7 +++++++
omx/gstomxvideodec.c | 13 +++++++++++++
2 files changed, 20 insertions(+)
Index: gst-omx-1.10.2/omx/gstomx.c ---
=================================================================== omx/gstomx.c | 7 +++++++
--- gst-omx-1.10.2.orig/omx/gstomx.c 1 file changed, 7 insertions(+)
+++ gst-omx-1.10.2/omx/gstomx.c
@@ -737,6 +737,13 @@ gst_omx_component_new (GstObject * paren diff --git a/omx/gstomx.c b/omx/gstomx.c
index 45732c3..784a5d7 100644
--- a/omx/gstomx.c
+++ b/omx/gstomx.c
@@ -737,6 +737,13 @@ gst_omx_component_new (GstObject * parent, const gchar * core_name,
g_mutex_lock (&comp->lock); g_mutex_lock (&comp->lock);
gst_omx_component_handle_messages (comp); gst_omx_component_handle_messages (comp);

View File

@ -1,4 +1,4 @@
From 12103842d5f347cf245e71071d0c44297bcdb1f9 Mon Sep 17 00:00:00 2001 From 0d2ad639e6158c8023c157e206ef3ff7abdc089c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com> From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
Date: Fri, 4 Dec 2015 18:39:59 +0100 Date: Fri, 4 Dec 2015 18:39:59 +0100
Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a
@ -9,10 +9,10 @@ Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a
1 file changed, 4 insertions(+), 1 deletion(-) 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index 2368f34..da35e0d 100644 index bad6335..c63b972 100644
--- a/omx/gstomxvideodec.c --- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c
@@ -1905,8 +1905,11 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder, @@ -1911,8 +1911,11 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
5 * GST_SECOND) != OMX_ErrorNone) 5 * GST_SECOND) != OMX_ErrorNone)
return FALSE; return FALSE;
if (gst_omx_port_wait_buffers_released (out_port, if (gst_omx_port_wait_buffers_released (out_port,
@ -25,6 +25,3 @@ index 2368f34..da35e0d 100644
if (gst_omx_port_deallocate_buffers (self->dec_in_port) != OMX_ErrorNone) if (gst_omx_port_deallocate_buffers (self->dec_in_port) != OMX_ErrorNone)
return FALSE; return FALSE;
if (gst_omx_video_dec_deallocate_output_buffers (self) != OMX_ErrorNone) if (gst_omx_video_dec_deallocate_output_buffers (self) != OMX_ErrorNone)
--
2.1.4

View File

@ -1,137 +0,0 @@
--- a/config/bellagio/gstomx.conf
+++ b/config/bellagio/gstomx.conf
@@ -1,6 +1,6 @@
[omxmpeg4videodec]
type-name=GstOMXMPEG4VideoDec
-core-name=/usr/local/lib/libomxil-bellagio.so.0
+core-name=/usr/lib/libomxil-bellagio.so.0
component-name=OMX.st.video_decoder.mpeg4
rank=256
in-port-index=0
@@ -9,7 +9,7 @@
[omxh264dec]
type-name=GstOMXH264Dec
-core-name=/usr/local/lib/libomxil-bellagio.so.0
+core-name=/usr/lib/libomxil-bellagio.so.0
component-name=OMX.st.video_decoder.avc
rank=256
in-port-index=0
@@ -18,7 +18,7 @@
[omxmpeg4videoenc]
type-name=GstOMXMPEG4VideoEnc
-core-name=/usr/local/lib/libomxil-bellagio.so.0
+core-name=/usr/lib/libomxil-bellagio.so.0
component-name=OMX.st.video_encoder.mpeg4
rank=0
in-port-index=0
@@ -27,7 +27,7 @@
[omxaacenc]
type-name=GstOMXAACEnc
-core-name=/usr/local/lib/libomxil-bellagio.so.0
+core-name=/usr/lib/libomxil-bellagio.so.0
component-name=OMX.st.audio_encoder.aac
rank=0
in-port-index=0
--- a/config/rpi/gstomx.conf
+++ b/config/rpi/gstomx.conf
@@ -1,6 +1,6 @@
[omxmpeg2videodec]
type-name=GstOMXMPEG2VideoDec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=257
in-port-index=130
@@ -9,7 +9,7 @@
[omxmpeg4videodec]
type-name=GstOMXMPEG4VideoDec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=257
in-port-index=130
@@ -18,7 +18,7 @@
[omxh263dec]
type-name=GstOMXH263Dec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=257
in-port-index=130
@@ -27,7 +27,7 @@
[omxh264dec]
type-name=GstOMXH264Dec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=257
in-port-index=130
@@ -36,7 +36,7 @@
[omxtheoradec]
type-name=GstOMXTheoraDec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=257
in-port-index=130
@@ -45,7 +45,7 @@
[omxvp8dec]
type-name=GstOMXVP8Dec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=257
in-port-index=130
@@ -54,7 +54,7 @@
[omxmjpegdec]
type-name=GstOMXMJPEGDec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=257
in-port-index=130
@@ -63,7 +63,7 @@
[omxvc1dec]
type-name=GstOMXWMVDec
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_decode
rank=256
in-port-index=130
@@ -73,7 +73,7 @@
[omxh264enc]
type-name=GstOMXH264Enc
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.video_encode
rank=257
in-port-index=200
@@ -82,7 +82,7 @@
[omxanalogaudiosink]
type-name=GstOMXAnalogAudioSink
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.audio_render
rank=256
in-port-index=100
@@ -92,7 +92,7 @@
[omxhdmiaudiosink]
type-name=GstOMXHdmiAudioSink
-core-name=/opt/vc/lib/libopenmaxil.so
+core-name=/usr/lib/libopenmaxil.so
component-name=OMX.broadcom.audio_render
rank=257
in-port-index=100

View File

@ -1,16 +0,0 @@
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index 0d4e7a1..a0d9c74 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -1697,9 +1697,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder)
g_cond_broadcast (&self->drain_cond);
g_mutex_unlock (&self->drain_lock);
- gst_omx_component_get_state (self->dec, 5 * GST_SECOND);
+ gst_omx_component_get_state (self->dec, 0);
#if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
- gst_omx_component_get_state (self->egl_render, 1 * GST_SECOND);
+ gst_omx_component_get_state (self->egl_render, 0);
#endif
gst_buffer_replace (&self->codec_data, NULL);

View File

@ -1,69 +0,0 @@
From 80dddfd13aaf2fe7272765f8cf291215fe375e28 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
Date: Tue, 17 Nov 2015 16:51:27 +0000
Subject: [PATCH] Properly handle drain requests while flushing
Without this commit the decoder streaming thread stops without ever attending
the drain request, leaving the decoder input thread waiting forever.
---
omx/gstomx.c | 7 +++++++
omx/gstomxvideodec.c | 13 +++++++++++++
2 files changed, 20 insertions(+)
diff --git a/omx/gstomx.c b/omx/gstomx.c
index 69696c4..f0cd890 100644
--- a/omx/gstomx.c
+++ b/omx/gstomx.c
@@ -830,6 +830,13 @@ gst_omx_component_set_state (GstOMXComponent * comp, OMX_STATETYPE state)
done:
gst_omx_component_handle_messages (comp);
+
+ if (err != OMX_ErrorNone && comp->last_error == OMX_ErrorNone) {
+ GST_ERROR_OBJECT (comp->parent,
+ "Last operation returned an error. Setting last_error manually.");
+ comp->last_error = err;
+ }
+
g_mutex_unlock (&comp->lock);
if (err != OMX_ErrorNone) {
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index d531f75..a26c4a6 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -1539,9 +1539,16 @@ component_error:
flushing:
{
GST_DEBUG_OBJECT (self, "Flushing -- stopping task");
+
+ g_mutex_lock (&self->drain_lock);
+ if (self->draining) {
+ self->draining = FALSE;
+ g_cond_broadcast (&self->drain_cond);
+ }
gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self));
self->downstream_flow_ret = GST_FLOW_FLUSHING;
self->started = FALSE;
+ g_mutex_unlock (&self->drain_lock);
return;
}
@@ -1599,8 +1606,14 @@ flow_error:
self->started = FALSE;
} else if (flow_ret == GST_FLOW_FLUSHING) {
GST_DEBUG_OBJECT (self, "Flushing -- stopping task");
+ g_mutex_lock (&self->drain_lock);
+ if (self->draining) {
+ self->draining = FALSE;
+ g_cond_broadcast (&self->drain_cond);
+ }
gst_pad_pause_task (GST_VIDEO_DECODER_SRC_PAD (self));
self->started = FALSE;
+ g_mutex_unlock (&self->drain_lock);
}
GST_VIDEO_DECODER_STREAM_UNLOCK (self);
return;
--
1.8.3.2

View File

@ -1,30 +0,0 @@
From 12103842d5f347cf245e71071d0c44297bcdb1f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
Date: Fri, 4 Dec 2015 18:39:59 +0100
Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a
timeout releasing the buffers taken by the egl_render out port
---
omx/gstomxvideodec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index 2368f34..da35e0d 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -1905,8 +1905,11 @@ gst_omx_video_dec_set_format (GstVideoDecoder * decoder,
5 * GST_SECOND) != OMX_ErrorNone)
return FALSE;
if (gst_omx_port_wait_buffers_released (out_port,
- 1 * GST_SECOND) != OMX_ErrorNone)
+ 1 * GST_SECOND) != OMX_ErrorNone) {
+#if !(defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL))
return FALSE;
+#endif
+ }
if (gst_omx_port_deallocate_buffers (self->dec_in_port) != OMX_ErrorNone)
return FALSE;
if (gst_omx_video_dec_deallocate_output_buffers (self) != OMX_ErrorNone)
--
2.1.4