libgpac
Documentation of the core library of GPAC
loader_svg.c File Reference
#include <gpac/scene_manager.h>
#include <gpac/constants.h>
#include <gpac/utf.h>
#include <gpac/xml.h>
#include <gpac/events.h>
#include <gpac/internal/compositor_dev.h>
#include <gpac/internal/scenegraph_dev.h>
#include <gpac/internal/laser_dev.h>
#include <gpac/nodes_svg.h>
#include <gpac/base_coding.h>
+ Include dependency graph for loader_svg.c:

Data Structures

struct  SVG_SAFExternalStream
 
struct  GF_SVG_Parser
 
struct  SVG_DeferredAnimation
 
struct  SVG_NodeStack
 

Functions

static GF_Err svg_report (GF_SVG_Parser *parser, GF_Err e, char *format,...)
 
static void svg_progress (void *cbk, u64 done, u64 total)
 
static SVG_SAFExternalStreamsvg_saf_get_stream (GF_SVG_Parser *parser, u32 id, const char *name)
 
static SVG_SAFExternalStreamsvg_saf_get_next_available_stream (GF_SVG_Parser *parser)
 
static void svg_lsr_set_v2 (GF_SVG_Parser *parser)
 
static void svg_process_media_href (GF_SVG_Parser *parser, GF_Node *elt, XMLRI *iri)
 
static void xsr_exec_command_list (GF_Node *node, void *par, Bool is_destroy)
 
static GF_Nodesvg_find_node (GF_SVG_Parser *parser, char *ID)
 
static void svg_post_process_href (GF_SVG_Parser *parser, GF_Node *elt, XMLRI *iri)
 
static void svg_delete_deferred_anim (SVG_DeferredAnimation *anim, GF_List *deferred_animations)
 
static Bool svg_parse_animation (GF_SVG_Parser *parser, GF_SceneGraph *sg, SVG_DeferredAnimation *anim, const char *nodeID, u32 force_type)
 
static void svg_resolved_refs (GF_SVG_Parser *parser, GF_SceneGraph *sg, const char *nodeID)
 
static void svg_init_root_element (GF_SVG_Parser *parser, SVG_Element *root_svg)
 
static void svg_check_namespace (GF_SVG_Parser *parser, const GF_XMLAttribute *attributes, u32 nb_attributes, Bool *has_ns)
 
static SVG_Elementsvg_parse_element (GF_SVG_Parser *parser, const char *name, const char *name_space, const GF_XMLAttribute *attributes, u32 nb_attributes, SVG_NodeStack *parent, Bool *has_ns)
 
static GF_Err lsr_parse_command (GF_SVG_Parser *parser, const GF_XMLAttribute *attributes, u32 nb_attributes)
 
static u32 lsr_get_command_by_name (const char *name)
 
static GF_ESDlsr_parse_header (GF_SVG_Parser *parser, const char *name, const char *name_space, const GF_XMLAttribute *attributes, u32 nb_attributes)
 
static void svg_node_start (void *sax_cbck, const char *name, const char *name_space, const GF_XMLAttribute *attributes, u32 nb_attributes)
 
static void svg_node_end (void *sax_cbck, const char *name, const char *name_space)
 
static void svg_text_content (void *sax_cbck, const char *text_content, Bool is_cdata)
 
static GF_SVG_Parsersvg_new_parser (GF_SceneLoader *load)
 
static void svg_flush_animations (GF_SVG_Parser *parser)
 
static void gf_sm_svg_flush_state (GF_SVG_Parser *parser)
 
static GF_Err gf_sm_load_initialize_svg (GF_SceneLoader *load, const char *str_data, Bool is_fragment)
 
GF_Err load_svg_run (GF_SceneLoader *load)
 
static void load_svg_done (GF_SceneLoader *load)
 
GF_Err load_svg_parse_string (GF_SceneLoader *load, const char *str)
 
static GF_Err load_svg_suspend (GF_SceneLoader *load, Bool suspend)
 
GF_Err gf_sm_load_init_svg (GF_SceneLoader *load)
 
GF_Nodegf_sm_load_svg_from_string (GF_SceneGraph *in_scene, char *node_str)
 

Data Structure Documentation

◆ SVG_SAFExternalStream

struct SVG_SAFExternalStream
Data Fields
struct _st_entry * next
char * stream_name
u32 id
const char * nhml_info

