Initial commit
This commit is contained in:
+50
@@ -0,0 +1,50 @@
|
||||
From 160181edf5fc73288abfe99fa04de4a550cd9c65 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 11 Feb 2016 12:53:20 -0800
|
||||
Subject: [PATCH] Don't try to acquire buffer when src pad isn't active
|
||||
|
||||
From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
|
||||
|
||||
This solves a race condition when setting the pipeline from PAUSE to
|
||||
NULL while the decoder loop is still running. Without this patch, the
|
||||
thread which interacts with the decode sink pad gets blocked here:
|
||||
|
||||
gst_element_change_state()
|
||||
gst_element_change_state_func()
|
||||
gst_element_pads_activate() --> Deactivating pads
|
||||
activate_pads()
|
||||
gst_pad_set_active()
|
||||
gst_pad_activate_mode()
|
||||
post_activate()
|
||||
GST_PAD_STREAM_LOCK()
|
||||
|
||||
while gst_omx_port_acquire_buffer() gets stalled forever in
|
||||
gst_omx_component_wait_message() waiting for a message that will never
|
||||
arrive:
|
||||
|
||||
gst_omx_video_dec_loop()
|
||||
gst_omx_port_acquire_buffer()
|
||||
gst_omx_component_wait_message()
|
||||
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
omx/gstomxvideodec.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
|
||||
index abe6e30..c4dc33f 100644
|
||||
--- a/omx/gstomxvideodec.c
|
||||
+++ b/omx/gstomxvideodec.c
|
||||
@@ -1598,6 +1598,11 @@ gst_omx_video_dec_loop (GstOMXVideoDec * self)
|
||||
GstOMXAcquireBufferReturn acq_return;
|
||||
OMX_ERRORTYPE err;
|
||||
|
||||
+ if (!gst_pad_is_active(GST_VIDEO_DECODER_SRC_PAD (self))) {
|
||||
+ GST_DEBUG_OBJECT (self, "Src pad not active, not acquiring buffer and flushing instead");
|
||||
+ goto flushing;
|
||||
+ }
|
||||
+
|
||||
#if defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL)
|
||||
port = self->eglimage ? self->egl_out_port : self->dec_out_port;
|
||||
#else
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
From 21f776bff596bc0bd09708efa6497f8bdcd065c0 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 13 Feb 2016 11:42:29 -0800
|
||||
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
omx/gstomxvideodec.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
|
||||
index c4dc33f..ba5304f 100644
|
||||
--- a/omx/gstomxvideodec.c
|
||||
+++ b/omx/gstomxvideodec.c
|
||||
@@ -2021,9 +2021,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);
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
From 140bf8548843a98b0af2ddc1765ab59c16c8994c 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.
|
||||
|
||||
---
|
||||
Upstream-Status: Pending
|
||||
|
||||
omx/gstomx.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/omx/gstomx.c b/omx/gstomx.c
|
||||
index 038ce32..5202d33 100644
|
||||
--- a/omx/gstomx.c
|
||||
+++ b/omx/gstomx.c
|
||||
@@ -1011,6 +1011,13 @@ gst_omx_component_new (GstObject * parent, const gchar * core_name,
|
||||
|
||||
g_mutex_lock (&comp->lock);
|
||||
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);
|
||||
|
||||
return comp;
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
From cf6cf2060c5a7a7ddc0396a0c20c234fc56c79b6 Mon Sep 17 00:00:00 2001
|
||||
From: Andrei Gherzan <andrei@gherzan.ro>
|
||||
Date: Tue, 28 May 2019 18:02:24 +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
|
||||
|
||||
From 0d2ad639e6158c8023c157e206ef3ff7abdc089c 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
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
|
||||
---
|
||||
omx/gstomxvideodec.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
|
||||
index ba5304f..8bd5d3d 100644
|
||||
--- a/omx/gstomxvideodec.c
|
||||
+++ b/omx/gstomxvideodec.c
|
||||
@@ -2229,7 +2229,9 @@ gst_omx_video_dec_disable (GstOMXVideoDec * self)
|
||||
return FALSE;
|
||||
if (gst_omx_port_wait_buffers_released (out_port,
|
||||
1 * GST_SECOND) != OMX_ErrorNone)
|
||||
+#if !(defined (USE_OMX_TARGET_RPI) && defined (HAVE_GST_GL))
|
||||
return FALSE;
|
||||
+#endif
|
||||
if (!gst_omx_video_dec_deallocate_output_buffers (self))
|
||||
return FALSE;
|
||||
if (gst_omx_port_wait_enabled (out_port, 1 * GST_SECOND) != OMX_ErrorNone)
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
FILESEXTRAPATHS:prepend:rpi := "${THISDIR}/${PN}:"
|
||||
|
||||
SRC_URI:append:rpi = " \
|
||||
file://0001-Don-t-try-to-acquire-buffer-when-src-pad-isn-t-activ.patch \
|
||||
file://0003-no-timeout-on-get-state.patch \
|
||||
file://0004-Properly-handle-drain-requests-while-flushing.patch \
|
||||
file://0005-Don-t-abort-gst_omx_video_dec_set_format-if-there-s-.patch \
|
||||
"
|
||||
|
||||
GSTREAMER_1_0_OMX_TARGET:rpi = "rpi"
|
||||
GSTREAMER_1_0_OMX_CORE_NAME:rpi = "${libdir}/libopenmaxil.so"
|
||||
EXTRA_OEMESON:append:rpi = " -Dheader_path=${STAGING_DIR_TARGET}/usr/include/IL"
|
||||
@@ -0,0 +1,2 @@
|
||||
PACKAGECONFIG:append:rpi = " hls \
|
||||
${@bb.utils.contains('LICENSE_FLAGS_ACCEPTED', 'commercial', 'faad', '', d)}"
|
||||
@@ -0,0 +1,6 @@
|
||||
# if using bcm driver enable dispmanx not when using VC4 driver
|
||||
PACKAGECONFIG:append:rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' dispmanx', d)}"
|
||||
DEPENDS:append:rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' userland', d)}"
|
||||
|
||||
PACKAGECONFIG_GL_VC4GRAPHICS = "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
|
||||
PACKAGECONFIG_GL:rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '${PACKAGECONFIG_GL_VC4GRAPHICS}', 'egl gles2', d)}"
|
||||
@@ -0,0 +1 @@
|
||||
PACKAGECONFIG:append:rpi = "${@bb.utils.contains('MACHINE_FEATURES', 'vc4graphics', '', ' rpi', d)}"
|
||||
Reference in New Issue
Block a user