Video frame

Updated: May 27, 2022

The video capture API includes constants that specify the video capture video frame properties.

Definitions:

#define CAPTURE_PROPERTY_FRAME_NBUFFERS CAPTURE_PROPERTY( 'Q', 'F', 'B', 'N' )

Number of frame buffers that have been specified in CAPTURE_PROPERTY_FRAME_BUFFERS.

Read/Write uint32_t

#define CAPTURE_PROPERTY_FRAME_BUFFERS CAPTURE_PROPERTY( 'Q', 'F', 'B', 'A' )

Pointers to the video capture buffers.

Read/Write [] void*

#define CAPTURE_PROPERTY_FRAME_TIMESTAMP CAPTURE_PROPERTY( 'Q', 'F', 'B', 'T' )

An array of CLOCK_MONOTONIC timestamps indexed by the buffer index.

Read [] uint64_t

#define CAPTURE_PROPERTY_FRAME_TIMECODE CAPTURE_PROPERTY( 'Q', 'F', 'B', 'C' )

An array of SMPTE (Society of Motion Picture and Television Engineers) timecodes indexed by the buffer index; used for streams with metadata.

#define CAPTURE_PROPERTY_FRAME_SEQNO CAPTURE_PROPERTY( 'Q', 'F', 'B', 'S' )

An array of frame sequence numbers indexed by the buffer index.

Read [] uint32_t

#define CAPTURE_PROPERTY_FRAME_FLAGS CAPTURE_PROPERTY( 'Q', 'F', 'B', 'F' )

An array of frame flags indexed by the buffer index.

Read [] uint32_t

#define CAPTURE_PROPERTY_FRAME_NBYTES CAPTURE_PROPERTY( 'Q', 'F', 'B', 'B' )

An array of frame sizes, in bytes, indexed by the buffer index.

Read/Write [] uint32_t

#define CAPTURE_FRAME_FLAG_ERROR 0x0001

There is an error in the frame.

#define CAPTURE_FRAME_FLAG_INTERLACED 0x0002

Frame is interlaced.

For more information about interlacing, refer to Deinterlacing mode types.

#define CAPTURE_FRAME_FLAG_FIELD_BOTTOM 0x0004

Indicator of the video frame field received.

When the video uses interlacing (i.e., CAPTURE_FRAME_FLAG_INTERLACED is set), then when the bottom field (even line numbers) is received, CAPTURE_FRAME_FLAG_FIELD_BOTTOM is set. When the top field (odd line numbers) is received, CAPTURE_FRAME_FLAG_FIELD_BOTTOM is unset.

#define CAPTURE_FRAME_FLAG_SHORT 0x0008

Indicator that the frame or field is shorter than expected.

If the frame or field is shorter because of errors in transmission, the flag CAPTURE_FRAME_FLAG_ERROR is also set. Otherwise, a shorter than expected frame of field can be due to either of the following:
  • an incorrect selection of analog broadcast standard (e.g., the hardware is expecting a PAL 576i signal, but an NTSC 480i is used instead)
  • an incomplete frame