libgpac
Documentation of the core library of GPAC
loader_xmt.c File Reference
#include <gpac/scene_manager.h>
#include <gpac/constants.h>
#include <gpac/utf.h>
#include <gpac/network.h>
#include <gpac/xml.h>
#include <gpac/internal/bifs_dev.h>
#include <gpac/internal/scenegraph_dev.h>
#include <gpac/nodes_x3d.h>
#include "../bifs/quant.h"
+ Include dependency graph for loader_xmt.c:

Data Structures

struct  XMTNodeStack
 
struct  GF_XMTParser
 

Macros

#define XMT_GET_ONE_VAL
 

Enumerations

enum  {
  XMT_STATE_INIT = 0 , XMT_STATE_HEAD = 1 , XMT_STATE_BODY = 2 , XMT_STATE_COMMANDS = 3 ,
  XMT_STATE_ELEMENTS = 4 , XMT_STATE_BODY_END = 5 , XMT_STATE_END = 6
}
 

Functions

void gf_sm_update_bitwrapper_buffer (GF_Node *node, const char *fileName)
 
static GF_Err xmt_report (GF_XMTParser *parser, GF_Err e, char *format,...)
 
static void xmt_progress (void *cbk, u64 done, u64 total)
 
static Bool xmt_esid_available (GF_XMTParser *parser, u16 ESID)
 
static char * xmt_get_es_name (GF_XMTParser *parser, u16 ESID)
 
static void xmt_new_od_link (GF_XMTParser *parser, GF_ObjectDescriptor *od, char *name, u32 ID)
 
static void xmt_new_od_link_from_node (GF_XMTParser *parser, char *name, MFURL *url)
 
static void xmt_new_esd_link (GF_XMTParser *parser, GF_ESD *esd, char *desc_name, u32 binID)
 
static Bool xmt_set_depend_id (GF_XMTParser *parser, GF_ESD *desc, char *es_name, Bool is_ocr_dep)
 
static u32 xmt_get_od_id (GF_XMTParser *parser, char *od_name)
 
static u32 xmt_get_esd_id (GF_XMTParser *parser, char *esd_name)
 
static u32 xmt_locate_stream (GF_XMTParser *parser, char *stream_name)
 
static Bool xmt_odid_available (GF_XMTParser *parser, u16 ODID)
 
static void xmt_resolve_od_links (GF_XMTParser *parser)
 
static void xmt_remove_link_for_descriptor (GF_XMTParser *parser, GF_Descriptor *desc)
 
static u32 xmt_get_next_node_id (GF_XMTParser *parser)
 
static u32 xmt_get_node_id (GF_XMTParser *parser, char *name)
 
static u32 xmt_get_node_tag (GF_XMTParser *parser, const char *node_name)
 
static GF_Nodexmt_find_node (GF_XMTParser *parser, char *ID)
 
static u32 xmt_parse_int (GF_XMTParser *parser, const char *name, SFInt32 *val, char *a_value)
 
static u32 xmt_parse_float (GF_XMTParser *parser, const char *name, SFFloat *val, char *a_value)
 
static u32 xmt_parse_time (GF_XMTParser *parser, const char *name, SFTime *val, char *a_value)
 
static u32 xmt_parse_bool (GF_XMTParser *parser, const char *name, SFBool *val, char *a_value)
 
static u32 xmt_parse_string (GF_XMTParser *parser, const char *name, SFString *val, Bool is_mf, char *a_value)
 
static u32 xmt_parse_url (GF_XMTParser *parser, const char *name, MFURL *val, GF_Node *owner, Bool is_mf, char *a_value)
 
static u32 xmt_parse_script (GF_XMTParser *parser, const char *name, SFScript *val, Bool is_mf, char *a_value)
 
static void xmt_offset_time (GF_XMTParser *parser, Double *time)
 
static void xmt_check_time_offset (GF_XMTParser *parser, GF_Node *n, GF_FieldInfo *info)
 
static u32 xmt_parse_sf_field (GF_XMTParser *parser, GF_FieldInfo *info, GF_Node *n, char *a_value)
 
static void xmt_parse_mf_field (GF_XMTParser *parser, GF_FieldInfo *info, GF_Node *n, char *value)
 
static Bool xmt_has_been_def (GF_XMTParser *parser, char *node_name)
 
static u32 xmt_get_route (GF_XMTParser *parser, char *name, Bool del_com)
 
static Bool xmt_route_id_used (GF_XMTParser *parser, u32 ID)
 
static u32 xmt_get_next_route_id (GF_XMTParser *parser)
 
