mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
v4l2src: Simplify format handling
Always initially use try_format(), delaying set_format() to when the allocation is being negotiated. This avoid having two code paths, and will be help adding support for properly importing buffers of specific strides and offsets. https://bugzilla.gnome.org/show_bug.cgi?id=583890
This commit is contained in:
parent
fd0afe033b
commit
fe3a70fefd
1 changed files with 20 additions and 25 deletions
|
@ -446,7 +446,6 @@ gst_v4l2src_fixate (GstBaseSrc * basesrc, GstCaps * caps, GstStructure * pref_s)
|
|||
|
||||
fcaps = gst_caps_copy_nth (caps, i);
|
||||
|
||||
if (GST_V4L2_IS_ACTIVE (obj)) {
|
||||
/* try hard to avoid TRY_FMT since some UVC camera just crash when this
|
||||
* is called at run-time. */
|
||||
if (gst_v4l2_object_caps_is_subset (obj, fcaps)) {
|
||||
|
@ -470,10 +469,6 @@ gst_v4l2src_fixate (GstBaseSrc * basesrc, GstCaps * caps, GstStructure * pref_s)
|
|||
v4l2src->pending_set_fmt = TRUE;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (gst_v4l2src_set_format (v4l2src, fcaps, &error))
|
||||
break;
|
||||
}
|
||||
|
||||
/* Only EIVAL make sense, report any other errors, this way we don't keep
|
||||
* probing if the device got disconnected, or if it's firmware stopped
|
||||
|
|
Loading…
Reference in a new issue