gavl: gavl_packet_t Struct Reference

gavl

Data Fields
gavl_packet_t Struct Reference
Compressed stream support

Packet structure. More...

`#include <compression.h>`

## Data Fields
uint8_t * | data
| Data.
int | data_len
| Length of data.
int | data_alloc
| How many bytes got allocated.
int | flags
| ORed combination of GAVL_PACKET_* flags.
int64_t | pts
| Presentation time.
int64_t | duration
| Duration of the contained frame.
int | field2_offset
| Offset of field 2 for field pictures.
int | header_size
| Size of a repeated global header (or 0)
int | sequence_end_pos
| Position of sequence end code if any.

## 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 indepentently and for which a duration is known.

The typical usage of a packet is to memset() oit 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

## ◆ data

uint8_t* gavl_packet_t::data

Data.

## ◆ data_len

int gavl_packet_t::data_len

Length of data.

## ◆ data_alloc

int gavl_packet_t::data_alloc

How many bytes got allocated.

## ◆ flags

int gavl_packet_t::flags

ORed combination of GAVL_PACKET_* flags.

## ◆ pts

int64_t gavl_packet_t::pts

Presentation time.

## ◆ duration

int64_t gavl_packet_t::duration

Duration of the contained frame.

## ◆ field2_offset

int gavl_packet_t::field2_offset

Offset of field 2 for field pictures.

## ◆ header_size

int gavl_packet_t::header_size

Size of a repeated global header (or 0)

## ◆ sequence_end_pos

int gavl_packet_t::sequence_end_pos

Position of sequence end code if any.

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

- /build/gavl/src/gavl-1.4.0/include/gavl/compression.h