gavl: gavl_packet_s Struct Reference

gavl

Data Fields
gavl_packet_s Struct Reference
Compressed stream support

Packet structure. More...

`#include <compression.h>`

## Data Fields
gavl_buffer_t | buf
| Data.
uint32_t | flags
| ORed combination of GAVL_PACKET_* flags.
int64_t | position
| Position of the packet in the file. The exact meaning is format dependent.
int64_t | pts
| Presentation time.
int64_t | dts
| Decoding time.
int64_t | pes_pts
| PTS from the PES stream (probably in another scale).
int64_t | duration
| Duration of the contained frame.
uint32_t | field2_offset
| Offset of field 2 for field pictures.
uint32_t | header_size
| Size of a repeated global header (or 0).
uint32_t | sequence_end_pos
| Position of sequence end code if any.
gavl_interlace_mode_t | interlace_mode
| Interlace mode for mixed interlacing.
gavl_timecode_t | timecode
| Timecode.
gavl_rectangle_i_t | src_rect
| Rectangle to take from a video frame.
int32_t | dst_x
| X-coordinate in the destination frame (for overlays).
int32_t | dst_y
| Y-coordinate in the destination frame (for overlays).
int32_t | id
| ID of the gavf stream where this packet belongs.
int | buf_idx
gavl_packet_extradata_t | ext_data [GAVL_PACKET_MAX_EXTRADATA]

## Detailed Description

Packet structure.

This specifies one packet of compressed data. For video streams, each packet must correspond to a video frame. For audio streams, each packet must be the smallest unit, which can be decoded independently and for which a duration is known.

The typical usage of a packet is to memset() it to zero in the beginning. Then for each packet call gavl_packet_alloc to ensure that enough data is allocated. At the very end call gavl_packet_free to free all memory.

## Field Documentation

## ◆ buf

gavl_buffer_t gavl_packet_s::buf

Data.

## ◆ flags

uint32_t gavl_packet_s::flags

ORed combination of GAVL_PACKET_* flags.

## ◆ position

int64_t gavl_packet_s::position

Position of the packet in the file. The exact meaning is format dependent.

## ◆ pts

int64_t gavl_packet_s::pts

Presentation time.

## ◆ dts

int64_t gavl_packet_s::dts

Decoding time.

## ◆ pes_pts

int64_t gavl_packet_s::pes_pts

PTS from the PES stream (probably in another scale).

## ◆ duration

int64_t gavl_packet_s::duration

Duration of the contained frame.

## ◆ field2_offset

uint32_t gavl_packet_s::field2_offset

Offset of field 2 for field pictures.

## ◆ header_size

uint32_t gavl_packet_s::header_size

Size of a repeated global header (or 0).

## ◆ sequence_end_pos

uint32_t gavl_packet_s::sequence_end_pos

Position of sequence end code if any.

## ◆ interlace_mode

gavl_interlace_mode_t gavl_packet_s::interlace_mode

Interlace mode for mixed interlacing.

## ◆ timecode

gavl_timecode_t gavl_packet_s::timecode

Timecode.

## ◆ src_rect

gavl_rectangle_i_t gavl_packet_s::src_rect

Rectangle to take from a video frame.

## ◆ dst_x

int32_t gavl_packet_s::dst_x

X-coordinate in the destination frame (for overlays).

## ◆ dst_y

int32_t gavl_packet_s::dst_y

Y-coordinate in the destination frame (for overlays).

## ◆ id

int32_t gavl_packet_s::id

ID of the gavf stream where this packet belongs.

The documentation for this struct was generated from the following file:

- compression.h