libgpac
Documentation of the core library of GPAC
dmx_m2ts.c File Reference
#include <gpac/filters.h>
#include <gpac/constants.h>
#include <gpac/mpegts.h>
#include <gpac/thread.h>
#include <gpac/internal/media_dev.h>
#include <gpac/internal/id3.h>
+ Include dependency graph for dmx_m2ts.c:

Data Structures

struct  GF_M2TSDmxCtx_Prog
 
struct  GF_M2TS_Prop
 
struct  GF_M2TS_Prop_TEMIInfo
 
struct  GF_M2TSDmxCtx
 

Macros

#define GF_M2TS_PROP
 
#define M2TS_MAX_LOOPS   50
 
#define OFFS(_n)   #_n, offsetof(GF_M2TSDmxCtx, _n)
 

Enumerations

enum  GF_M2TS_PropType { M2TS_TEMI_INFO , M2TS_ID3 , M2TS_SCTE35 }
 
enum  { DMX_TUNE_DONE =0 , DMX_TUNE_INIT , DMX_TUNE_WAIT_PROGS , DMX_TUNE_WAIT_SEEK }
 

Functions

static void m2tsdmx_prop_free (GF_M2TS_Prop *prop)
 
static void m2tsdmx_estimate_duration (GF_M2TSDmxCtx *ctx, GF_M2TS_ES *stream)
 
static void m2tsdmx_on_event_duration_probe (GF_M2TS_Demuxer *ts, u32 evt_type, void *param)
 
static void m2tsdmx_update_sdt (GF_M2TS_Demuxer *ts, void *for_pid)
 
static void m2tsdmx_declare_pid (GF_M2TSDmxCtx *ctx, GF_M2TS_PES *stream, GF_ESD *esd)
 
static void m2tsdmx_setup_scte35 (GF_M2TSDmxCtx *ctx, GF_M2TS_Program *prog)
 
static void m2tsdmx_setup_program (GF_M2TSDmxCtx *ctx, GF_M2TS_Program *prog)
 
static void m2tdmx_merge_props (GF_FilterPid *pid, GF_M2TS_ES *stream, GF_FilterPacket *pck)
 
static void m2tsdmx_send_packet (GF_M2TSDmxCtx *ctx, GF_M2TS_PES_PCK *pck)
 
static GF_M2TS_ES * m2tsdmx_get_m4sys_stream (GF_M2TSDmxCtx *ctx, u32 m4sys_es_id)
 
static GFINLINE void m2tsdmx_send_sl_packet (GF_M2TSDmxCtx *ctx, GF_M2TS_SL_PCK *pck)
 
static void m2tsdmx_on_event (GF_M2TS_Demuxer *ts, u32 evt_type, void *param)
 
static GF_Err m2tsdmx_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static GF_M2TS_PES * m2tsdmx_get_stream (GF_M2TSDmxCtx *ctx, GF_FilterPid *pid)
 
static void m2tsdmx_switch_quality (GF_M2TS_Program *prog, GF_M2TS_Demuxer *ts, Bool switch_up)
 
static Bool m2tsdmx_process_event (GF_Filter *filter, const GF_FilterEvent *com)
 
static GF_Err m2tsdmx_initialize (GF_Filter *filter)
 
static void m2tsdmx_finalize (GF_Filter *filter)
 
static GF_Err m2tsdmx_process (GF_Filter *filter)
 
static const char * m2tsdmx_probe_data (const u8 *data, u32 size, GF_FilterProbeScore *score)
 
const GF_FilterRegister * m2tsdmx_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability M2TSDmxCaps []
 
static const GF_FilterArgs M2TSDmxArgs []
 
GF_FilterRegister M2TSDmxRegister
 

Data Structure Documentation

◆ GF_M2TSDmxCtx_Prog

struct GF_M2TSDmxCtx_Prog
Data Fields
char * fragment
u32 id
u32 pid

◆ GF_M2TS_Prop

struct GF_M2TS_Prop

◆ GF_M2TS_Prop_TEMIInfo

struct GF_M2TS_Prop_TEMIInfo
Data Fields
GF_M2TS_PROP u32 timeline_id
Bool is_loc

◆ GF_M2TSDmxCtx

struct GF_M2TSDmxCtx
+ Collaboration diagram for GF_M2TSDmxCtx:
Data Fields
const char * temi_url
Bool dsmcc
Bool seeksrc
Bool sigfrag
Bool dvbtxt
Double index
GF_Filter * filter
GF_FilterPid * ipid
GF_M2TS_Demuxer * ts
GF_FilterPid * eit_pid
Bool is_file
u64 file_size
Bool in_seek
Bool initial_play_done
u32 nb_playing
u32 nb_stop_pending
GF_Fraction64 duration
u64 first_pcr_found
u16 pcr_pid
u64 nb_pck_at_pcr
u32 map_time_on_prog_id
Double media_start_range
u32 mux_tune_state
u32 wait_for_progs
Bool is_dash
u32 nb_stopped_at_init

