summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2019-05-28 18:05:19 +0100
committerAndrei Gherzan <andrei@gherzan.ro>2019-05-28 18:13:13 +0100
commit84d15f4d31cda25050a198bd48222c370613ae23 (patch)
treeb7f2543c829a3b3648c098e6cb579673389f8e81 /recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16
parent7059c374512f1c1c0df9ecab0703d11438bdf78b (diff)
downloadmeta-raspberrypi-ag/gstomx.tar.gz
gstreamer1.0-omx: Forward port bbappend and patches to v1.16.xag/gstomx
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Diffstat (limited to 'recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16')
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch48
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-config-files-path.patch150
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0003-no-timeout-on-get-state.patch24
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0004-Properly-handle-drain-requests-while-flushing.patch30
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch36
5 files changed, 288 insertions, 0 deletions
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch b/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
new file mode 100644
index 0000000..c8af7da
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch
@@ -0,0 +1,48 @@
1From 160181edf5fc73288abfe99fa04de4a550cd9c65 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 11 Feb 2016 12:53:20 -0800
4Subject: [PATCH] Don't try to acquire buffer when src pad isn't active
5
6From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
7
8This solves a race condition when setting the pipeline from PAUSE to
9NULL while the decoder loop is still running. Without this patch, the
10thread which interacts with the decode sink pad gets blocked here:
11
12 gst_element_change_state()
13 gst_element_change_state_func()
14 gst_element_pads_activate() --> Deactivating pads
15 activate_pads()
16 gst_pad_set_active()
17 gst_pad_activate_mode()
18 post_activate()
19 GST_PAD_STREAM_LOCK()
20
21while gst_omx_port_acquire_buffer() gets stalled forever in
22gst_omx_component_wait_message() waiting for a message that will never
23arrive:
24
25 gst_omx_video_dec_loop()
26 gst_omx_port_acquire_buffer()
27 gst_omx_component_wait_message()
28
29---
30 omx/gstomxvideodec.c | 5 +++++
31 1 file changed, 5 insertions(+)
32
33diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
34index abe6e30..c4dc33f 100644
35--- a/omx/gstomxvideodec.c
36+++ b/omx/gstomxvideodec.c
37@@ -1598,6 +1598,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
38 GstOMXAcquireBufferReturn acq_return;
39 OMX_ERRORTYPE err;
40
41+ if (!gst_pad_is_active(GST_VIDEO_DECODER_SRC_PAD (self))) {
42+ GST_DEBUG_OBJECT (self, "Src pad not active, not acquiring buffer and flushing instead");
43+ goto flushing;
44+ }
45+
46 #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
47 port = self->eglimage ? self->egl_out_port : self->dec_out_port;
48 #else
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-config-files-path.patch b/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-config-files-path.patch
new file mode 100644
index 0000000..6903c17
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0001-config-files-path.patch
@@ -0,0 +1,150 @@
1From 0dc88ed881eb8420dad4cf0934a900d85b6ef313 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 11 Feb 2016 12:53:20 -0800
4
5---
6 config/bellagio/gstomx.conf | 8 ++++----
7 config/rpi/gstomx.conf | 22 +++++++++++-----------
8 2 files changed, 15 insertions(+), 15 deletions(-)
9
10diff --git a/config/bellagio/gstomx.conf b/config/bellagio/gstomx.conf
11index 5ca8ba6..8931255 100644
12--- a/config/bellagio/gstomx.conf
13+++ b/config/bellagio/gstomx.conf
14@@ -1,6 +1,6 @@
15 [omxmpeg4videodec]
16 type-name=GstOMXMPEG4VideoDec
17-core-name=/usr/local/lib/libomxil-bellagio.so.0
18+core-name=/usr/lib/libomxil-bellagio.so.0
19 component-name=OMX.st.video_decoder.mpeg4
20 rank=257
21 in-port-index=0
22@@ -9,7 +9,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-chang
23
24 [omxh264dec]
25 type-name=GstOMXH264Dec
26-core-name=/usr/local/lib/libomxil-bellagio.so.0
27+core-name=/usr/lib/libomxil-bellagio.so.0
28 component-name=OMX.st.video_decoder.avc
29 rank=257
30 in-port-index=0
31@@ -18,7 +18,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;event-port-settings-chang
32
33 [omxmpeg4videoenc]
34 type-name=GstOMXMPEG4VideoEnc
35-core-name=/usr/local/lib/libomxil-bellagio.so.0
36+core-name=/usr/lib/libomxil-bellagio.so.0
37 component-name=OMX.st.video_encoder.mpeg4
38 rank=0
39 in-port-index=0
40@@ -27,7 +27,7 @@ hacks=event-port-settings-changed-ndata-parameter-swap;video-framerate-integer;s
41
42 [omxaacenc]
43 type-name=GstOMXAACEnc
44-core-name=/usr/local/lib/libomxil-bellagio.so.0
45+core-name=/usr/lib/libomxil-bellagio.so.0
46 component-name=OMX.st.audio_encoder.aac
47 rank=0
48 in-port-index=0
49diff --git a/config/rpi/gstomx.conf b/config/rpi/gstomx.conf
50index d3ea56a..2508dae 100644
51--- a/config/rpi/gstomx.conf
52+++ b/config/rpi/gstomx.conf
53@@ -1,6 +1,6 @@
54 [omxmpeg2videodec]
55 type-name=GstOMXMPEG2VideoDec
56-core-name=/opt/vc/lib/libopenmaxil.so
57+core-name=/usr/lib/libopenmaxil.so
58 component-name=OMX.broadcom.video_decode
59 rank=257
60 in-port-index=130
61@@ -9,7 +9,7 @@ hacks=no-component-role
62
63 [omxmpeg4videodec]
64 type-name=GstOMXMPEG4VideoDec
65-core-name=/opt/vc/lib/libopenmaxil.so
66+core-name=/usr/lib/libopenmaxil.so
67 component-name=OMX.broadcom.video_decode
68 rank=257
69 in-port-index=130
70@@ -18,7 +18,7 @@ hacks=no-component-role
71
72 [omxh263dec]
73 type-name=GstOMXH263Dec
74-core-name=/opt/vc/lib/libopenmaxil.so
75+core-name=/usr/lib/libopenmaxil.so
76 component-name=OMX.broadcom.video_decode
77 rank=257
78 in-port-index=130
79@@ -27,7 +27,7 @@ hacks=no-component-role
80
81 [omxh264dec]
82 type-name=GstOMXH264Dec
83-core-name=/opt/vc/lib/libopenmaxil.so
84+core-name=/usr/lib/libopenmaxil.so
85 component-name=OMX.broadcom.video_decode
86 rank=257
87 in-port-index=130
88@@ -36,7 +36,7 @@ hacks=no-component-role;signals-premature-eos
89
90 [omxtheoradec]
91 type-name=GstOMXTheoraDec
92-core-name=/opt/vc/lib/libopenmaxil.so
93+core-name=/usr/lib/libopenmaxil.so
94 component-name=OMX.broadcom.video_decode
95 rank=257
96 in-port-index=130
97@@ -45,7 +45,7 @@ hacks=no-component-role
98
99 [omxvp8dec]
100 type-name=GstOMXVP8Dec
101-core-name=/opt/vc/lib/libopenmaxil.so
102+core-name=/usr/lib/libopenmaxil.so
103 component-name=OMX.broadcom.video_decode
104 rank=257
105 in-port-index=130
106@@ -54,7 +54,7 @@ hacks=no-component-role
107
108 [omxmjpegdec]
109 type-name=GstOMXMJPEGDec
110-core-name=/opt/vc/lib/libopenmaxil.so
111+core-name=/usr/lib/libopenmaxil.so
112 component-name=OMX.broadcom.video_decode
113 rank=257
114 in-port-index=130
115@@ -63,7 +63,7 @@ hacks=no-component-role
116
117 [omxvc1dec]
118 type-name=GstOMXWMVDec
119-core-name=/opt/vc/lib/libopenmaxil.so
120+core-name=/usr/lib/libopenmaxil.so
121 component-name=OMX.broadcom.video_decode
122 rank=257
123 in-port-index=130
124@@ -73,7 +73,7 @@ sink-template-caps=video/x-wmv,wmvversion=(int)3,format=(string){WMV3,WVC1},widt
125
126 [omxh264enc]
127 type-name=GstOMXH264Enc
128-core-name=/opt/vc/lib/libopenmaxil.so
129+core-name=/usr/lib/libopenmaxil.so
130 component-name=OMX.broadcom.video_encode
131 rank=257
132 in-port-index=200
133@@ -82,7 +82,7 @@ hacks=no-component-role;no-component-reconfigure
134
135 [omxanalogaudiosink]
136 type-name=GstOMXAnalogAudioSink
137-core-name=/opt/vc/lib/libopenmaxil.so
138+core-name=/usr/lib/libopenmaxil.so
139 component-name=OMX.broadcom.audio_render
140 rank=257
141 in-port-index=100
142@@ -92,7 +92,7 @@ sink-template-caps=audio/x-raw,format=(string){S16LE,S32LE},layout=(string)inter
143
144 [omxhdmiaudiosink]
145 type-name=GstOMXHdmiAudioSink
146-core-name=/opt/vc/lib/libopenmaxil.so
147+core-name=/usr/lib/libopenmaxil.so
148 component-name=OMX.broadcom.audio_render
149 rank=258
150 in-port-index=100
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0003-no-timeout-on-get-state.patch b/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0003-no-timeout-on-get-state.patch
new file mode 100644
index 0000000..4342326
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0003-no-timeout-on-get-state.patch
@@ -0,0 +1,24 @@
1From 21f776bff596bc0bd09708efa6497f8bdcd065c0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 13 Feb 2016 11:42:29 -0800
4
5---
6 omx/gstomxvideodec.c | 4 ++--
7 1 file changed, 2 insertions(+), 2 deletions(-)
8
9diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
10index c4dc33f..ba5304f 100644
11--- a/omx/gstomxvideodec.c
12+++ b/omx/gstomxvideodec.c
13@@ -2021,9 +2021,9 @@ gst_omx_video_dec_stop (GstVideoDecoder * decoder)
14 g_cond_broadcast (&self->drain_cond);
15 g_mutex_unlock (&self->drain_lock);
16
17- gst_omx_component_get_state (self->dec, 5 * GST_SECOND);
18+ gst_omx_component_get_state (self->dec, 0);
19 #if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
20- gst_omx_component_get_state (self->egl_render, 1 * GST_SECOND);
21+ gst_omx_component_get_state (self->egl_render, 0);
22 #endif
23
24 gst_buffer_replace (&self->codec_data, NULL);
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0004-Properly-handle-drain-requests-while-flushing.patch b/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0004-Properly-handle-drain-requests-while-flushing.patch
new file mode 100644
index 0000000..144ced6
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0004-Properly-handle-drain-requests-while-flushing.patch
@@ -0,0 +1,30 @@
1From 140bf8548843a98b0af2ddc1765ab59c16c8994c Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
3Date: Tue, 17 Nov 2015 16:51:27 +0000
4Subject: [PATCH] Properly handle drain requests while flushing
5
6Without this commit the decoder streaming thread stops without ever attending
7the drain request, leaving the decoder input thread waiting forever.
8
9---
10 omx/gstomx.c | 7 +++++++
11 1 file changed, 7 insertions(+)
12
13diff --git a/omx/gstomx.c b/omx/gstomx.c
14index 038ce32..5202d33 100644
15--- a/omx/gstomx.c
16+++ b/omx/gstomx.c
17@@ -1011,6 +1011,13 @@ gst_omx_component_new (GstObject * parent, const gchar * core_name,
18
19 g_mutex_lock (&comp->lock);
20 gst_omx_component_handle_messages (comp);
21+
22+ if (err != OMX_ErrorNone && comp->last_error == OMX_ErrorNone) {
23+ GST_ERROR_OBJECT (comp->parent,
24+ "Last operation returned an error. Setting last_error manually.");
25+ comp->last_error = err;
26+ }
27+
28 g_mutex_unlock (&comp->lock);
29
30 return comp;
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch b/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch
new file mode 100644
index 0000000..3245294
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gstreamer1.0-omx-1.16/0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch
@@ -0,0 +1,36 @@
1From cf6cf2060c5a7a7ddc0396a0c20c234fc56c79b6 Mon Sep 17 00:00:00 2001
2From: Andrei Gherzan <andrei@gherzan.ro>
3Date: Tue, 28 May 2019 18:02:24 +0100
4Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a
5 timeout releasing the buffers taken by the egl_render out port
6
7From 0d2ad639e6158c8023c157e206ef3ff7abdc089c Mon Sep 17 00:00:00 2001
8From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?=
9<eocanha@igalia.com>
10Date: Fri, 4 Dec 2015 18:39:59 +0100
11Subject: [PATCH] Don't abort gst_omx_video_dec_set_format() if there's a
12timeout releasing the buffers taken by the egl_render out port
13
14Upstream-status: Pending
15Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
16---
17 omx/gstomxvideodec.c | 2 ++
18 1 file changed, 2 insertions(+)
19
20diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
21index ba5304f..8bd5d3d 100644
22--- a/omx/gstomxvideodec.c
23+++ b/omx/gstomxvideodec.c
24@@ -2229,7 +2229,9 @@ gst_omx_video_dec_disable (GstOMXVideoDec * self)
25 return FALSE;
26 if (gst_omx_port_wait_buffers_released (out_port,
27 1 * GST_SECOND) != OMX_ErrorNone)
28+#if !(defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL))
29 return FALSE;
30+#endif
31 if (!gst_omx_video_dec_deallocate_output_buffers (self))
32 return FALSE;
33 if (gst_omx_port_wait_enabled (out_port, 1 * GST_SECOND) != OMX_ErrorNone)
34--
352.17.1
36