Commit graph

11 commits

Author SHA1 Message Date
Ming Qian
2861bd9456 v4l2: Add NV12_8L128 and NV12_10BE_8L128
These formats are used by i.MX 8QXP/8QM VPU.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1379>
2022-03-22 00:41:39 +00:00
Damian Hobson-Garcia
ceff3e8ff7 v4l2object: Add function to get crop regions from device
Get the current crop bounding region from the V4L2 device so
that it can be provided to applications and used to validate
crop settings. Also make the default crop region available so
that it can be used to reset the crop when appropriate.

Uses the selection API when available with fallback to the crop
API for older kernels.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1089>
2022-03-11 15:02:08 +00:00
Damian Hobson-Garcia
25f240993c v4l2object: rename crop function to reflect its usage
The gst_v4l2_object_set_crop() is used for removing buffer
alignment padding. Give it a name that better reflects
that usage.  This helps to distinguish from cropping of the
input image (e.g. cropping at the image sensor on a captre
device), which can be  unrelated to the memory buffer padding,
especially if scaling is involved.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1089>
2022-03-11 15:02:08 +00:00
Damian Hobson-Garcia
2f410f26bf v4l2src: Reset the compose window to the default after setting format
When the size of V4L2 capture or output is changes with VIDIOC_S_FMT,
the device is only required to update the compisition window to fit
inside the new frame size.  This can result in captured data only being
updated on a portion of the frame after a resize.

Update the composition window to the default value determined by the
V4L2 device driver whenever the format is changed to make sure that
all image data is composed to its full size.

Fixes #765

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1806>
2022-03-03 13:28:31 +00:00
Ming Qian
fe56af607b v4l2videodec : refactor the setup process of capture
v4l2videodec do some refactoring so that it can support
dynamic resolution change event.

1.wrap the setup process of capture as a function,
as decoder need setup the capture again when
dynamic resolution change event is received.

2.move the function "remove_padding"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1381>
2022-03-01 00:00:50 +00:00
Nicolas Dufresne
d394b8b4bd v4l2object: Avoid crash on early failure
This happens while an external error lead to an early shutdown.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1567>
2022-02-20 22:32:55 +00:00
Nicolas Dufresne
ec9585d148 video4linux2: Add MM21 support
This enables mtk-vcodec and MDP driver from mainline Linux kernel.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1567>
2022-02-20 22:32:55 +00:00
Nicolas Dufresne
bab9041c4b Port plugins to gst_video_format_info_extrapolate_stride()
This reduces code duplication and simplify addition of new
pixel formats into related plugins.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1567>
2022-02-20 22:32:55 +00:00
Wim Taymans
9aaef931bf v4l2: handle 0x0 sizes gracefully
Also ignore 0x0 sizes in the fallback case and assume the size can be
anything between 1x1 and MAXxMAX.

This fixes the case where a width=0, height=0 caps are created. Whith
this patch the caps will contain width=[1,MAX], height=[1,MAX].

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1396>
2021-11-29 15:35:36 +01:00
Trung Do
a87be69ce5 v4l2: Update fmt if padded height is greater than fmt height
If padded height is greater, buffer bytesused could be larger than plane length,
and cause VIDIOC_QBUF failure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1355>
2021-11-16 10:46:29 -05:00
Thibault Saunier
5ff769d731 Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
Renamed from sys/v4l2/gstv4l2object.c (Browse further)