mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
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 streaming https://bugzilla.gnome.org/show_bug.cgi?id=796693
This commit is contained in:
parent
238a37295c
commit
58e9341384
1 changed files with 6 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue