libgpac
Documentation of the core library of GPAC
ES Interface

Basic stream interface API used by MPEG-2 TS muxer. More...

+ Collaboration diagram for ES Interface:

Data Structures

struct  GF_ESIPacket
 
struct  __esi_video_info
 
struct  __esi_audio_info
 
struct  GF_ESInterface
 

Enumerations

enum  { GF_ESI_INPUT_DATA_FLUSH , GF_ESI_INPUT_DATA_PULL , GF_ESI_INPUT_DATA_RELEASE , GF_ESI_INPUT_DESTROY }
 
enum  { GF_ESI_OUTPUT_DATA_DISPATCH }
 
enum  {
  GF_ESI_DATA_AU_START = 1 , GF_ESI_DATA_AU_END = 1<<1 , GF_ESI_DATA_HAS_CTS = 1<<2 , GF_ESI_DATA_HAS_DTS = 1<<3 ,
  GF_ESI_DATA_REPEAT = 1<<4
}
 
enum  {
  GF_ESI_AU_PULL_CAP = 1 , GF_ESI_STREAM_IS_OVER = 1<<2 , GF_ESI_STREAM_WITHOUT_MPEG4_SYSTEMS = 1<<3 , GF_ESI_AAC_USE_LATM = 1<<4 ,
  GF_ESI_STREAM_FLUSH = 1<<5 , GF_ESI_STREAM_HLS_SAES = 1<<6 , GF_ESI_FORCE_DOLBY_VISION = 1<<7 , GF_ESI_STREAM_SPARSE = 1<<8
}
 

Detailed Description

This section documents the ES interface used by the MPEG-2 TS muxer. This interface is used to describe streams and packets consumed by the TS muxer independently from the rest of GPAC (filter packets)


Data Structure Documentation

◆ GF_ESIPacket

struct GF_ESIPacket

stream interface for MPEG-2 TS muxer

Data Fields
u16 flags

packet flags

u8 sap_type

SAP type

u8 * data

payload

u32 data_len

payload size

u64 dts

DTS expressed in media timescale

u64 cts

CTS/PTS expressed in media timescale

u32 duration

duration expressed in media timescale

u32 pck_sn

packet sequence number

u32 au_sn

MPEG-4 Access Unit sequence number (use for carousel of BIFS/OD AU)

u32 isma_bso

ISM BSO for for packets using ISMACrypt/OMA/3GPP based crypto

u8 * mpeg2_af_descriptors

serialized list of AF descriptors

u32 mpeg2_af_descriptors_size

size of serialized list of AF descriptors

◆ __esi_video_info

struct __esi_video_info

video information for stream interface

Data Fields
u32 width

video width in pixels

u32 height

video height in pixels

u32 par

pixel aspect ratio as (num<<16)|den

Double FPS

video framerate

◆ __esi_audio_info

struct __esi_audio_info

audio information for stream interface

Data Fields
u32 sample_rate

sample rate

u32 nb_channels

number of channels

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

ESI input control commands

Enumerator
GF_ESI_INPUT_DATA_FLUSH 

forces a data flush from interface to dest (caller) - used for non-threaded interfaces corresponding parameter: unused

GF_ESI_INPUT_DATA_PULL 

pulls a COMPLETE AU from the stream corresponding parameter: pointer to a GF_ESIPacket to fill. The input data_len in the packet is used to indicate any padding in bytes

GF_ESI_INPUT_DATA_RELEASE 

releases the currently pulled AU from the stream - AU cannot be pulled after that, unless seek happens corresponding parameter: unused

GF_ESI_INPUT_DESTROY 

destroys any allocated resource by the stream interface

◆ anonymous enum

anonymous enum

ESI output control commands

Enumerator
GF_ESI_OUTPUT_DATA_DISPATCH 

forces a data flush from interface to dest (caller) - used for non-threaded interfaces corresponding parameter: GF_ESIPacket

◆ anonymous enum

anonymous enum

data packet flags

Enumerator
GF_ESI_DATA_AU_START 

packet is an access unit start

GF_ESI_DATA_AU_END 

packet is an access unit end

GF_ESI_DATA_HAS_CTS 

packet has valid CTS

GF_ESI_DATA_HAS_DTS 

packet has valid DTS

GF_ESI_DATA_REPEAT 

packet contains a carousel repeated AU

◆ anonymous enum

anonymous enum

ES interface capabilities

Enumerator
GF_ESI_AU_PULL_CAP 

data can be pulled from this stream

GF_ESI_STREAM_IS_OVER 

no more data to expect from this stream

GF_ESI_STREAM_WITHOUT_MPEG4_SYSTEMS 

stream is not signaled through MPEG-4 Systems (OD stream)

GF_ESI_AAC_USE_LATM 

stream is not signaled through MPEG-4 Systems (OD stream)

GF_ESI_STREAM_FLUSH 

temporary end of stream (flush of segment)

GF_ESI_STREAM_HLS_SAES 

stream uses HLS SAES encryption

GF_ESI_FORCE_DOLBY_VISION 

stream uses non-backward DolbyVision signaling

GF_ESI_STREAM_SPARSE 

sparse stream with currently no packets