mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 02:15:31 +00:00
v4l2sink: Improve behavior for shared buffers.
When the decoder is using pad_alloc(), v4l2sink would behave badly if the number of buffers ('queue-size' property) was not high enough to account for all the buffers needed by the decoder, and other elements (such as queues) between the decoder and v4l2sink. This patch slightly increases the default number of buffers, and changes v4l2sink to drop frames rather than return an error in case the number of buffers is not high enough.
This commit is contained in:
parent
82ee35372b
commit
48a8b53bdd
1 changed files with 4 additions and 2 deletions
|
@ -56,7 +56,7 @@
|
|||
GST_DEBUG_CATEGORY (v4l2sink_debug);
|
||||
#define GST_CAT_DEFAULT v4l2sink_debug
|
||||
|
||||
#define PROP_DEF_QUEUE_SIZE 8
|
||||
#define PROP_DEF_QUEUE_SIZE 12
|
||||
#define DEFAULT_PROP_DEVICE "/dev/video1"
|
||||
|
||||
enum
|
||||
|
@ -670,7 +670,9 @@ gst_v4l2sink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
|
|||
&newbuf);
|
||||
|
||||
if (GST_FLOW_OK != ret) {
|
||||
return ret;
|
||||
GST_DEBUG_OBJECT (v4l2sink,
|
||||
"dropping frame! Consider increasing 'queue-size' property!");
|
||||
return GST_FLOW_OK;
|
||||
}
|
||||
|
||||
memcpy (GST_BUFFER_DATA (newbuf),
|
||||
|
|
Loading…
Reference in a new issue