Commit 161dd7a5 authored by memeka's avatar memeka Committed by Nicolas Dufresne

v4l2videoenc: activate capture pool after output pool

Some drivers need output buffers set before capture buffers.
CODA cannot set output format if capture is streaming.
Exynos MFC fails on output STREAMON if capture is already streaming.
This patch delays capture activation until output is configured and
parent 89f4075f
......@@ -337,14 +337,6 @@ gst_v4l2_video_enc_set_format (GstVideoEncoder * encoder,
return FALSE;
/* activating a capture pool will also call STREAMON. CODA driver will
* refuse to configure the output if the capture is stremaing. */
if (!gst_buffer_pool_set_active (GST_BUFFER_POOL (self->v4l2capture->pool),
TRUE)) {
GST_WARNING_OBJECT (self, "Could not activate capture buffer pool.");
return FALSE;
self->input_state = gst_video_codec_state_ref (state);
GST_DEBUG_OBJECT (self, "output caps: %" GST_PTR_FORMAT, state->caps);
......@@ -742,6 +734,12 @@ gst_v4l2_video_enc_handle_frame (GstVideoEncoder * encoder,
goto activate_failed;
if (!gst_buffer_pool_set_active
(GST_BUFFER_POOL (self->v4l2capture->pool), TRUE)) {
GST_WARNING_OBJECT (self, "Could not activate capture buffer pool.");
goto activate_failed;
GST_DEBUG_OBJECT (self, "Starting encoding thread");
/* Start the processing task, when it quits, the task will disable input
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment