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

Data Structures

struct  TrueHDIdx
 
struct  TrueHDHdr
 
struct  GF_TrueHDDmxCtx
 

Macros

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

Functions

GF_Err truehd_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static void truehd_aux_ac3 (GF_TrueHDDmxCtx *ctx, GF_BitStream *bs, GF_AC3Header *hdr)
 
static GF_Err truehd_parse_frame (GF_TrueHDDmxCtx *ctx, GF_BitStream *bs, TrueHDHdr *hdr, u64 *frame_start)
 
static u32 truehd_frame_dur (u32 sample_rate)
 
static void truehd_check_dur (GF_Filter *filter, GF_TrueHDDmxCtx *ctx)
 
static void truehd_check_pid (GF_Filter *filter, GF_TrueHDDmxCtx *ctx, TrueHDHdr *hdr)
 
static Bool truehd_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
static GFINLINE void truehd_update_cts (GF_TrueHDDmxCtx *ctx, TrueHDHdr *hdr)
 
GF_Err truehd_process (GF_Filter *filter)
 
static void truehd_finalize (GF_Filter *filter)
 
static const char * truehd_probe_data (const u8 *data, u32 size, GF_FilterProbeScore *score)
 
const GF_FilterRegister * rftruehd_register (GF_FilterSession *session)
 

Variables

static const GF_FilterCapability TrueHDDmxCaps []
 
static const GF_FilterArgs TrueHDDmxArgs []
 
GF_FilterRegister TrueHDDmxRegister
 

Data Structure Documentation

◆ TrueHDIdx

struct TrueHDIdx
Data Fields
u64 pos
Double duration

◆ TrueHDHdr

struct TrueHDHdr
Data Fields
u32 frame_size
u32 time
u32 sync
u32 format
u32 sample_rate
Bool mc_6_ch
Bool mc_8_ch
u8 ch_2_modif
u8 ch_6_modif
u8 ch_8_modif
u8 ch_6_assign
u16 ch_8_assign
u16 peak_rate

◆ GF_TrueHDDmxCtx

struct GF_TrueHDDmxCtx
+ Collaboration diagram for GF_TrueHDDmxCtx:
Data Fields
Double index
Bool auxac3
GF_FilterPid * ipid
GF_FilterPid * opid
GF_FilterPid * aux_opid
GF_Filter * filter
GF_BitStream * bs
u64 file_pos
u64 cts
u32 sample_rate
u32 nb_ch
u32 format
GF_Fraction64 duration
Double start_range
Bool in_seek
u32 timescale
u32 frame_dur
u8 * truehd_buffer
u32 truehd_buffer_size
u32 truehd_buffer_alloc
u32 resume_from
u64 byte_offset
Bool is_playing
Bool is_file
Bool file_loaded
Bool initial_play_done
GF_FilterPacket * src_pck
GF_FilterPacket * src_current
TrueHDIdx * indexes
u32 index_alloc_size
u32 index_size
Bool copy_props
GF_AC3Header ac3_hdr
Bool is_sync

Macro Definition Documentation

◆ OFFS

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

Function Documentation

◆ truehd_configure_pid()

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

◆ truehd_aux_ac3()

static void truehd_aux_ac3 ( GF_TrueHDDmxCtx ctx,
GF_BitStream *  bs,
GF_AC3Header *  hdr 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ truehd_parse_frame()

static GF_Err truehd_parse_frame ( GF_TrueHDDmxCtx ctx,
GF_BitStream *  bs,
TrueHDHdr hdr,
u64 frame_start 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ truehd_frame_dur()

static u32 truehd_frame_dur ( u32  sample_rate)
static
+ Here is the caller graph for this function:

◆ truehd_check_dur()

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

◆ truehd_check_pid()

static void truehd_check_pid ( GF_Filter *  filter,
GF_TrueHDDmxCtx ctx,
TrueHDHdr hdr 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ truehd_process_event()

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

◆ truehd_update_cts()

static GFINLINE void truehd_update_cts ( GF_TrueHDDmxCtx ctx,
TrueHDHdr hdr 
)
static
+ Here is the caller graph for this function:

◆ truehd_process()

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

◆ truehd_finalize()

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

◆ truehd_probe_data()

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

◆ rftruehd_register()

const GF_FilterRegister* rftruehd_register ( GF_FilterSession *  session)

Variable Documentation

◆ TrueHDDmxCaps

const GF_FilterCapability TrueHDDmxCaps[]
static
Initial value:
=
{
CAP_STRING(GF_CAPS_INPUT, GF_PROP_PID_MIME, "audio/truehd|audio/x-truehd"),
{0},
}
@ GF_CODECID_TRUEHD
Definition: constants.h:490
@ 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 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_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

◆ TrueHDDmxArgs

const GF_FilterArgs TrueHDDmxArgs[]
static
Initial value:
=
{
{ OFFS(index), "indexing window length", GF_PROP_DOUBLE, "1.0", NULL, 0},
{ OFFS(auxac3), "expose auxiliary AC-3 stream if present", GF_PROP_BOOL, "false", NULL, 0},
{0}
}
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_DOUBLE
Definition: filters.h:866
#define OFFS(_n)
Definition: reframe_truehd.c:802

◆ TrueHDDmxRegister

GF_FilterRegister TrueHDDmxRegister
Initial value:
= {
.name = "rftruehd",
.private_size = sizeof(GF_TrueHDDmxCtx),
.finalize = truehd_finalize,
.configure_pid = truehd_configure_pid,
.process = truehd_process,
.probe_data = truehd_probe_data,
.process_event = truehd_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 TrueHDDmxCaps[]
Definition: reframe_truehd.c:788
static const GF_FilterArgs TrueHDDmxArgs[]
Definition: reframe_truehd.c:803
GF_Err truehd_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: reframe_truehd.c:100
static const char * truehd_probe_data(const u8 *data, u32 size, GF_FilterProbeScore *score)
Definition: reframe_truehd.c:765
static void truehd_finalize(GF_Filter *filter)
Definition: reframe_truehd.c:756
static Bool truehd_process_event(GF_Filter *filter, const GF_FilterEvent *evt)
Definition: reframe_truehd.c:456
GF_Err truehd_process(GF_Filter *filter)
Definition: reframe_truehd.c:529
Definition: reframe_truehd.c:53