libgpac
Documentation of the core library of GPAC
resample_audio.c File Reference
+ Include dependency graph for resample_audio.c:

Data Structures

struct  GF_ResampleCtx
 

Macros

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

Functions

static u8resample_fetch_frame (void *callback, u32 *size, u32 *planar_stride, u32 audio_delay_ms)
 
static void resample_release_frame (void *callback, u32 nb_bytes)
 
static Bool resample_get_config (struct _audiointerface *ai, Bool for_reconf)
 
static Bool resample_is_muted (void *callback)
 
static Fixed resample_get_speed (void *callback)
 
static Bool resample_get_channel_volume (void *callback, Fixed *vol)
 
static GF_Err resample_initialize (GF_Filter *filter)
 
static void resample_finalize (GF_Filter *filter)
 
static GF_Err resample_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static GF_Err resample_process (GF_Filter *filter)
 
static GF_Err resample_reconfigure_output (GF_Filter *filter, GF_FilterPid *pid)
 
static Bool resample_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
const GF_FilterRegister * resample_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability ResamplerCaps []
 
static GF_FilterArgs ResamplerArgs []
 
GF_FilterRegister ResamplerRegister
 

Data Structure Documentation

◆ GF_ResampleCtx

struct GF_ResampleCtx
+ Collaboration diagram for GF_ResampleCtx:
Data Fields
u32 och
u32 osr
u32 osfmt
GF_FilterPid * ipid
GF_FilterPid * opid
GF_AudioMixer * mixer
Bool cfg_forced
u32 freq
u32 nb_ch
u32 afmt
u64 ch_cfg
u64 out_cts_plus_one
char * olayout
Bool src_is_planar
GF_AudioInterface input_ai
Bool passthrough
u32 timescale
const char * data
u32 size
u32 bytes_consumed
Fixed speed
GF_FilterPacket * in_pck
Bool cfg_changed

Macro Definition Documentation

◆ OFFS

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

Function Documentation

◆ resample_fetch_frame()

static u8* resample_fetch_frame ( void *  callback,
u32 size,
u32 planar_stride,
u32  audio_delay_ms 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resample_release_frame()

static void resample_release_frame ( void *  callback,
u32  nb_bytes 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resample_get_config()

static Bool resample_get_config ( struct _audiointerface *  ai,
Bool  for_reconf 
)
static
+ Here is the caller graph for this function:

◆ resample_is_muted()

static Bool resample_is_muted ( void *  callback)
static
+ Here is the caller graph for this function:

◆ resample_get_speed()

static Fixed resample_get_speed ( void *  callback)
static
+ Here is the caller graph for this function:

◆ resample_get_channel_volume()

static Bool resample_get_channel_volume ( void *  callback,
Fixed vol 
)
static
+ Here is the caller graph for this function:

◆ resample_initialize()

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

◆ resample_finalize()

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

◆ resample_configure_pid()

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

◆ resample_process()

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

◆ resample_reconfigure_output()

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

◆ resample_process_event()

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

◆ resample_register()

const GF_FilterRegister* resample_register ( GF_FilterSession *  session)
+ Here is the call graph for this function:

Variable Documentation

◆ ResamplerCaps

const GF_FilterCapability ResamplerCaps[]
static
Initial value:
=
{
}
@ GF_CODECID_RAW
Definition: constants.h:600
@ GF_STREAM_AUDIO
Definition: constants.h:66
#define GF_CAPS_OUTPUT
Definition: filters.h:2232
#define CAP_UINT(_f, _a, _b)
Definition: filters.h:2172
#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

◆ ResamplerArgs

GF_FilterArgs ResamplerArgs[]
static
Initial value:
=
{
{ OFFS(och), "desired number of output audio channels (0 for auto)", GF_PROP_UINT, "0", NULL, 0},
{ OFFS(osr), "desired sample rate of output audio (0 for auto)", GF_PROP_UINT, "0", NULL, 0},
{ OFFS(osfmt), "desired sample format of output audio (`none` for auto)", GF_PROP_PCMFMT, "none", NULL, 0},
{ OFFS(olayout), "desired CICP layout of output audio (null for auto)", GF_PROP_CICP_LAYOUT, NULL, NULL, 0},
{0}
}
@ GF_PROP_CICP_LAYOUT
Definition: filters.h:926
@ GF_PROP_UINT
Definition: filters.h:852
@ GF_PROP_PCMFMT
Definition: filters.h:918
#define OFFS(_n)
Definition: resample_audio.c:463

◆ ResamplerRegister

GF_FilterRegister ResamplerRegister
Initial value:
= {
.name = "resample",
.private_size = sizeof(GF_ResampleCtx),
.initialize = resample_initialize,
.finalize = resample_finalize,
.configure_pid = resample_configure_pid,
.process = resample_process,
.reconfigure_output = resample_reconfigure_output,
.process_event = resample_process_event,
.hint_class_type = GF_FS_CLASS_AV
}
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_REG_ALLOW_CYCLIC
Definition: filters.h:2400
@ GF_FS_CLASS_AV
Definition: filters.h:2453
attribute Array args
Definition: jsf.idl:24
static GF_FilterArgs ResamplerArgs[]
Definition: resample_audio.c:464
static GF_Err resample_process(GF_Filter *filter)
Definition: resample_audio.c:264
static GF_Err resample_initialize(GF_Filter *filter)
Definition: resample_audio.c:134
static GF_Err resample_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: resample_audio.c:159
static void resample_finalize(GF_Filter *filter)
Definition: resample_audio.c:151
static Bool resample_process_event(GF_Filter *filter, const GF_FilterEvent *evt)
Definition: resample_audio.c:433
static GF_Err resample_reconfigure_output(GF_Filter *filter, GF_FilterPid *pid)
Definition: resample_audio.c:370
static const GF_FilterCapability ResamplerCaps[]
Definition: resample_audio.c:455
Definition: resample_audio.c:34