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

Data Structures

struct  LATMIdx
 
struct  GF_LATMDmxCtx
 

Macros

#define LATM_DMX_MAX_SIZE   8192
 
#define OFFS(_n)   #_n, offsetof(GF_LATMDmxCtx, _n)
 

Functions

static Bool latm_dmx_sync_frame_bs (GF_BitStream *bs, GF_M4ADecSpecInfo *acfg, u32 *nb_bytes, u8 *buffer, u32 *nb_skipped)
 
GF_Err latm_dmx_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static void latm_dmx_check_dur (GF_Filter *filter, GF_LATMDmxCtx *ctx)
 
static void latm_dmx_check_pid (GF_Filter *filter, GF_LATMDmxCtx *ctx)
 
static Bool latm_dmx_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
static GFINLINE void latm_dmx_update_cts (GF_LATMDmxCtx *ctx)
 
GF_Err latm_dmx_process (GF_Filter *filter)
 
static void latm_dmx_finalize (GF_Filter *filter)
 
static const char * latm_dmx_probe_data (const u8 *data, u32 size, GF_FilterProbeScore *score)
 
const GF_FilterRegister * rflatm_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability LATMDmxCaps []
 
static const GF_FilterArgs LATMDmxArgs []
 
GF_FilterRegister LATMDmxRegister
 

Data Structure Documentation

◆ LATMIdx

struct LATMIdx
Data Fields
u64 pos
Double duration

◆ GF_LATMDmxCtx

struct GF_LATMDmxCtx
+ Collaboration diagram for GF_LATMDmxCtx:
Data Fields
u32 frame_size
Double index
GF_FilterPid * ipid
GF_FilterPid * opid
GF_BitStream * bs
u64 file_pos
u64 cts
u32 sr_idx
u32 nb_ch
u32 base_object_type
GF_Fraction64 duration
Double start_range
Bool in_seek
u32 timescale
GF_M4ADecSpecInfo acfg
char * latm_buffer
u32 latm_buffer_size
u32 latm_buffer_alloc
u32 dts_inc
u32 sample_rate
Bool is_playing
Bool is_file
Bool file_loaded
Bool initial_play_done
GF_FilterPacket * src_pck
LATMIdx * indexes
u32 index_alloc_size
u32 index_size
u32 resume_from
Bool prev_sap
u32 bitrate
GF_Err in_error
Bool copy_props
u8 latm_dmx_buffer[LATM_DMX_MAX_SIZE]

Macro Definition Documentation

◆ LATM_DMX_MAX_SIZE

#define LATM_DMX_MAX_SIZE   8192

◆ OFFS

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

Function Documentation

◆ latm_dmx_sync_frame_bs()

static Bool latm_dmx_sync_frame_bs ( GF_BitStream *  bs,
GF_M4ADecSpecInfo acfg,
u32 nb_bytes,
u8 buffer,
u32 nb_skipped 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ latm_dmx_configure_pid()

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

◆ latm_dmx_check_dur()

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

◆ latm_dmx_check_pid()

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

◆ latm_dmx_process_event()

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

◆ latm_dmx_update_cts()

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

◆ latm_dmx_process()

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

◆ latm_dmx_finalize()

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

◆ latm_dmx_probe_data()

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

◆ rflatm_register()

const GF_FilterRegister* rflatm_register ( GF_FilterSession *  session)

Variable Documentation

◆ LATMDmxCaps

const GF_FilterCapability LATMDmxCaps[]
static
Initial value:
=
{
CAP_STRING(GF_CAPS_INPUT, GF_PROP_PID_MIME, "audio/aac+latm|audio/xheaac+latm"),
{0},
}
@ 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_FILE
Definition: constants.h:104
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#define CAP_STRING(_f, _a, _b)
Definition: filters.h:2194
#define GF_CAPS_OUTPUT_EXCLUDED
Definition: filters.h:2236
#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
@ 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_FILE_EXT
Definition: filters.h:1190
@ GF_PROP_PID_MIME
Definition: filters.h:1189
@ GF_TRUE
Definition: setup.h:474

◆ LATMDmxArgs

const GF_FilterArgs LATMDmxArgs[]
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},
{0}
}
@ GF_FS_ARG_HINT_EXPERT
Definition: filters.h:2104
@ GF_PROP_DOUBLE
Definition: filters.h:866
@ GF_PROP_UINT
Definition: filters.h:852
#define OFFS(_n)
Definition: reframe_latm.c:681

◆ LATMDmxRegister

GF_FilterRegister LATMDmxRegister
Initial value:
= {
.name = "rflatm",
.private_size = sizeof(GF_LATMDmxCtx),
.finalize = latm_dmx_finalize,
.configure_pid = latm_dmx_configure_pid,
.process = latm_dmx_process,
.probe_data = latm_dmx_probe_data,
.process_event = latm_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 Bool latm_dmx_process_event(GF_Filter *filter, const GF_FilterEvent *evt)
Definition: reframe_latm.c:381
GF_Err latm_dmx_process(GF_Filter *filter)
Definition: reframe_latm.c:460
static const char * latm_dmx_probe_data(const u8 *data, u32 size, GF_FilterProbeScore *score)
Definition: reframe_latm.c:630
static const GF_FilterArgs LATMDmxArgs[]
Definition: reframe_latm.c:682
GF_Err latm_dmx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: reframe_latm.c:199
static void latm_dmx_finalize(GF_Filter *filter)
Definition: reframe_latm.c:621
static const GF_FilterCapability LATMDmxCaps[]
Definition: reframe_latm.c:662
Definition: reframe_latm.c:42