![]() |
![]() |
![]() |
GStreamer Good Plugins 1.0 Plugins Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
GObject +----GInitiallyUnowned +----GstObject +----GstElement +----GstBaseSrc +----GstPushSrc +----GstV4l2Src
GstV4l2Src implements GstURIHandler, GstTuner, GstColorBalance and GstVideoOrientation.
"device" gchar* : Read / Write "device-name" gchar* : Read "flags" GstV4l2DeviceTypeFlags : Read "device-fd" gint : Read "brightness" gint : Read / Write "contrast" gint : Read / Write "hue" gint : Read / Write "saturation" gint : Read / Write "norm" V4L2_TV_norms : Read / Write "io-mode" GstV4l2IOMode : Read / Write "extra-controls" GstStructure* : Read / Write "force-aspect-ratio" gboolean : Read / Write "pixel-aspect-ratio" gchar* : Read / Write
v4l2src can be used to capture video from v4l2 devices, like webcams and tv cards.
1 |
gst-launch-1.0 v4l2src ! xvimagesink |
1 |
gst-launch-1.0 v4l2src ! jpegdec ! xvimagesink |
plugin |
video4linux2 |
author |
Edgard Lima <edgard.lima@indt.org.br>, Stefan Kost <ensonic@users.sf.net> |
class |
Source/Video |
name |
src |
direction |
source |
presence |
always |
details |
image/jpeg |
video/mpeg, mpegversion=(int)4, systemstream=(boolean)false | |
video/mpeg, mpegversion=(int)2 | |
video/mpegts, systemstream=(boolean)true | |
video/x-bayer, format=(string){ bggr, gbrg, grbg, rggb }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-dv, systemstream=(boolean)true | |
video/x-h263, variant=(string)itu | |
video/x-h264, stream-format=(string){ byte-stream, avc }, alignment=(string)au | |
video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-raw, format=(string){ RGB16, BGR, RGB, GRAY8, GRAY16_LE, GRAY16_BE, YVU9, YV12, YUY2, YVYU, UYVY, Y42B, Y41B, YUV9, NV12_64Z32, NV24, NV61, NV16, NV21, NV12, I420, BGRA, BGRx, ARGB, xRGB, BGR15, RGB15 }, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ] | |
video/x-vp8 | |
video/x-wmv, wmvversion=(int)3, format=(string)WVC1 |
"device-fd"
property "device-fd" gint : Read
File descriptor of the device.
Allowed values: >= G_MAXULONG
Default value: -1
"brightness"
property "brightness" gint : Read / Write
Picture brightness, or more precisely, the black level
Default value: 0
"contrast"
property "contrast" gint : Read / Write
Picture contrast or luma gain
Default value: 0
"saturation"
property "saturation" gint : Read / Write
Picture color saturation or chroma gain
Default value: 0
"io-mode"
property "io-mode" GstV4l2IOMode : Read / Write
IO Mode
Default value: GST_V4L2_IO_AUTO
"extra-controls"
property "extra-controls" GstStructure* : Read / Write
Additional v4l2 controls for the device. The controls are identified by the control name (lowercase with '_' for any non-alphanumeric characters).
Since 1.2
"force-aspect-ratio"
property "force-aspect-ratio" gboolean : Read / Write
When enabled, the pixel aspect ratio queried from the device or set with the pixel-aspect-ratio property will be enforced.
Default value: TRUE
Since 1.2
"prepare-format"
signalvoid user_function (GstV4l2Src *v4l2src,
gint fd,
GstCaps *caps,
gpointer user_data) : Run Last
This signal gets emitted before calling the v4l2 VIDIOC_S_FMT ioctl (set format). This allows for any custom configuration of the device to happen prior to the format being set. This is mostly useful for UVC H264 encoding cameras which need the H264 Probe & Commit to happen prior to the normal Probe & Commit.
|
the v4l2src instance |
|
the file descriptor of the current device |
|
the caps of the format being set |
|
user data set when the signal handler was connected. |
Since 0.10.32