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

Data Structures

struct  MP3Idx
 
struct  GF_MP3DmxCtx
 

Macros

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

Functions

GF_Err mp3_dmx_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static void mp3_dmx_check_dur (GF_Filter *filter, GF_MP3DmxCtx *ctx)
 
static void id3dmx_set_string (GF_FilterPid *apid, char *name, u8 *buf, Bool is_dyn)
 
void id3dmx_flush (GF_Filter *filter, u8 *id3_buf, u32 id3_buf_size, GF_FilterPid *audio_pid, GF_FilterPid **video_pid_p)
 
static void mp3_dmx_flush_id3 (GF_Filter *filter, GF_MP3DmxCtx *ctx)
 
static void mp3_dmx_check_pid (GF_Filter *filter, GF_MP3DmxCtx *ctx)
 
static Bool mp3_dmx_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
static GFINLINE void mp3_dmx_update_cts (GF_MP3DmxCtx *ctx)
 
GF_Err mp3_dmx_process (GF_Filter *filter)
 
static GF_Err mp3_dmx_initialize (GF_Filter *filter)
 
static void mp3_dmx_finalize (GF_Filter *filter)
 
static const char * mp3_dmx_probe_data (const u8 *data, u32 size, GF_FilterProbeScore *score)
 
const GF_FilterRegister * rfmp3_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability MP3DmxCaps []
 
static const GF_FilterArgs MP3DmxArgs []
 
GF_FilterRegister MP3DmxRegister
 

Data Structure Documentation

◆ MP3Idx

struct MP3Idx
Data Fields
u64 pos
Double duration

◆ GF_MP3DmxCtx

struct GF_MP3DmxCtx
+ Collaboration diagram for GF_MP3DmxCtx:
Data Fields
Double index
Bool expart
Bool forcemp3
GF_FilterPid * ipid
GF_FilterPid * opid
GF_BitStream * bs
u64 file_pos
u64 cts
u64 prev_cts
u32 sr
u32 nb_ch
u32 codecid
GF_Fraction64 duration
Double start_range
Bool in_seek
u32 timescale
Bool is_playing
Bool is_file
Bool initial_play_done
Bool file_loaded
u32 hdr
u8 * mp3_buffer
u32 mp3_buffer_size
u32 mp3_buffer_alloc
u32 resume_from
u64 byte_offset
GF_FilterPacket * src_pck
Bool recompute_cts
MP3Idx * indexes
u32 index_alloc_size
u32 index_size
u32 tag_size
u8 * id3_buffer
u32 id3_buffer_size
u32 id3_buffer_alloc
GF_FilterPid * vpid
Bool copy_props
Bool is_sync

Macro Definition Documentation

◆ OFFS

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

Function Documentation

◆ mp3_dmx_configure_pid()

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

◆ mp3_dmx_check_dur()

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

◆ id3dmx_set_string()

static void id3dmx_set_string ( GF_FilterPid *  apid,
char *  name,
u8 buf,
Bool  is_dyn 
)
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:

◆ mp3_dmx_flush_id3()

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

◆ mp3_dmx_check_pid()

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

◆ mp3_dmx_process_event()

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

◆ mp3_dmx_update_cts()

static GFINLINE void mp3_dmx_update_cts ( GF_MP3DmxCtx ctx)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mp3_dmx_process()

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

◆ mp3_dmx_initialize()

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

◆ mp3_dmx_finalize()

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

◆ mp3_dmx_probe_data()

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

◆ rfmp3_register()

const GF_FilterRegister* rfmp3_register ( GF_FilterSession *  session)

Variable Documentation

◆ MP3DmxCaps

const GF_FilterCapability MP3DmxCaps[]
static
Initial value:
=
{
CAP_STRING(GF_CAPS_INPUT, GF_PROP_PID_MIME, "audio/mp3|audio/x-mp3"),
{0},
{0},
}
@ GF_CODECID_MPEG_AUDIO
Definition: constants.h:448
@ GF_CODECID_MPEG_AUDIO_L1
Definition: constants.h:641
@ GF_CODECID_MPEG2_PART3
Definition: constants.h:444
@ GF_STREAM_AUDIO
Definition: constants.h:66
@ 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_OUTPUT_EXCLUDED
Definition: filters.h:2236
#define CAP_BOOL(_f, _a, _b)
Definition: filters.h:2180
#define GF_CAPS_INPUT
Definition: filters.h:2220
@ GF_PROP_PID_CODECID
Definition: filters.h:1116
@ 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

◆ MP3DmxArgs

const GF_FilterArgs MP3DmxArgs[]
static
Initial value:
=
{
{ OFFS(index), "indexing window length", GF_PROP_DOUBLE, "1.0", NULL, 0},
{ OFFS(expart), "expose pictures as a dedicated video PID", GF_PROP_BOOL, "false", NULL, 0},
{ OFFS(forcemp3), "force mp3 signaling for MPEG-2 Audio layer 3", GF_PROP_BOOL, "true", NULL, GF_ARG_HINT_EXPERT},
{0}
}
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_DOUBLE
Definition: filters.h:866
#define GF_ARG_HINT_EXPERT
Definition: main.h:123
#define OFFS(_n)
Definition: reframe_mp3.c:902

◆ MP3DmxRegister

GF_FilterRegister MP3DmxRegister
Initial value:
= {
.name = "rfmp3",
.private_size = sizeof(GF_MP3DmxCtx),
.initialize = mp3_dmx_initialize,
.finalize = mp3_dmx_finalize,
.configure_pid = mp3_dmx_configure_pid,
.process = mp3_dmx_process,
.probe_data = mp3_dmx_probe_data,
.process_event = mp3_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
GF_Err mp3_dmx_process(GF_Filter *filter)
Definition: reframe_mp3.c:509
static GF_Err mp3_dmx_initialize(GF_Filter *filter)
Definition: reframe_mp3.c:763
static void mp3_dmx_finalize(GF_Filter *filter)
Definition: reframe_mp3.c:771
static const GF_FilterCapability MP3DmxCaps[]
Definition: reframe_mp3.c:877
static const char * mp3_dmx_probe_data(const u8 *data, u32 size, GF_FilterProbeScore *score)
Definition: reframe_mp3.c:782
static Bool mp3_dmx_process_event(GF_Filter *filter, const GF_FilterEvent *evt)
Definition: reframe_mp3.c:427
static const GF_FilterArgs MP3DmxArgs[]
Definition: reframe_mp3.c:903
GF_Err mp3_dmx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: reframe_mp3.c:85
Definition: reframe_mp3.c:39