mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
rpicamsrc: RaspiCapture: use mmal_queue_timedwait() for buffer queueing
If an external camera was disconnected, there were no feedback in an application. It seems reasonable to wait on mmal_queue no longer than 100ms. If it's stuck we just return a FLOW_ERROR and let the application decide what to do later.
This commit is contained in:
parent
149fdee7fb
commit
b45e239128
1 changed files with 5 additions and 1 deletions
|
@ -938,8 +938,12 @@ raspi_capture_fill_buffer(RASPIVID_STATE *state, GstBuffer **bufp,
|
|||
GstClockTime gst_pts = GST_CLOCK_TIME_NONE;
|
||||
|
||||
/* FIXME: Use our own interruptible cond wait: */
|
||||
buffer = mmal_queue_wait(state->encoded_buffer_q);
|
||||
|
||||
buffer = mmal_queue_timedwait(state->encoded_buffer_q, 100);
|
||||
|
||||
if (G_UNLIKELY(buffer == NULL)) {
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
if (G_LIKELY (config->useSTC && clock)) {
|
||||
MMAL_PARAMETER_INT64_T param;
|
||||
|
|
Loading…
Reference in a new issue