libgpac
Documentation of the core library of GPAC
reframe_adts.c File Reference
#include <gpac/avparse.h>
#include <gpac/constants.h>
#include <gpac/filters.h>
+ Include dependency graph for reframe_adts.c:

Data Structures

struct  ADTSHeader
 
struct  ADTSIdx
 
struct  GF_ADTSDmxCtx
 

Macros

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

Enumerations

enum  { AAC_SIGNAL_NONE =0 , AAC_SIGNAL_IMPLICIT , AAC_SIGNAL_EXPLICIT }
 

Functions

static Bool adts_dmx_sync_frame_bs (GF_BitStream *bs, ADTSHeader *hdr)
 
void id3dmx_flush (GF_Filter *filter, u8 *id3_buf, u32 id3_buf_size, GF_FilterPid *audio_pid, GF_FilterPid **video_pid_p)
 
GF_Err adts_dmx_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static void adts_dmx_check_dur (GF_Filter *filter, GF_ADTSDmxCtx *ctx)
 
static void adts_dmx_check_pid (GF_Filter *filter, GF_ADTSDmxCtx *ctx)
 
static Bool adts_dmx_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
static GFINLINE void adts_dmx_update_cts (GF_ADTSDmxCtx *ctx)
 
GF_Err adts_dmx_process (GF_Filter *filter)
 
static void adts_dmx_finalize (GF_Filter *filter)
 
static const char * adts_dmx_probe_data (const u8 *data, u32 size, GF_FilterProbeScore *score)
 
const GF_FilterRegister * rfadts_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability ADTSDmxCaps []
 
static const GF_FilterArgs ADTSDmxArgs []
 
GF_FilterRegister ADTSDmxRegister
 

Data Structure Documentation

◆ ADTSHeader

struct ADTSHeader
Data Fields
Bool is_mp2
Bool no_crc
u32 profile
u32 sr_idx
u32 nb_ch
u32 frame_size
u32 hdr_size

◆ ADTSIdx

struct ADTSIdx
Data Fields
u64 pos
Double duration

◆ GF_ADTSDmxCtx

struct GF_ADTSDmxCtx
+ Collaboration diagram for GF_ADTSDmxCtx:
Data Fields
u32 frame_size
Double index
u32 sbr
u32 ps
Bool ovsbr
Bool expart
s32 aacchcfg
GF_FilterPid * ipid
GF_FilterPid * opid
GF_FilterPid * vpid
GF_BitStream * bs
u64 file_pos
u64 cts
u32 sr_idx
u32 nb_ch
u32 is_mp2
u32 profile
GF_Fraction64 duration
Double start_range
Bool in_seek
u32 timescale
u32 sample_rate
ADTSHeader hdr
u32 dts_inc
Bool is_playing
Bool is_file
Bool file_loaded
Bool initial_play_done
Bool copy_props
GF_FilterPacket * src_pck
ADTSIdx * indexes
u32 index_alloc_size
u32 index_size
u8 * adts_buffer
u32 adts_buffer_size
u32 adts_buffer_alloc
u32 resume_from
u64 byte_offset
u32 tag_size
u8 * id3_buffer
u32 id3_buffer_size
u32 id3_buffer_alloc
u32 nb_frames
GF_M4ADecSpecInfo acfg
u32 bitrate
Bool is_sync

Macro Definition Documentation

◆ OFFS

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

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
AAC_SIGNAL_NONE 
AAC_SIGNAL_IMPLICIT 
AAC_SIGNAL_EXPLICIT 

Function Documentation

◆ adts_dmx_sync_frame_bs()

