libgpac
Documentation of the core library of GPAC
GF_M2TS_Mux_Stream Struct Reference

#include <mpegts.h>

+ Collaboration diagram for GF_M2TS_Mux_Stream:

Data Fields

struct __m2ts_mux_stream * next
 
u32 pid
 
u8 continuity_counter
 
struct __m2ts_mux_programprogram
 
u32 bit_rate
 
GF_M2TS_Time time
 
GF_M2TS_Time next_time
 
Bool pcr_only_mode
 
GF_M2TS_Mux_Tabletables
 
u32 total_table_size
 
GF_M2TS_Mux_Tablecurrent_table
 
GF_M2TS_Mux_Sectioncurrent_section
 
u32 current_section_offset
 
u32 refresh_rate_ms
 
u8 initial_version_number
 
u8 force_pes
 
Bool table_needs_update
 
Bool table_needs_send
 
Bool force_single_au
 
Bool set_initial_disc
 
Bool force_reg_desc
 
u32 min_bytes_copy_from_next
 
u32(* process )(struct __m2ts_mux *muxer, struct __m2ts_mux_stream *stream)
 
GF_M2TSStreamType mpeg2_stream_type
 
u32 mpeg2_stream_id
 
u32 scheduling_priority
 
GF_ESIPacket curr_pck
 
u32 pck_offset
 
u32 next_payload_size
 
u32 copy_from_next_packets
 
u32 next_next_payload_size
 
u32 next_next_next_payload_size
 
u32 pes_data_len
 
u32 pes_data_remain
 
Bool force_new
 
Bool discard_data
 
u16 next_pck_flags
 
u8 next_pck_sap
 
u64 next_pck_cts
 
u64 next_pck_dts
 
u32 reframe_overhead
 
Bool start_pes_at_rap
 
Bool prevent_two_au_start_in_pes
 
struct __elementary_stream_ifce * ifce
 
GF_Fraction ts_scale
 
GF_M2TS_Packetpck_first
 
GF_M2TS_Packetpck_last
 
GF_M2TS_Packetpck_reassembler
 
GF_Mutex * mx
 
u64 last_br_time
 
u32 bytes_since_last_time
 
u32 pes_since_last_time
 
u64 last_dts
 
u8 table_id
 
GF_SLHeader sl_header
 
u32 latm_last_aac_time
 
GF_List * loop_descriptors
 
u32 pck_sap_type
 
u64 pck_sap_time
 
u32 process_res
 

Detailed Description

MPEG-2 TS muxer stream

Field Documentation

◆ next

struct __m2ts_mux_stream* GF_M2TS_Mux_Stream::next

next stream

◆ pid

u32 GF_M2TS_Mux_Stream::pid

pid

◆ continuity_counter

u8 GF_M2TS_Mux_Stream::continuity_counter

CC of the stream

◆ program

struct __m2ts_mux_program* GF_M2TS_Mux_Stream::program

parent program

◆ bit_rate

u32 GF_M2TS_Mux_Stream::bit_rate

average stream bit-rate in bit/sec

◆ time

GF_M2TS_Time GF_M2TS_Mux_Stream::time

multiplexer time - NOT THE PCR

◆ next_time

GF_M2TS_Time GF_M2TS_Mux_Stream::next_time

next time for packet

◆ pcr_only_mode

Bool GF_M2TS_Mux_Stream::pcr_only_mode

allow PCR only packets

◆ tables

GF_M2TS_Mux_Table* GF_M2TS_Mux_Stream::tables

tables for section PIDs

◆ total_table_size

u32 GF_M2TS_Mux_Stream::total_table_size

total table sizes for bitrate estimation (PMT/PAT/...)

◆ current_table

GF_M2TS_Mux_Table* GF_M2TS_Mux_Stream::current_table

current table - used for on-the-fly packetization of sections

◆ current_section

GF_M2TS_Mux_Section* GF_M2TS_Mux_Stream::current_section

active section

◆ current_section_offset

u32 GF_M2TS_Mux_Stream::current_section_offset

current section offset

◆ refresh_rate_ms

u32 GF_M2TS_Mux_Stream::refresh_rate_ms

carousel rate in ms

◆ initial_version_number

u8 GF_M2TS_Mux_Stream::initial_version_number

init verision of table

◆ force_pes

u8 GF_M2TS_Mux_Stream::force_pes

PES version of transport for this codec type is forced

◆ table_needs_update

Bool GF_M2TS_Mux_Stream::table_needs_update

table needs updating

◆ table_needs_send

Bool GF_M2TS_Mux_Stream::table_needs_send

table needs send

◆ force_single_au

Bool GF_M2TS_Mux_Stream::force_single_au

force one AU per PES

◆ set_initial_disc

Bool GF_M2TS_Mux_Stream::set_initial_disc

force initial discontinuity

◆ force_reg_desc

Bool GF_M2TS_Mux_Stream::force_reg_desc

force registration descriptor

◆ min_bytes_copy_from_next

u32 GF_M2TS_Mux_Stream::min_bytes_copy_from_next

minimal amount of bytes we are allowed to copy frome next AU in the current PES. If no more than this is available in PES, don't copy from next

◆ process

