libgpac
Documentation of the core library of GPAC
dmx_nhml.c File Reference
#include <gpac/filters.h>
#include <gpac/constants.h>
#include <gpac/thread.h>
#include <gpac/list.h>
#include <gpac/bitstream.h>
#include <gpac/xml.h>
#include <gpac/network.h>
#include <gpac/isomedia.h>
#include <gpac/base_coding.h>
#include <gpac/avparse.h>
#include <zlib.h>
+ Include dependency graph for dmx_nhml.c:

Data Structures

struct  GF_NHMLDmxCtx
 
struct  XMLBreaker
 

Macros

#define ZLIB_COMPRESS_SAFE   4
 
#define NHML_SCAN_INT(_fmt, _value)
 
#define OFFS(_n)   #_n, offsetof(GF_NHMLDmxCtx, _n)
 

Functions

GF_Err nhmldmx_configure_pid (GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
 
static Bool nhmldmx_process_event (GF_Filter *filter, const GF_FilterEvent *evt)
 
static GF_XMLNodenhmldmx_get_prop_ref (GF_NHMLDmxCtx *ctx, GF_XMLNode *par, char *ID)
 
static GF_XMLNodenhmldmx_get_props (GF_NHMLDmxCtx *ctx, char *ID)
 
static void nhmldmx_set_props (GF_NHMLDmxCtx *ctx, GF_XMLNode *props, GF_FilterPacket *pck)
 
static void nhml_node_start (void *sax_cbck, const char *node_name, const char *name_space, const GF_XMLAttribute *attributes, u32 nb_attributes)
 
static void nhml_node_end (void *sax_cbck, const char *node_name, const char *name_space)
 
static GF_Err nhml_sample_from_xml (GF_NHMLDmxCtx *ctx, char *xml_file, char *xmlFrom, char *xmlTo)
 
static GF_Err compress_sample_data (GF_NHMLDmxCtx *ctx, u32 compress_type, char **dict, u32 offset)
 
static GF_Err nhmldmx_config_output (GF_Filter *filter, GF_NHMLDmxCtx *ctx, GF_XMLNode *root)
 
static GF_Err nhmldmx_init_parsing (GF_Filter *filter, GF_NHMLDmxCtx *ctx)
 
void nhml_get_bs (GF_BitStream **bs, char *data, u32 size, u32 mode)
 
static void nhmldmx_set_subs (GF_NHMLDmxCtx *ctx, GF_XMLNode *node, GF_FilterPacket *pck)
 
static GF_XMLNodenhmldmx_find_sai (GF_NHMLDmxCtx *ctx, char *id)
 
static void nhmldmx_set_sai (GF_NHMLDmxCtx *ctx, GF_XMLNode *node, GF_FilterPacket *pck)
 
static GF_Err nhmldmx_send_sample (GF_Filter *filter, GF_NHMLDmxCtx *ctx)
 
GF_Err nhmldmx_process (GF_Filter *filter)
 
GF_Err nhmldmx_initialize (GF_Filter *filter)
 
void nhmldmx_finalize (GF_Filter *filter)
 
const GF_FilterRegister * nhmlr_register (GF_FilterSession *session)
 

Variables

static const GF_FilterArgs GF_NHMLDmxArgs []
 
static const GF_FilterCapability NHMLDmxCaps []
 
GF_FilterRegister NHMLDmxRegister
 

Data Structure Documentation

◆ GF_NHMLDmxCtx

struct GF_NHMLDmxCtx
+ Collaboration diagram for GF_NHMLDmxCtx:
Data Fields
Bool reframe
Double index
GF_FilterPid * ipid
GF_FilterPid * opid
Bool is_dims
Double start_range
u64 first_dts
Bool is_playing
GF_Fraction64 duration
Bool in_seek
u32 timescale
u32 sample_num
FILE * mdia
char * media_file
GF_DOMParser * parser
GF_XMLNode * root
u32 parsing_state
u32 current_child_idx
Bool has_sap
u32 compress_type
const char * src_url
u64 last_dts
u32 dts_inc
u8 * samp_buffer
u32 samp_buffer_alloc
u32 samp_buffer_size
char * zlib_buffer
u32 zlib_buffer_alloc
u32 zlib_buffer_size
Bool use_dict
char * dictionary
u64 media_done
Bool is_img
u32 header_end
GF_BitStream * bs_w
GF_BitStream * bs_r
GF_FileIO * fio

◆ XMLBreaker

struct XMLBreaker
Data Fields
Bool from_is_start
Bool from_is_end
Bool to_is_start
Bool to_is_end
u64 from_pos
u64 to_pos
char * from_id
char * to_id
GF_List * id_stack
GF_SAXParser * sax

Macro Definition Documentation

◆ ZLIB_COMPRESS_SAFE

#define ZLIB_COMPRESS_SAFE   4

◆ NHML_SCAN_INT

#define NHML_SCAN_INT (   _fmt,
  _value 
)
Value:
{\
if (strstr(att->value, "0x")) { u32 __i; sscanf(att->value+2, "%x", &__i); _value = __i; }\
else if (strstr(att->value, "0X")) { u32 __i; sscanf(att->value+2, "%X", &__i); _value = __i; }\
else sscanf(att->value, _fmt, &_value); \
}\
uint32_t u32
Definition: setup.h:326

◆ OFFS

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

Function Documentation

◆ nhmldmx_configure_pid()

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

◆ nhmldmx_process_event()

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

◆ nhmldmx_get_prop_ref()