static void xmt_resolve_routes (GF_XMTParser *parser)
 
static void xmt_parse_route (GF_XMTParser *parser, const GF_XMLAttribute *attributes, u32 nb_attributes, Bool is_insert, GF_Command *com)
 
static void xmt_update_timenode (GF_XMTParser *parser, GF_Node *node)
 
static void xmt_strip_name (const char *in, char *out)
 
static u32 xmt_get_ft_by_name (const char *_name)
 
static u32 xmt_get_script_et_by_name (const char *_name)
 
static u32 xmt_get_et_by_name (const char *_name)
 
static void xmt_parse_script_field (GF_XMTParser *parser, GF_Node *node, const GF_XMLAttribute *attributes, u32 nb_attributes)
 
static u32 xmt_get_next_proto_id (GF_XMTParser *parser)
 
static void xmt_parse_proto (GF_XMTParser *parser, const GF_XMLAttribute *attributes, u32 nb_attributes, GF_List *proto_list)
 
static u32 xmt_get_protofield_qp_type (const char *QP_Type)
 
static GF_Err x3d_get_default_container (GF_Node *par, GF_Node *n, GF_FieldInfo *info)
 
static GF_Nodexmt_parse_element (GF_XMTParser *parser, char *name, const char *name_space, const GF_XMLAttribute *attributes, u32 nb_attributes, XMTNodeStack *parent)
 
GF_Descriptorxmt_parse_descriptor (GF_XMTParser *parser, char *name, const GF_XMLAttribute *attributes, u32 nb_attributes, GF_Descriptor *parent)
 
static void xmt_parse_command (GF_XMTParser *parser, const char *name, const GF_XMLAttribute *attributes, u32 nb_attributes)
 
static void xmt_node_start (void *sax_cbck, const char *name, const char *name_space, const GF_XMLAttribute *attributes, u32 nb_attributes)
 
static void xmt_node_end (void *sax_cbck, const char *name, const char *name_space)
 
static void xmt_text_content (void *sax_cbck, const char *text_content, Bool is_cdata)
 
static GF_XMTParserxmt_new_parser (GF_SceneLoader *load)
 
static GF_Err xmt_restore_context (GF_SceneLoader *load)
 
static GF_Err load_xmt_initialize (GF_SceneLoader *load, const char *str_data)
 
static GF_Err load_xmt_run (GF_SceneLoader *load)
 
static GF_Err load_xmt_parse_string (GF_SceneLoader *load, const char *str)
 
static void load_xmt_done (GF_SceneLoader *load)
 
static GF_Err load_xmt_suspend (GF_SceneLoader *load, Bool suspend)
 
GF_Err gf_sm_load_init_xmt (GF_SceneLoader *load)
 

Data Structure Documentation

◆ XMTNodeStack

struct XMTNodeStack
+ Collaboration diagram for XMTNodeStack:
Data Fields
GF_Node * node
GF_FieldInfo container_field
GF_ChildNodeItem * last

◆ GF_XMTParser

struct GF_XMTParser
+ Collaboration diagram for GF_XMTParser:
Data Fields
u32 doc_type
u32 state
u32 current_node_tag
GF_SceneLoader * load
GF_Err last_error
GF_SAXParser * sax_parser
XMTNodeStack * x3d_root
GF_List * nodes
GF_List * descriptors
GF_List * peeked_nodes
GF_List * def_nodes
GF_List * inserted_routes
GF_List * unresolved_routes
GF_List * od_links
GF_List * esd_links
GF_Proto * parsing_proto
GF_ProtoFieldInterface * proto_field
GF_StreamContext * scene_es
GF_AUContext * scene_au
u32 base_scene_id
GF_Command * command
SFCommandBuffer * command_buffer
GF_StreamContext * od_es
GF_AUContext * od_au
u32 base_od_id
GF_ODCom * od_command
u32 stream_id
Double au_time
Bool au_is_rap
Bool in_com
GF_List * script_to_load

◆ XMT_ODLink

struct XMT_ODLink
+ Collaboration diagram for XMT_ODLink:
Data Fields
char * desc_name
u32 ID
GF_List * mf_urls
GF_ObjectDescriptor * od

◆ XMT_ESDLink

struct XMT_ESDLink
+ Collaboration diagram for XMT_ESDLink:
Data Fields
char * desc_name
u32 ESID
GF_ESD * esd
char * OCR_Name
char * Depends_Name

Macro Definition Documentation

◆ XMT_GET_ONE_VAL