u32(* GF_M2TS_Mux_Stream::process) (struct __m2ts_mux *muxer, struct __m2ts_mux_stream *stream)

process PES or table update/framing returns the priority of the stream, 0 meaning not scheduled, 1->N highest priority sent first

◆ mpeg2_stream_type

GF_M2TSStreamType GF_M2TS_Mux_Stream::mpeg2_stream_type

stream type

◆ mpeg2_stream_id

u32 GF_M2TS_Mux_Stream::mpeg2_stream_id

stream ID

◆ scheduling_priority

u32 GF_M2TS_Mux_Stream::scheduling_priority

priority

◆ curr_pck

GF_ESIPacket GF_M2TS_Mux_Stream::curr_pck

current packet being processed - does not belong to the packet fifo

◆ pck_offset

u32 GF_M2TS_Mux_Stream::pck_offset

offset in packet

◆ next_payload_size

u32 GF_M2TS_Mux_Stream::next_payload_size

size of next payload, 0 if unknown

◆ copy_from_next_packets

u32 GF_M2TS_Mux_Stream::copy_from_next_packets

number of bytes to copy from next packet

◆ next_next_payload_size

u32 GF_M2TS_Mux_Stream::next_next_payload_size

size of next next payload, 0 if unknown

◆ next_next_next_payload_size

u32 GF_M2TS_Mux_Stream::next_next_next_payload_size

size of next next next payload, 0 if unknown

◆ pes_data_len

u32 GF_M2TS_Mux_Stream::pes_data_len

size of packetized packet

◆ pes_data_remain

u32 GF_M2TS_Mux_Stream::pes_data_remain

remaining bytes to send as TS packets

◆ force_new

Bool GF_M2TS_Mux_Stream::force_new

if set forces a new PES packet at next packet

◆ discard_data

Bool GF_M2TS_Mux_Stream::discard_data

flag set to indicate packet data shall be freed (rewrite of source packet)

◆ next_pck_flags

u16 GF_M2TS_Mux_Stream::next_pck_flags

flags of next packet

◆ next_pck_sap

u8 GF_M2TS_Mux_Stream::next_pck_sap

SAP type of next packet

◆ next_pck_cts

u64 GF_M2TS_Mux_Stream::next_pck_cts

CTS of next packet

◆ next_pck_dts

u64 GF_M2TS_Mux_Stream::next_pck_dts

DTS of next packet

◆ reframe_overhead

u32 GF_M2TS_Mux_Stream::reframe_overhead

overhead of reframing in bytes (ex, ADTS header or LATM rewrite)

◆ start_pes_at_rap

Bool GF_M2TS_Mux_Stream::start_pes_at_rap

if set, forces a PES start at each RAP

◆ prevent_two_au_start_in_pes

Bool GF_M2TS_Mux_Stream::prevent_two_au_start_in_pes

if set, do not have more than one AU start in a PES packet

◆ ifce

struct __elementary_stream_ifce* GF_M2TS_Mux_Stream::ifce

ES interface of stream

◆ ts_scale

GF_Fraction GF_M2TS_Mux_Stream::ts_scale

timescale scale factor (90khz / es_ifce.timeScale)

◆ pck_first

GF_M2TS_Packet* GF_M2TS_Mux_Stream::pck_first

packet fifo head

◆ pck_last

GF_M2TS_Packet* GF_M2TS_Mux_Stream::pck_last

packet fifo tail

◆ pck_reassembler

GF_M2TS_Packet* GF_M2TS_Mux_Stream::pck_reassembler

packet reassembler (PES packets are most of the time full frames)

◆ mx

GF_Mutex* GF_M2TS_Mux_Stream::mx

mutex if enabled

◆ last_br_time

u64 GF_M2TS_Mux_Stream::last_br_time

avg bitrate computed

◆ bytes_since_last_time

u32 GF_M2TS_Mux_Stream::bytes_since_last_time

number of bytes sent since last bitrate estimation

◆ pes_since_last_time

u32 GF_M2TS_Mux_Stream::pes_since_last_time

number of PES packets sent since last bitrate estimation

◆ last_dts

u64 GF_M2TS_Mux_Stream::last_dts

last DTS sent

◆ table_id

u8 GF_M2TS_Mux_Stream::table_id

MPEG-4 over MPEG-2 sections table id (BIFS, OD, ...)

◆ sl_header

GF_SLHeader GF_M2TS_Mux_Stream::sl_header

MPEG-4 SyncLayer header of the packet

◆ latm_last_aac_time

u32 GF_M2TS_Mux_Stream::latm_last_aac_time

last time when the AAC config was sent for LATM

◆ loop_descriptors

GF_List* GF_M2TS_Mux_Stream::loop_descriptors

list of GF_M2TSDescriptor to add to the MPEG-2 stream. By default set to NULL

◆ pck_sap_type

u32 GF_M2TS_Mux_Stream::pck_sap_type

packet SAP type when segmenting the TS

◆ pck_sap_time

u64 GF_M2TS_Mux_Stream::pck_sap_time

packet SAP time (=PTS) when segmenting the TS

◆ process_res

u32 GF_M2TS_Mux_Stream::process_res

last process result