static GF_XMLNode* nhmldmx_get_prop_ref ( GF_NHMLDmxCtx ctx,
GF_XMLNode par,
char *  ID 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nhmldmx_get_props()

static GF_XMLNode* nhmldmx_get_props ( GF_NHMLDmxCtx ctx,
char *  ID 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nhmldmx_set_props()

static void nhmldmx_set_props ( GF_NHMLDmxCtx ctx,
GF_XMLNode props,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nhml_node_start()

static void nhml_node_start ( void *  sax_cbck,
const char *  node_name,
const char *  name_space,
const GF_XMLAttribute attributes,
u32  nb_attributes 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nhml_node_end()

static void nhml_node_end ( void *  sax_cbck,
const char *  node_name,
const char *  name_space 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nhml_sample_from_xml()

static GF_Err nhml_sample_from_xml ( GF_NHMLDmxCtx ctx,
char *  xml_file,
char *  xmlFrom,
char *  xmlTo 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compress_sample_data()

static GF_Err compress_sample_data ( GF_NHMLDmxCtx ctx,
u32  compress_type,
char **  dict,
u32  offset 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nhmldmx_config_output()

static GF_Err nhmldmx_config_output ( GF_Filter *  filter,
GF_NHMLDmxCtx ctx,
GF_XMLNode root 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nhmldmx_init_parsing()

static GF_Err nhmldmx_init_parsing ( GF_Filter *  filter,
GF_NHMLDmxCtx ctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nhml_get_bs()

void nhml_get_bs ( GF_BitStream **  bs,
char *  data,
u32  size,
u32  mode 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nhmldmx_set_subs()

static void nhmldmx_set_subs ( GF_NHMLDmxCtx ctx,
GF_XMLNode node,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nhmldmx_find_sai()

static GF_XMLNode* nhmldmx_find_sai ( GF_NHMLDmxCtx ctx,
char *  id 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nhmldmx_set_sai()

static void nhmldmx_set_sai ( GF_NHMLDmxCtx ctx,
GF_XMLNode node,
GF_FilterPacket *  pck 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nhmldmx_send_sample()

static GF_Err nhmldmx_send_sample ( GF_Filter *  filter,
GF_NHMLDmxCtx ctx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nhmldmx_process()

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

◆ nhmldmx_initialize()

GF_Err nhmldmx_initialize ( GF_Filter *  filter)

◆ nhmldmx_finalize()

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

◆ nhmlr_register()

const GF_FilterRegister* nhmlr_register ( GF_FilterSession *  session)

Variable Documentation

◆ GF_NHMLDmxArgs

const GF_FilterArgs GF_NHMLDmxArgs[]
static
Initial value:
=
{
{ OFFS(reframe), "force re-parsing of referenced content", GF_PROP_BOOL, "false", NULL, GF_FS_ARG_HINT_ADVANCED},
{ OFFS(index), "indexing window length", GF_PROP_DOUBLE, "1.0", NULL, 0},
{0}
}
#define OFFS(_n)
Definition: dmx_nhml.c:1778
@ GF_FS_ARG_HINT_ADVANCED
Definition: filters.h:2102
@ GF_PROP_BOOL
Definition: filters.h:858
@ GF_PROP_DOUBLE
Definition: filters.h:866

◆ NHMLDmxCaps

const GF_FilterCapability NHMLDmxCaps[]
static
Initial value:
=
{
CAP_STRING(GF_CAPS_INPUT, GF_PROP_PID_MIME, "application/x-nhml|application/dims"),
}
@ GF_STREAM_UNKNOWN
Definition: constants.h:56
@ 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 GF_CAPS_INPUT
Definition: filters.h:2220
@ GF_PROP_PID_STREAM_TYPE
Definition: filters.h:1112
@ GF_PROP_PID_FILE_EXT
Definition: filters.h:1190
@ GF_PROP_PID_MIME
Definition: filters.h:1189

◆ NHMLDmxRegister

GF_FilterRegister NHMLDmxRegister
Initial value:
= {
.name = "nhmlr",
GF_FS_SET_HELP("This filter reads NHML files/data to produce a media PID and frames.\n"
"NHML documentation is available at https://wiki.gpac.io/xmlformats/NHML-Format\n")
.private_size = sizeof(GF_NHMLDmxCtx),
.initialize = nhmldmx_initialize,
.finalize = nhmldmx_finalize,
.configure_pid = nhmldmx_configure_pid,
.process = nhmldmx_process,
.process_event = nhmldmx_process_event,
.hint_class_type = GF_FS_CLASS_TOOL
}
static const GF_FilterArgs GF_NHMLDmxArgs[]
Definition: dmx_nhml.c:1779
GF_Err nhmldmx_process(GF_Filter *filter)
Definition: dmx_nhml.c:1702
GF_Err nhmldmx_configure_pid(GF_Filter *filter, GF_FilterPid *pid, Bool is_remove)
Definition: dmx_nhml.c:97
void nhmldmx_finalize(GF_Filter *filter)
Definition: dmx_nhml.c:1758
GF_Err nhmldmx_initialize(GF_Filter *filter)
Definition: dmx_nhml.c:1752
static const GF_FilterCapability NHMLDmxCaps[]
Definition: dmx_nhml.c:1787
static Bool nhmldmx_process_event(GF_Filter *filter, const GF_FilterEvent *evt)
Definition: dmx_nhml.c:128
Definition: dmx_nhml.c:43
#define GF_FS_SET_HELP(_help)
Definition: filters.h:2372
#define SETCAPS(__struct)
Definition: filters.h:2364
@ GF_FS_REG_USE_SYNC_READ
Definition: filters.h:2424
@ GF_FS_CLASS_TOOL
Definition: filters.h:2455
attribute Array args
Definition: jsf.idl:24