◆ GF_SVG_Parser

struct GF_SVG_Parser
+ Collaboration diagram for GF_SVG_Parser:
Data Fields
GF_SceneLoader * load
GF_Err last_error
GF_SAXParser * sax_parser
u32 has_root
GF_List * node_stack
GF_List * deferred_hrefs
GF_List * deferred_animations
GF_List * deferred_listeners
GF_List * peeked_nodes
u32 command_depth
GF_StreamContext * laser_es
GF_AUContext * laser_au
GF_Command * command
GF_AUContext * saf_au
GF_StreamContext * saf_es
SVG_SAFExternalStream * streams
u32 current_ns
GF_Node * fragment_root

◆ SVG_DeferredAnimation

struct SVG_DeferredAnimation
Data Fields
u32 resolve_stage
SVG_Element * animation_elt
SVG_Element * anim_parent
SVG_Element * target
char * target_id
char * type
char * to
char * from
char * by
char * values

◆ SVG_NodeStack

struct SVG_NodeStack
+ Collaboration diagram for SVG_NodeStack:
Data Fields
SVG_Element * node
SVG_DeferredAnimation * anim
u32 unknown_depth
GF_ChildNodeItem * last_child
u32 current_ns
Bool has_ns

Function Documentation

◆ svg_report()

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

◆ svg_progress()

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

◆ svg_saf_get_stream()

static SVG_SAFExternalStream* svg_saf_get_stream ( GF_SVG_Parser parser,
u32  id,
const char *  name 
)
static
+ Here is the caller graph for this function:

◆ svg_saf_get_next_available_stream()

static SVG_SAFExternalStream* svg_saf_get_next_available_stream ( GF_SVG_Parser parser)
static
+ Here is the caller graph for this function:

◆ svg_lsr_set_v2()

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

◆ svg_process_media_href()

static void svg_process_media_href ( GF_SVG_Parser parser,
GF_Node elt,
XMLRI iri 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ xsr_exec_command_list()

static void xsr_exec_command_list ( GF_Node node,
void *  par,
Bool  is_destroy 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ svg_find_node()

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

◆ svg_post_process_href()

static void svg_post_process_href ( GF_SVG_Parser parser,
GF_Node elt,
XMLRI iri 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ svg_delete_deferred_anim()

static void svg_delete_deferred_anim ( SVG_DeferredAnimation anim,
GF_List *  deferred_animations 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ svg_parse_animation()

static Bool svg_parse_animation ( GF_SVG_Parser parser,
GF_SceneGraph *  sg,
SVG_DeferredAnimation anim,
const char *  nodeID,
u32  force_type 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ svg_resolved_refs()

static void svg_resolved_refs ( GF_SVG_Parser parser,
GF_SceneGraph *  sg,
const char *  nodeID 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ svg_init_root_element()

static void svg_init_root_element ( GF_SVG_Parser parser,
SVG_Element root_svg 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ svg_check_namespace()

static void svg_check_namespace ( GF_SVG_Parser parser,
const GF_XMLAttribute attributes,
u32  nb_attributes,
Bool has_ns 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ svg_parse_element()

static SVG_Element* svg_parse_element ( GF_SVG_Parser parser,
const char *  name,
const char *  name_space,
const GF_XMLAttribute attributes,
u32  nb_attributes,
SVG_NodeStack parent,
Bool has_ns 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lsr_parse_command()

static GF_Err lsr_parse_command ( GF_SVG_Parser parser,
const GF_XMLAttribute attributes,
u32  nb_attributes 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lsr_get_command_by_name()

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

◆ lsr_parse_header()

static GF_ESD* lsr_parse_header ( GF_SVG_Parser parser,
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:

◆ svg_node_start()

static void svg_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:

◆ svg_node_end()

static void svg_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:

◆ svg_text_content()

static void svg_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:

◆ svg_new_parser()

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

◆ svg_flush_animations()

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

◆ gf_sm_svg_flush_state()

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

◆ gf_sm_load_initialize_svg()

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

◆ load_svg_run()

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

◆ load_svg_done()

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

◆ load_svg_parse_string()

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

◆ load_svg_suspend()

static GF_Err load_svg_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_svg()

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

◆ gf_sm_load_svg_from_string()

GF_Node* gf_sm_load_svg_from_string ( GF_SceneGraph *  in_scene,
char *  node_str 
)
+ Here is the call graph for this function: