Propagate timeout errors so they're not reported
generically
buffer = mmal_queue_timedwait(state->encoded_buffer_q, 500);
if (G_UNLIKELY(buffer == NULL)) {
- return GST_FLOW_ERROR;
+ return GST_FLOW_ERROR_TIMEOUT;
}
if (G_LIKELY (config->useSTC && clock)) {
#undef vcos_log_warn
#define vcos_log_warn GST_WARNING
+#define GST_FLOW_ERROR_TIMEOUT GST_FLOW_CUSTOM_ERROR
+
G_BEGIN_DECLS
typedef enum
GST_BUFFER_DURATION (*buf) = src->duration;
}
+ if (ret == GST_FLOW_ERROR_TIMEOUT) {
+ GST_ELEMENT_ERROR (src, STREAM, FAILED,
+ ("Camera capture timed out."),
+ ("Waiting for a buffer from the camera took too long."));
+ ret = GST_FLOW_ERROR;
+ }
+
if (clock)
gst_object_unref (clock);
return ret;