#define XMT_GET_ONE_VAL
Value:
char value[100]; \
u32 i; \
char *str = a_value; \
if (!str) { \
xmt_report(parser, GF_BAD_PARAM, "%s: Number expected", name); \
return 0; \
} \
while (str[0] == ' ') str += 1; \
i = 0; \
while ((str[i] != ' ') && str[i] && i<100) { \
value[i] = str[i]; \
i++; \
} \
value[MIN(i, 99)] = 0; \
while ((str[i] == ' ') && str[i]) i++;
@ GF_BAD_PARAM
Definition: tools.h:135
#define MIN(X, Y)
Definition: setup.h:455

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
XMT_STATE_INIT 
XMT_STATE_HEAD 
XMT_STATE_BODY 
XMT_STATE_COMMANDS 
XMT_STATE_ELEMENTS 
XMT_STATE_BODY_END 
XMT_STATE_END 

Function Documentation

◆ gf_sm_update_bitwrapper_buffer()

void gf_sm_update_bitwrapper_buffer ( GF_Node node,
const char *  fileName 
)
+ Here is the caller graph for this function:

◆ xmt_report()

static GF_Err xmt_report ( GF_XMTParser parser,
GF_Err  e,
char *  format,
  ... 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_progress()

static void xmt_progress ( void *  cbk,
u64  done,
u64  total 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_esid_available()

static Bool xmt_esid_available ( GF_XMTParser parser,
u16  ESID 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_get_es_name()

static char* xmt_get_es_name ( GF_XMTParser parser,
u16  ESID 
)
static
+ Here is the call graph for this function:

◆ xmt_new_od_link()

static void xmt_new_od_link ( GF_XMTParser parser,
GF_ObjectDescriptor od,
char *  name,
u32  ID 
)
static
+ Here is the call graph for this function:

◆ xmt_new_od_link_from_node()

static void xmt_new_od_link_from_node ( GF_XMTParser parser,
char *  name,
MFURL url 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_new_esd_link()

static void xmt_new_esd_link ( GF_XMTParser parser,
GF_ESD esd,
char *  desc_name,
u32  binID 
)
static
+ Here is the call graph for this function:

◆ xmt_set_depend_id()

static Bool xmt_set_depend_id ( GF_XMTParser parser,
GF_ESD desc,
char *  es_name,
Bool  is_ocr_dep 
)
static
+ Here is the call graph for this function:

◆ xmt_get_od_id()

static u32 xmt_get_od_id ( GF_XMTParser parser,
char *  od_name 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_get_esd_id()

static u32 xmt_get_esd_id ( GF_XMTParser parser,
char *  esd_name 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_locate_stream()

static u32 xmt_locate_stream ( GF_XMTParser parser,
char *  stream_name 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_odid_available()

static Bool xmt_odid_available ( GF_XMTParser parser,
u16  ODID 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_resolve_od_links()

static void xmt_resolve_od_links ( GF_XMTParser parser)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_remove_link_for_descriptor()

static void xmt_remove_link_for_descriptor ( GF_XMTParser parser,
GF_Descriptor desc 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_get_next_node_id()

static u32 xmt_get_next_node_id ( GF_XMTParser parser)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_get_node_id()

static u32 xmt_get_node_id ( GF_XMTParser parser,
char *  name 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_get_node_tag()

static u32 xmt_get_node_tag ( GF_XMTParser parser,
const char *  node_name 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_find_node()

static GF_Node* xmt_find_node ( GF_XMTParser parser,
char *  ID 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_parse_int()

static u32 xmt_parse_int ( GF_XMTParser parser,
const char *  name,
SFInt32 val,
char *  a_value 
)
static
+ Here is the caller graph for this function:

◆ xmt_parse_float()

static u32 xmt_parse_float ( GF_XMTParser parser,
const char *  name,
SFFloat val,
char *  a_value 
)
static
+ Here is the caller graph for this function:

◆ xmt_parse_time()

static u32 xmt_parse_time ( GF_XMTParser parser,
const char *  name,
SFTime val,
char *  a_value 
)
static
+ Here is the caller graph for this function:

◆ xmt_parse_bool()

static u32 xmt_parse_bool ( GF_XMTParser parser,
const char *  name,
SFBool val,
char *  a_value 
)
static
+ Here is the caller graph for this function:

◆ xmt_parse_string()

static u32 xmt_parse_string ( GF_XMTParser parser,
const char *  name,
SFString val,
Bool  is_mf,
char *  a_value 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_parse_url()

static u32 xmt_parse_url ( GF_XMTParser parser,
const char *  name,
MFURL val,
GF_Node owner,
Bool  is_mf,
char *  a_value 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_parse_script()

static u32 xmt_parse_script ( GF_XMTParser parser,
const char *  name,
SFScript val,
Bool  is_mf,
char *  a_value 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_offset_time()

static void xmt_offset_time ( GF_XMTParser parser,
Double time 
)
static
+ Here is the caller graph for this function:

◆ xmt_check_time_offset()

static void xmt_check_time_offset ( GF_XMTParser parser,
GF_Node n,
GF_FieldInfo info 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_parse_sf_field()

static u32 xmt_parse_sf_field ( GF_XMTParser parser,
GF_FieldInfo info,
GF_Node n,
char *  a_value 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_parse_mf_field()

static void xmt_parse_mf_field ( GF_XMTParser parser,
GF_FieldInfo info,
GF_Node n,
char *  value 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_has_been_def()

static Bool xmt_has_been_def ( GF_XMTParser parser,
char *  node_name 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_get_route()

static u32 xmt_get_route ( GF_XMTParser parser,
char *  name,
Bool  del_com 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_route_id_used()

static Bool xmt_route_id_used ( GF_XMTParser parser,
u32  ID 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_get_next_route_id()

static u32 xmt_get_next_route_id ( GF_XMTParser parser)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_resolve_routes()

static void xmt_resolve_routes ( GF_XMTParser parser)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_parse_route()

static void xmt_parse_route ( GF_XMTParser parser,
const GF_XMLAttribute attributes,
u32  nb_attributes,
Bool  is_insert,
GF_Command com 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_update_timenode()

static void xmt_update_timenode ( GF_XMTParser parser,
GF_Node node 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_strip_name()

static void xmt_strip_name ( const char *  in,
char *  out 
)
static
+ Here is the caller graph for this function:

◆ xmt_get_ft_by_name()

static u32 xmt_get_ft_by_name ( const char *  _name)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_get_script_et_by_name()

static u32 xmt_get_script_et_by_name ( const char *  _name)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_get_et_by_name()

static u32 xmt_get_et_by_name ( const char *  _name)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_parse_script_field()

static void xmt_parse_script_field ( GF_XMTParser parser,
GF_Node node,
const GF_XMLAttribute attributes,
u32  nb_attributes 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_get_next_proto_id()

static u32 xmt_get_next_proto_id ( GF_XMTParser parser)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_parse_proto()

static void xmt_parse_proto ( GF_XMTParser parser,
const GF_XMLAttribute attributes,
u32  nb_attributes,
GF_List *  proto_list 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_get_protofield_qp_type()

static u32 xmt_get_protofield_qp_type ( const char *  QP_Type)
static
+ Here is the caller graph for this function:

◆ x3d_get_default_container()

static GF_Err x3d_get_default_container ( GF_Node par,
GF_Node n,
GF_FieldInfo info 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_parse_element()

static GF_Node* xmt_parse_element ( GF_XMTParser parser,
char *  name,
const char *  name_space,
const GF_XMLAttribute attributes,
u32  nb_attributes,
XMTNodeStack parent 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_parse_descriptor()

GF_Descriptor* xmt_parse_descriptor ( GF_XMTParser parser,
char *  name,
const GF_XMLAttribute attributes,
u32  nb_attributes,
GF_Descriptor parent 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_parse_command()

static void xmt_parse_command ( GF_XMTParser parser,
const char *  name,
const GF_XMLAttribute attributes,
u32  nb_attributes 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_node_start()

static void xmt_node_start ( void *  sax_cbck,
const char *  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:

◆ xmt_node_end()

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

◆ xmt_text_content()

static void xmt_text_content ( void *  sax_cbck,
const char *  text_content,
Bool  is_cdata 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_new_parser()

static GF_XMTParser* xmt_new_parser ( GF_SceneLoader load)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xmt_restore_context()

static GF_Err xmt_restore_context ( GF_SceneLoader load)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load_xmt_initialize()

static GF_Err load_xmt_initialize ( GF_SceneLoader load,
const char *  str_data 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load_xmt_run()

static GF_Err load_xmt_run ( GF_SceneLoader load)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load_xmt_parse_string()

static GF_Err load_xmt_parse_string ( GF_SceneLoader load,
const char *  str 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load_xmt_done()

static void load_xmt_done ( GF_SceneLoader load)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load_xmt_suspend()

static GF_Err load_xmt_suspend ( GF_SceneLoader load,
Bool  suspend 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_sm_load_init_xmt()

GF_Err gf_sm_load_init_xmt ( GF_SceneLoader load)
+ Here is the call graph for this function:
+ Here is the caller graph for this function: