# v4l2h264dec

The v4l2h264dec plugin uses the V4L2 APIs to decode the video stream.

- The plugin uses the H264 video decoder to provide hardware accelerated H.264 (MPEG-4 Part 10) decoding on supported platforms.
- The plugin is based on the [GstVideoDecoder](https://gstreamer.freedesktop.org/documentation/video/gstvideodecoder.html) base class.

## Inheritance chain

[GObject](https://docs.gtk.org/gobject/) → [GstObject](https://gstreamer.freedesktop.org/documentation/gstreamer/gstobject.html?gi-language=c) → [GstElement](https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html?gi-language=c) → [GstVideoDecoder](https://gstreamer.freedesktop.org/documentation/video/gstvideodecoder.html) → GstV4l2VideoDec → v4l2h264dec

The following tables provide information on pad templates and element properties of v4l2h264dec. For use cases, see [Video playback use cases](https://docs.qualcomm.com/doc/80-80022-50/topic/video-playback-use-cases.html).

## Pad configuration

| Pad Name | Capabilities | Capabilities | Capabilities |
| --- | --- | --- | --- |
| <br>SINK template: 'sink'<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><em>Availability:</em>  Always</p></li><br>> <li><p><em>Direction:</em>  sink</p></li><br>> </ul> | video/x-h264 | alignment: | au |
| <br>SINK template: 'sink'<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><em>Availability:</em>  Always</p></li><br>> <li><p><em>Direction:</em>  sink</p></li><br>> </ul> | video/x-h264 | stream-format: | byte-stream |
| <br>SINK template: 'sink'<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><em>Availability:</em>  Always</p></li><br>> <li><p><em>Direction:</em>  sink</p></li><br>> </ul> | video/x-h264 | level: | { (string)1, (string)1b, (string)1.1, (string)1.2, (string)1.3, (string)2, (string)2.1, (string)2.2, (string)3, (string)3.1, (string)3.2, (string)4, (string)4.1, (string)4.2, (string)5, (string)5.1 } |
| <br>SINK template: 'sink'<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><em>Availability:</em>  Always</p></li><br>> <li><p><em>Direction:</em>  sink</p></li><br>> </ul> | video/x-h264 | profile: | { (string)baseline, (string)constrained-baseline, (string)main, (string)high, (string)constrained-high } |
| <br>SRC template: 'src'<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><em>Availability:</em>  Always</p></li><br>> <li><p><em>Direction:</em>  source</p></li><br>> </ul> | video/x-raw | format: | { (string)NV12, (string)NV21 } |
| <br>SRC template: 'src'<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><em>Availability:</em>  Always</p></li><br>> <li><p><em>Direction:</em>  source</p></li><br>> </ul> | video/x-raw | width: | [ 1, 32768 ] |
| <br>SRC template: 'src'<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><em>Availability:</em>  Always</p></li><br>> <li><p><em>Direction:</em>  source</p></li><br>> </ul> | video/x-raw | height: | [ 1, 32768 ] |
| <br>SRC template: 'src'<br><br><br><br>> <br>> <br>> <ul class="simple"><br>> <li><p><em>Availability:</em>  Always</p></li><br>> <li><p><em>Direction:</em>  source</p></li><br>> </ul> | video/x-raw | framerate: | [ 0/1, 2147483647/1 ] |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |

## Element configuration

Note

For the current release, in the read-write properties, only **capture-io-mode** and **output-io-mode** are supported, and they’re supported only with **(5): dmabuf-import - GST\_V4L2\_IO\_DMABUF\_IMPORT** property.

Table : Element properties of v4l2h264dec

| Property | Description |
| --- | --- |
| automatic-request-sync-point-flags: | - Flags to use when automatically requesting sync points.<br>    - <ul><br><li><p>flags: readable, writable</p></li><br><li><p>Flags "GstVideoDecoderRequestSyncPointFlags" Default: 0x00000003, "corrupt-output+discard-input"</p><br><blockquote><br><div><ul class="simple"><br><li><p>(0x00000001): discard-input - GST_VIDEO_DECODER_REQUEST_SYNC_POINT_DISCARD_INPUT</p></li><br><li><p>(0x00000002): corrupt-output - GST_VIDEO_DECODER_REQUEST_SYNC_POINT_CORRUPT_OUTPUT</p></li><br></ul><br></div></blockquote><br></li><br></ul> |
| automatic-request-sync-points | - Automatically request sync points when required.<br>    - <ul class="simple"><br><li><p>flags: readable, writable</p></li><br><li><p>Boolean. Default: false</p></li><br></ul> |
| capture-io-mode | - Capture I/O mode (matches src pad).<br>    - <ul><br><li><p>flags: readable, writable</p></li><br><li><p>Enum "GstV4l2IOMode" Default: 0, "auto"</p><br><blockquote><br><div><ul class="simple"><br><li><p>(0): auto - GST_V4L2_IO_AUTO</p></li><br><li><p>(1): rw - GST_V4L2_IO_RW</p></li><br><li><p>(2): mmap - GST_V4L2_IO_MMAP</p></li><br><li><p>(3): userptr - GST_V4L2_IO_USERPTR</p></li><br><li><p>(4): dmabuf - GST_V4L2_IO_DMABUF</p></li><br><li><p>(5): dmabuf-import - GST_V4L2_IO_DMABUF_IMPORT</p></li><br></ul><br></div></blockquote><br></li><br></ul> |
| device | - Device location.<br>    - <ul class="simple"><br><li><p>flags: readable</p></li><br><li><p>String. Default: "/dev/video0"</p></li><br></ul> |
| device-fd | - File descriptor of the device.<br>    - <ul class="simple"><br><li><p>flags: readable</p></li><br><li><p>Integer. Range: ˗1 to 2147483647, default: ˗1</p></li><br></ul> |
| device-name | - Name of the device.<br>    - <ul class="simple"><br><li><p>flags: readable</p></li><br><li><p>String. Default: null</p></li><br></ul> |
| discard-corrupted-frames | - Discard frames marked as corrupted instead of processing them as the output.<br>    - <ul class="simple"><br><li><p>flags: readable, writable</p></li><br><li><p>Boolean. Default: false</p></li><br></ul> |
| extra-controls | - Extra v4l2 controls (CIDs) for the device.<br>    - <ul class="simple"><br><li><p>flags: readable, writable</p></li><br><li><p>Boxed pointer of type "GstStructure"</p></li><br></ul> |
| max-errors | - Maximum consecutive decoder errors before returning a flow error.<br>    - <ul class="simple"><br><li><p>flags: readable, writable</p></li><br><li><p>Integer. Range: ˗1 to 2147483647, default: 10</p></li><br></ul> |
| min-force-key-unit-interval | - Minimum interval between force-key-unit requests in nanoseconds.<br>    - <ul class="simple"><br><li><p>flags: readable, writable</p></li><br><li><p>Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0</p></li><br></ul> |
| name | - The name of the object.<br>    - <ul class="simple"><br><li><p>flags: readable, writable, 0x2000</p></li><br><li><p>String. Default: "v4l2h264dec0"</p></li><br></ul> |
| output-io-mode | - Output side I/O mode (matches sink pad).<br>    - <ul><br><li><p>flags: readable, writable</p></li><br><li><p>Enum "GstV4l2IOMode" Default: 0, "auto"</p><br><blockquote><br><div><ul class="simple"><br><li><p>(0): auto - GST_V4L2_IO_AUTO</p></li><br><li><p>(1): rw - GST_V4L2_IO_RW</p></li><br><li><p>(2): mmap - GST_V4L2_IO_MMAP</p></li><br><li><p>(3): userptr - GST_V4L2_IO_USERPTR</p></li><br><li><p>(4): dmabuf - GST_V4L2_IO_DMABUF</p></li><br><li><p>(5): dmabuf-import - GST_V4L2_IO_DMABUF_IMPORT</p></li><br></ul><br></div></blockquote><br></li><br></ul> |
| parent | - The parent of the object.<br>    - <ul class="simple"><br><li><p>flags: readable, writable, 0x2000</p></li><br><li><p>Object of type "GstObject"</p></li><br></ul> |
| qos | - Handle quality-of-service events from downstream.<br>    - <ul class="simple"><br><li><p>flags: readable, writable</p></li><br><li><p>Boolean. Default: true</p></li><br></ul> |

Last Published: May 14, 2026

[Previous Topic
qtisocketsrc](https://docs.qualcomm.com/bundle/publicresource/80-80022-50/topics/qtisocketsrc.md) [Next Topic
v4l2h265dec](https://docs.qualcomm.com/bundle/publicresource/80-80022-50/topics/v4l2h265dec.md)

Source: [https://docs.qualcomm.com/doc/80-80022-50/topic/v4l2h264dec.html](https://docs.qualcomm.com/doc/80-80022-50/topic/v4l2h264dec.html)