Macro Definition Documentation

◆ GF_M2TS_PROP

#define GF_M2TS_PROP
Value:
u32 len; \
u8 *data; \
GF_M2TS_PropType
Definition: dmx_m2ts.c:45

◆ M2TS_MAX_LOOPS

#define M2TS_MAX_LOOPS   50

◆ OFFS

#define OFFS (   _n)    #_n, offsetof(GF_M2TSDmxCtx, _n)

Enumeration Type Documentation

◆ GF_M2TS_PropType

Enumerator
M2TS_TEMI_INFO 
M2TS_ID3 
M2TS_SCTE35 

◆ anonymous enum

anonymous enum
Enumerator
DMX_TUNE_DONE 
DMX_TUNE_INIT 
DMX_TUNE_WAIT_PROGS 
DMX_TUNE_WAIT_SEEK 

Function Documentation

◆ m2tsdmx_prop_free()

static void m2tsdmx_prop_free ( GF_M2TS_Prop prop)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m2tsdmx_estimate_duration()

static void m2tsdmx_estimate_duration ( GF_M2TSDmxCtx ctx,
GF_M2TS_ES *  stream 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m2tsdmx_on_event_duration_probe()

static void m2tsdmx_on_event_duration_probe ( GF_M2TS_Demuxer ts,
u32  evt_type,
void *  param 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m2tsdmx_update_sdt()

static void m2tsdmx_update_sdt ( GF_M2TS_Demuxer ts,
void *  for_pid 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m2tsdmx_declare_pid()

static void m2tsdmx_declare_pid ( GF_M2TSDmxCtx ctx,
GF_M2TS_PES *  stream,
GF_ESD esd 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m2tsdmx_setup_scte35()

static void m2tsdmx_setup_scte35 ( GF_M2TSDmxCtx ctx,
GF_M2TS_Program prog 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m2tsdmx_setup_program()

static void m2tsdmx_setup_program ( GF_M2TSDmxCtx ctx,
GF_M2TS_Program prog 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m2tdmx_merge_props()

static void m2tdmx_merge_props ( GF_FilterPid *  pid,
GF_M2TS_ES *  stream,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m2tsdmx_send_packet()

static void m2tsdmx_send_packet ( GF_M2TSDmxCtx ctx,
GF_M2TS_PES_PCK *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m2tsdmx_get_m4sys_stream()

static GF_M2TS_ES* m2tsdmx_get_m4sys_stream ( GF_M2TSDmxCtx ctx,
u32  m4sys_es_id 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m2tsdmx_send_sl_packet()

static GFINLINE void m2tsdmx_send_sl_packet ( GF_M2TSDmxCtx ctx,
GF_M2TS_SL_PCK *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m2tsdmx_on_event()

static void m2tsdmx_on_event ( GF_M2TS_Demuxer ts,
u32  evt_type,
void *  param 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m2tsdmx_configure_pid()

static GF_Err m2tsdmx_configure_pid ( GF_Filter *  filter,
GF_FilterPid *  pid,
Bool  is_remove 
)
static
+ Here is the call graph for this function:

◆ m2tsdmx_get_stream()

static GF_M2TS_PES* m2tsdmx_get_stream ( GF_M2TSDmxCtx ctx,
GF_FilterPid *  pid 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m2tsdmx_switch_quality()

static void m2tsdmx_switch_quality ( GF_M2TS_Program prog,
GF_M2TS_Demuxer ts,
Bool  switch_up 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m2tsdmx_process_event()

static Bool m2tsdmx_process_event ( GF_Filter *  filter,
const GF_FilterEvent *  com 
)
static
+ Here is the call graph for this function:

◆ m2tsdmx_initialize()

static GF_Err m2tsdmx_initialize ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ m2tsdmx_finalize()

static void m2tsdmx_finalize ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ m2tsdmx_process()

static GF_Err m2tsdmx_process ( GF_Filter *  filter)
static
+ Here is the call graph for this function:

◆ m2tsdmx_probe_data()

static const char* m2tsdmx_probe_data ( const u8 data,
u32  size,
GF_FilterProbeScore score 
)
static
+ Here is the call graph for this function:

◆ m2tsdmx_register()

const GF_FilterRegister* m2tsdmx_register ( GF_FilterSession *  session)

Variable Documentation

◆ M2TSDmxCaps

const GF_FilterCapability M2TSDmxCaps[]
static
Initial value:
=
{
CAP_STRING(GF_CAPS_INPUT_STATIC, GF_PROP_PID_MIME, "video/mpeg-2|video/mp2t|video/mpeg|audio/mpeg-2|audio/mp2t"),
}
@ GF_CODECID_RAW
Definition: constants.h:600
@ GF_STREAM_PRIVATE_SCENE
Definition: constants.h:98
@ GF_STREAM_TEXT
Definition: constants.h:82
@ GF_STREAM_OD
Definition: constants.h:58
@ GF_STREAM_AUDIO
Definition: constants.h:66
@ GF_STREAM_SCENE
Definition: constants.h:62
@ GF_STREAM_ENCRYPTED
Definition: constants.h:102
@ GF_STREAM_FILE
Definition: constants.h:104
@ GF_STREAM_METADATA
Definition: constants.h:100
@ GF_STREAM_VISUAL
Definition: constants.h:64
#define GF_CAPS_OUTPUT
Definition: filters.h:2232
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#define GF_CAPS_INPUT_STATIC
Definition: filters.h:2224
#define CAP_STRING(_f, _a, _b)
Definition: filters.h:2194
#define GF_CAPS_OUTPUT_EXCLUDED
Definition: filters.h:2236
@ GF_PROP_PID_CODECID
Definition: filters.h:1116
@ GF_PROP_PID_STREAM_TYPE
Definition: filters.h:1112
@ GF_PROP_PID_FILE_EXT
Definition: filters.h:1190
@ GF_PROP_PID_MIME
Definition: filters.h:1189

◆ M2TSDmxArgs

const GF_FilterArgs M2TSDmxArgs[]
static
Initial value:
=
{
{ OFFS(temi_url), "force TEMI URL", GF_PROP_NAME, NULL, NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(dsmcc), "enable DSMCC receiver", GF_PROP_BOOL, "no", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(seeksrc), "seek local source file back to origin once all programs are setup", GF_PROP_BOOL, "true", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(sigfrag), "signal segment boundaries on output packets for DASH or HLS sources", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(dvbtxt), "export DVB teletext streams", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(index), "indexing window length", GF_PROP_DOUBLE, "1.0", NULL, GF_FS_ARG_HINT_HIDE},
{0}
}
#define OFFS(_n)
Definition: dmx_m2ts.c:1725
@ GF_FS_ARG_HINT_EXPERT
Definition: filters.h:2104
@ GF_FS_ARG_HINT_HIDE
Definition: filters.h:2106
@ GF_FS_ARG_HINT_ADVANCED
Definition: filters.h:2102
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_DOUBLE
Definition: filters.h:866
@ GF_PROP_NAME
Definition: filters.h:884

◆ M2TSDmxRegister

GF_FilterRegister M2TSDmxRegister
Initial value:
= {
.name = "m2tsdmx",
.private_size = sizeof(GF_M2TSDmxCtx),
.initialize = m2tsdmx_initialize,
.finalize = m2tsdmx_finalize,
.configure_pid = m2tsdmx_configure_pid,
.process = m2tsdmx_process,
.process_event = m2tsdmx_process_event,
.probe_data = m2tsdmx_probe_data,
.hint_class_type = GF_FS_CLASS_DEMULTIPLEXER
}
static GF_Err m2tsdmx_process(GF_Filter *filter)
Definition: dmx_m2ts.c:1614
static const char * m2tsdmx_probe_data(const u8 *data, u32 size, GF_FilterProbeScore *score)
Definition: dmx_m2ts.c:1700
static GF_Err m2tsdmx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: dmx_m2ts.c:1333
static const GF_FilterCapability M2TSDmxCaps[]
Definition: dmx_m2ts.c:1709
static GF_Err m2tsdmx_initialize(GF_Filter *filter)
Definition: dmx_m2ts.c:1586
static const GF_FilterArgs M2TSDmxArgs[]
Definition: dmx_m2ts.c:1726
static Bool m2tsdmx_process_event(GF_Filter *filter, const GF_FilterEvent *com)
Definition: dmx_m2ts.c:1455
static void m2tsdmx_finalize(GF_Filter *filter)
Definition: dmx_m2ts.c:1605
Definition: dmx_m2ts.c:75
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_REG_DYNAMIC_PIDS
Definition: filters.h:2403
@ GF_FS_CLASS_DEMULTIPLEXER
Definition: filters.h:2461
attribute Array args
Definition: jsf.idl:24