v4l2src

## v4l2src v4l2src — Reads frames from a Video4Linux2 device |

## Synopsis

    struct              GstV4l2Src;

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GstObject
                   +----GstElement
                         +----GstBaseSrc
                               +----GstPushSrc
                                     +----GstV4l2Src

## Implemented Interfaces

GstV4l2Src implements GstURIHandler, GstTuner, GstColorBalance and GstVideoOrientation.

## Properties

      "device"                   gchar*                : Read / Write
      "device-name"              gchar*                : Read
      "flags"                    GstV4l2DeviceTypeFlags  : Read
      "queue-size"               guint                 : Read / Write
      "always-copy"              gboolean              : Read / Write
      "device-fd"                gint                  : Read
      "brightness"               gint                  : Read / Write
      "contrast"                 gint                  : Read / Write
      "decimate"                 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

## Signals

      "prepare-format"                                 : Run Last

## Description

## Synopsis

### Element Information

plugin | video4linux2
author | Edgard Lima <edgard.lima@indt.org.br>, Stefan Kost <ensonic@users.sf.net>
class | Source/Video

### Element Pads

name | src
direction | source
presence | always
details | video/x-raw, format=(string)RGB15, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)RGB16, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)BGR, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)RGB, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)BGRx, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)RGBx, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)GRAY8, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)YVU9, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)YV12, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)YUY2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)UYVY, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)Y42B, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)Y41B, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)NV12, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)NV21, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)YUV9, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)I420, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-bayer, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| image/jpeg, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| image/jpeg, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| image/jpeg, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-dv, systemstream=(boolean)true, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/mpegts
| video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-h263, variant=(string)itu, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-h264, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-sonix, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-pwc1, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-pwc2, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]
| video/x-raw, format=(string)YVYU, width=(int)[ 1, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 100/1 ]

## Details

### struct GstV4l2Src

    struct GstV4l2Src;

## Property Details

### The `"device"` property

      "device"                   gchar*                : Read / Write

Device location.

Default value: "/dev/video0"

### The `"device-name"` property

      "device-name"              gchar*                : Read

Name of the device.

Default value: NULL

### The `"flags"` property

      "flags"                    GstV4l2DeviceTypeFlags  : Read

Device type flags.

### The `"queue-size"` property

      "queue-size"               guint                 : Read / Write

Number of buffers to be enqueud in the driver in streaming mode.

Allowed values: [1,16]

Default value: 2

### The `"always-copy"` property

      "always-copy"              gboolean              : Read / Write

If the buffer will or not be used directly from mmap.

Default value: TRUE

### The `"device-fd"` property

      "device-fd"                gint                  : Read

File descriptor of the device.

Allowed values: >= G_MAXULONG

Default value: -1

### The `"brightness"` property

      "brightness"               gint                  : Read / Write

Picture brightness, or more precisely, the black level.

Default value: 0

### The `"contrast"` property

      "contrast"                 gint                  : Read / Write

Picture contrast or luma gain.

Default value: 0

### The `"decimate"` property

      "decimate"                 gint                  : Read / Write

Only use every nth frame.

Allowed values: >= 1

Default value: 1

### The `"hue"` property

      "hue"                      gint                  : Read / Write

Hue or color balance.

Default value: 0

### The `"saturation"` property

      "saturation"               gint                  : Read / Write

Picture color saturation or chroma gain.

Default value: 0

### The `"norm"` property

      "norm"                     V4L2_TV_norms         : Read / Write

video standard.

Default value: none

### The `"io-mode"` property

      "io-mode"                  GstV4l2IOMode         : Read / Write

I/O mode.

Default value: GST_V4L2_IO_AUTO

### The `"extra-controls"` property

      "extra-controls"           GstStructure*         : Read / Write

Extra v4l2 controls (CIDs) for the device.

### The `"force-aspect-ratio"` property

      "force-aspect-ratio"       gboolean              : Read / Write

When enabled, the pixel aspect ratio will be enforced.

Default value: TRUE

### The `"pixel-aspect-ratio"` property

      "pixel-aspect-ratio"       gchar*                : Read / Write

Overwrite the pixel aspect ratio of the device.

Default value: "1/1"

## Signal Details

### The `"prepare-format"` signal

    void                user_function                      (GstV4l2Src *gstv4l2src,
                                                            gint        arg1,
                                                            GstCaps    *arg2,
                                                            gpointer    user_data)       : Run Last

`gstv4l2src` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.