static Bool adts_dmx_sync_frame_bs ( GF_BitStream *  bs,
ADTSHeader hdr 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ id3dmx_flush()

void id3dmx_flush ( GF_Filter *  filter,
u8 id3_buf,
u32  id3_buf_size,
GF_FilterPid *  audio_pid,
GF_FilterPid **  video_pid_p 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ adts_dmx_configure_pid()

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

◆ adts_dmx_check_dur()

static void adts_dmx_check_dur ( GF_Filter *  filter,
GF_ADTSDmxCtx ctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ adts_dmx_check_pid()

static void adts_dmx_check_pid ( GF_Filter *  filter,
GF_ADTSDmxCtx ctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ adts_dmx_process_event()

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

◆ adts_dmx_update_cts()

static GFINLINE void adts_dmx_update_cts ( GF_ADTSDmxCtx ctx)
static
+ Here is the caller graph for this function:

◆ adts_dmx_process()

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

◆ adts_dmx_finalize()

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

◆ adts_dmx_probe_data()

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

◆ rfadts_register()

const GF_FilterRegister* rfadts_register ( GF_FilterSession *  session)

Variable Documentation

◆ ADTSDmxCaps

const GF_FilterCapability ADTSDmxCaps[]
static
Initial value:
=
{
CAP_STRING(GF_CAPS_INPUT, GF_PROP_PID_MIME, "audio/x-m4a|audio/aac|audio/aacp|audio/x-aac"),
{0},
{0},
}
#define GF_HLS_SAMPLE_AES_SCHEME
Definition: constants.h:1226
@ GF_CODECID_AAC_MPEG4
Definition: constants.h:424
@ GF_CODECID_AAC_MPEG2_SSRP
Definition: constants.h:442
@ GF_CODECID_AAC_MPEG2_LCP
Definition: constants.h:440
@ GF_CODECID_AAC_MPEG2_MP
Definition: constants.h:438
@ GF_STREAM_AUDIO
Definition: constants.h:66
@ GF_STREAM_ENCRYPTED
Definition: constants.h:102
@ GF_STREAM_FILE
Definition: constants.h:104
#define GF_CAPS_OUTPUT
Definition: filters.h:2232
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#define CAP_STRING(_f, _a, _b)
Definition: filters.h:2194
#define GF_CAPS_INPUT_OUTPUT
Definition: filters.h:2242
#define GF_CAPS_INPUT_EXCLUDED
Definition: filters.h:2228
#define CAP_BOOL(_f, _a, _b)
Definition: filters.h:2180
#define GF_CAPS_INPUT
Definition: filters.h:2220
#define GF_CAPS_OUTPUT_STATIC
Definition: filters.h:2238
#define GF_CAPS_OUTPUT_STATIC_EXCLUDED
Definition: filters.h:2240
@ GF_PROP_PID_CODECID
Definition: filters.h:1116
@ GF_PROP_PID_UNFRAMED_LATM
Definition: filters.h:1141
@ GF_PROP_PID_STREAM_TYPE
Definition: filters.h:1112
@ GF_PROP_PID_UNFRAMED
Definition: filters.h:1118
@ GF_PROP_PID_PROTECTION_SCHEME_TYPE
Definition: filters.h:1209
@ GF_PROP_PID_FILE_EXT
Definition: filters.h:1190
@ GF_PROP_PID_MIME
Definition: filters.h:1189
@ GF_TRUE
Definition: setup.h:474

◆ ADTSDmxArgs

const GF_FilterArgs ADTSDmxArgs[]
static
Initial value:
=
{
{ OFFS(frame_size), "size of AAC frame in audio samples", GF_PROP_UINT, "1024", NULL, GF_FS_ARG_HINT_EXPERT},
{ OFFS(index), "indexing window length", GF_PROP_DOUBLE, "1.0", NULL, 0},
{ OFFS(ovsbr), "force oversampling SBR (does not multiply timescales by 2)", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(sbr), "set SBR signaling\n"
"- no: no SBR signaling at all\n"
"- imp: backward-compatible SBR signaling (audio signaled as AAC-LC)\n"
"- exp: explicit SBR signaling (audio signaled as AAC-SBR)"
, GF_PROP_UINT, "no", "no|imp|exp", GF_FS_ARG_HINT_ADVANCED},
{ OFFS(ps), "set PS signaling\n"
"- no: no PS signaling at all\n"
"- imp: backward-compatible PS signaling (audio signaled as AAC-LC)\n"
"- exp: explicit PS signaling (audio signaled as AAC-PS)"
, GF_PROP_UINT, "no", "no|imp|exp", GF_FS_ARG_HINT_ADVANCED},
{ OFFS(expart), "expose pictures as a dedicated video PID", GF_PROP_BOOL, "false", NULL, 0},
{ OFFS(aacchcfg), "set AAC channel configuration to this value if missing from ADTS header, use negative value to always override", GF_PROP_SINT, "0", NULL, GF_FS_ARG_HINT_EXPERT},
{0}
}
@ GF_FS_ARG_HINT_EXPERT
Definition: filters.h:2104
@ GF_FS_ARG_HINT_ADVANCED
Definition: filters.h:2102
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_SINT
Definition: filters.h:850
@ GF_PROP_DOUBLE
Definition: filters.h:866
@ GF_PROP_UINT
Definition: filters.h:852
#define OFFS(_n)
Definition: reframe_adts.c:1013

◆ ADTSDmxRegister

GF_FilterRegister ADTSDmxRegister
Initial value:
= {
.name = "rfadts",
.private_size = sizeof(GF_ADTSDmxCtx),
.finalize = adts_dmx_finalize,
.configure_pid = adts_dmx_configure_pid,
.process = adts_dmx_process,
.probe_data = adts_dmx_probe_data,
.process_event = adts_dmx_process_event,
.hint_class_type = GF_FS_CLASS_FRAMING
}
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_CLASS_FRAMING
Definition: filters.h:2459
attribute Array args
Definition: jsf.idl:24
static const GF_FilterCapability ADTSDmxCaps[]
Definition: reframe_adts.c:987
static const char * adts_dmx_probe_data(const u8 *data, u32 size, GF_FilterProbeScore *score)
Definition: reframe_adts.c:919
GF_Err adts_dmx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: reframe_adts.c:195
static void adts_dmx_finalize(GF_Filter *filter)
Definition: reframe_adts.c:909
static Bool adts_dmx_process_event(GF_Filter *filter, const GF_FilterEvent *evt)
Definition: reframe_adts.c:475
GF_Err adts_dmx_process(GF_Filter *filter)
Definition: reframe_adts.c:557
static const GF_FilterArgs ADTSDmxArgs[]
Definition: reframe_adts.c:1014
Definition: reframe_adts.c:52