beautypg.com

Vidioc_g_fmt, vidioc_s_fmt, vidioc_try_fmt – Sensoray 2253 Linux User Manual

Page 16

background image

VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT

int ioctl(int fd, int request, struct v4l2_format *fmt);
fmt->pix.width

Integer range between 128 to 720 in steps of 16.

fmt->pix.height

Integer range 96 to 480 (NTSC) or 576 (PAL) in steps of 16.
Note: for output, width and height are ignored for compressed formats
(JPEG/MP2V/MP4V/H264/MP42) since dimensions are encoded in the
stream.

fmt->pix.pixelformat

Supported FOURCC codes:

V4L2_PIX_FMT_MJPEG – compressed motion JPEG
V4L2_PIX_FMT_JPEG – same as V4L2_PIX_FMT_MJPEG
V4L2_PIX_FMT_MP4V – MPEG-4 video elementary stream
V4L2_PIX_FMT_H264 – H.264 video elementary stream
V4L2_PIX_FMT_MP42 – MP4 fragmented stream
V4L2_PIX_FMT_MPEG – MPEG transport stream
V4L2_PIX_FMT_UYVY – raw YUV 422 interleaved chroma first
V4L2_PIX_FMT_YUYV – raw YUV 422 interleaved luminance first
V4L2_PIX_FMT_NV12 – raw YUV 420 in semi-planar format
V4L2_PIX_FMT_GREY – raw Y 8-bit samples only

Note: Codes not defined in videodev2.h are in s2253ioctl.h.

fmt->pix.field

Supported modes:

The V4L2_FIELD_NONE option is used to select a single field and

interpolates it to produce the missing lines. This method removes the
jagged edges cause by motion between fields, producing a smooth
progressive frame. This is a shared option affecting both video output
streams on the 2253.
The V4L2_FIELD_INTERLACE option provides both interlaced fields in the

captured frame. Blurriness or combing artifacts may appear when the
capture height does not match the native height for the video standard.
This is a shared option affecting both video output streams on the 2253.
The V4L2_FIELD_ANY option does not change the current mode, leaving

it unchanged on the device.

The field mode can also be controlled by the S2253_CID_INTERPOLATE
extended control, see below.

16

This manual is related to the following products: