197
197
if (parser->load->ctx && parser->load->ctx->root_od) {
198
198
for (i=0; i<gf_list_count(parser->load->ctx->root_od->ESDescriptors); i++) {
199
GF_ESD *esd = gf_list_get(parser->load->ctx->root_od->ESDescriptors, i);
199
GF_ESD *esd = (GF_ESD *)gf_list_get(parser->load->ctx->root_od->ESDescriptors, i);
200
200
if (esd->decoderConfig->streamType==GF_STREAM_SCENE) {
201
201
GF_LASERConfig *cfg = (GF_LASERConfig *)esd->decoderConfig->decoderSpecificInfo;
202
202
if (cfg && (cfg->tag==GF_ODF_LASER_CFG_TAG)) {
366
366
/* if now we have a target, create the xlink:href attribute on the animation element and set it to the found target */
367
367
if (anim->target) {
369
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_XLINK_ATT_href, 1, 0, &info);
369
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_XLINK_ATT_href, GF_TRUE, GF_FALSE, &info);
370
370
iri = (XMLRI *)info.far_ptr;
371
371
iri->type = XMLRI_ELEMENTID;
372
372
iri->target = anim->target;
376
376
tag = gf_node_get_tag((GF_Node *)anim->animation_elt);
377
377
/* get the attribute name attribute if specified */
378
378
if (anim->type && (tag== TAG_SVG_animateTransform) ) {
379
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_transform_type, 1, 0, &info);
379
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_transform_type, GF_TRUE, GF_FALSE, &info);
380
380
gf_svg_parse_attribute((GF_Node *)anim->animation_elt, &info, anim->type, 0);
381
381
switch(*(SVG_TransformType *) info.far_ptr) {
382
382
case SVG_TRANSFORM_TRANSLATE:
401
401
svg_report(parser, GF_OK, "unknown datatype for animate transform");
405
else if (gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_attributeName, 0, 0, &info) == GF_OK) {
405
else if (gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_attributeName, GF_FALSE, GF_FALSE, &info) == GF_OK) {
406
406
SMIL_AttributeName *attname = (SMIL_AttributeName *)info.far_ptr;
408
408
/*parse the attribute name even if the target is not found, because a namespace could be specified and
426
426
/* the target is still not known stay in stage 0 */
427
if (!anim->target) return 0;
427
if (!anim->target) return GF_FALSE;
429
gf_node_get_attribute_by_name((GF_Node *)anim->target, attname->name, attname->type, 1, 1, &info);
429
gf_node_get_attribute_by_name((GF_Node *)anim->target, attname->name, attname->type, GF_TRUE, GF_TRUE, &info);
430
430
/*set the tag value to avoid parsing the name in the anim node_init phase*/
431
431
attname->tag = info.fieldIndex;
432
432
attname->type = 0;
440
440
return svg_parse_animation(parser, sg, anim, nodeID, 0);
442
442
svg_report(parser, GF_OK, "Missing attributeName attribute on %s", gf_node_get_name((GF_Node *)anim->animation_elt));
447
447
/* the target is still not known stay in stage 0 */
448
if (!anim->target) return 0;
448
if (!anim->target) return GF_FALSE;
451
451
/* now that we have a target, if there is a to value to parse, create the attribute and parse it */
452
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_to, 1, 0, &info);
452
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_to, GF_TRUE, GF_FALSE, &info);
453
453
gf_svg_parse_attribute((GF_Node *)anim->animation_elt, &info, anim->to, anim_value_type);
454
454
if (anim_value_type==XMLRI_datatype)
455
455
svg_post_process_href(parser, (XMLRI*)((SMIL_AnimateValue *)info.far_ptr)->value);
457
457
if (anim->from) {
458
458
/* now that we have a target, if there is a from value to parse, create the attribute and parse it */
459
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_from, 1, 0, &info);
459
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_from, GF_TRUE, GF_FALSE, &info);
460
460
gf_svg_parse_attribute((GF_Node *)anim->animation_elt, &info, anim->from, anim_value_type);
461
461
if (anim_value_type==XMLRI_datatype)
462
462
svg_post_process_href(parser, (XMLRI*)((SMIL_AnimateValue *)info.far_ptr)->value);
465
465
/* now that we have a target, if there is a by value to parse, create the attribute and parse it */
466
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_by, 1, 0, &info);
466
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_by, GF_TRUE, GF_FALSE, &info);
467
467
gf_svg_parse_attribute((GF_Node *)anim->animation_elt, &info, anim->by, anim_value_type);
468
468
if (anim_value_type==XMLRI_datatype)
469
469
svg_post_process_href(parser, (XMLRI*)((SMIL_AnimateValue *)info.far_ptr)->value);
471
471
if (anim->values) {
472
472
/* now that we have a target, if there is a 'values' value to parse, create the attribute and parse it */
473
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_values, 1, 0, &info);
473
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_values, GF_TRUE, GF_FALSE, &info);
474
474
gf_svg_parse_attribute((GF_Node *)anim->animation_elt, &info, anim->values, anim_value_type);
475
475
if (anim_value_type==XMLRI_datatype) {
489
489
if (anim->resolve_stage == 1) {
490
490
/* Stage 1: parsing the begin values
491
491
we go into the next stage only if at least one begin value is resolved */
492
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_begin, 1, 0, &info);
493
if (gf_svg_resolve_smil_times((GF_Node *)anim->animation_elt, anim->target, *(GF_List **)info.far_ptr, 0, nodeID)) {
492
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_begin, GF_TRUE, GF_FALSE, &info);
493
if (gf_svg_resolve_smil_times((GF_Node *)anim->animation_elt, anim->target, *(GF_List **)info.far_ptr, GF_FALSE, nodeID)) {
494
494
anim->resolve_stage = 2;
495
495
} else if (force_type!=2) {
500
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_end, 1, 0, &info);
501
if (!gf_svg_resolve_smil_times((GF_Node *)anim->animation_elt, anim->target, *(GF_List **)info.far_ptr, 1, nodeID)) {
502
if (force_type!=2) return 0;
500
gf_node_get_attribute_by_tag((GF_Node *)anim->animation_elt, TAG_SVG_ATT_end, GF_TRUE, GF_FALSE, &info);
501
if (!gf_svg_resolve_smil_times((GF_Node *)anim->animation_elt, anim->target, *(GF_List **)info.far_ptr, GF_TRUE, nodeID)) {
502
if (force_type!=2) return GF_FALSE;
505
505
/*animateMotion needs its children to be parsed before it can be initialized !! */
506
506
if (force_type || gf_node_get_tag((GF_Node *)anim->animation_elt) != TAG_SVG_animateMotion) {
507
507
gf_node_init((GF_Node *)anim->animation_elt);
543
543
SVG_Element *listener = (SVG_Element *)gf_list_get(parser->defered_listeners, i);
546
if (gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_observer, 0, 0, &info) == GF_OK) {
547
XMLRI *observer = info.far_ptr;
546
if (gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_observer, GF_FALSE, GF_FALSE, &info) == GF_OK) {
547
XMLRI *observer = (XMLRI *)info.far_ptr;
548
548
if (observer->type == XMLRI_ELEMENTID) {
549
549
if (!observer->target && observer->string && !strcmp(observer->string, nodeID) ) {
550
550
observer->target = gf_sg_find_node_by_name(sg, (char*) nodeID);
553
if (observer->type == XMLRI_ELEMENTID) par = observer->target;
553
if (observer->type == XMLRI_ELEMENTID) par = (GF_Node *)observer->target;
554
554
if (!par) continue;
556
if (gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_target, 0, 0, &info) == GF_OK) {
557
XMLRI *target = info.far_ptr;
556
if (gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_target, GF_FALSE, GF_FALSE, &info) == GF_OK) {
557
XMLRI *target = (XMLRI *)info.far_ptr;
558
558
if (target->type == XMLRI_ELEMENTID) {
559
559
if (!target->target) continue;
587
587
GF_FieldInfo width_info, height_info;
588
588
u32 svg_w, svg_h;
589
589
svg_w = svg_h = 0;
590
if (!gf_node_get_attribute_by_tag((GF_Node *)root_svg, TAG_SVG_ATT_width, 0, 0, &width_info)
591
&& !gf_node_get_attribute_by_tag((GF_Node *)root_svg, TAG_SVG_ATT_height, 0, 0, &height_info)) {
592
SVG_Length * w = width_info.far_ptr;
593
SVG_Length * h = height_info.far_ptr;
590
if (!gf_node_get_attribute_by_tag((GF_Node *)root_svg, TAG_SVG_ATT_width, GF_FALSE, GF_FALSE, &width_info)
591
&& !gf_node_get_attribute_by_tag((GF_Node *)root_svg, TAG_SVG_ATT_height, GF_FALSE, GF_FALSE, &height_info)) {
592
SVG_Length * w = (SVG_Length *)width_info.far_ptr;
593
SVG_Length * h = (SVG_Length *)height_info.far_ptr;
594
594
if (w->type == SVG_NUMBER_VALUE) svg_w = FIX2INT(w->value);
595
595
if (h->type == SVG_NUMBER_VALUE) svg_h = FIX2INT(h->value);
596
gf_sg_set_scene_size_info(parser->load->scene_graph, svg_w, svg_h, 1);
596
gf_sg_set_scene_size_info(parser->load->scene_graph, svg_w, svg_h, GF_TRUE);
597
597
if (parser->load->ctx) {
598
598
parser->load->ctx->scene_width = svg_w;
599
599
parser->load->ctx->scene_height = svg_h;
682
682
/* If this element has an ID, we look in the list of elements already created in advance (in case of reference) to see if it is there,
683
683
in which case we will reuse it*/
685
685
count = gf_list_count(parser->peeked_nodes);
686
686
if (count && ID) {
687
687
for (i=0; i<count;i++) {
688
GF_Node *n = gf_list_get(parser->peeked_nodes, i);
688
GF_Node *n = (GF_Node *)gf_list_get(parser->peeked_nodes, i);
689
689
const char *n_id = gf_node_get_name(n);
690
690
if (n_id && !strcmp(n_id, ID)) {
691
691
gf_list_rem(parser->peeked_nodes, i);
693
693
elt = (SVG_Element*)n;
830
835
we create the attribute, parse it and try to do some special process it */
831
836
GF_FieldInfo info;
832
837
XMLRI *iri = NULL;
833
if (gf_node_get_attribute_by_tag((GF_Node *)elt, TAG_XLINK_ATT_href, 1, 0, &info)==GF_OK) {
838
if (gf_node_get_attribute_by_tag((GF_Node *)elt, TAG_XLINK_ATT_href, GF_TRUE, GF_FALSE, &info)==GF_OK) {
834
839
gf_svg_parse_attribute((GF_Node *)elt, &info, att->value, 0);
840
iri = (XMLRI *)info.far_ptr;
837
842
/* Embed script if needed or clean data URL with proper mime type */
838
843
svg_process_media_href(parser, (GF_Node *)elt, iri);
859
864
if (ns == GF_XMLNS_LASER) {
860
865
/* CHECK: we should probably check the namespace of the attribute here */
861
866
if (!stricmp(att_name, "scale") ) {
862
if (gf_node_get_attribute_by_tag((GF_Node *)elt, TAG_SVG_ATT_transform, 1, 1, &info)==GF_OK) {
867
if (gf_node_get_attribute_by_tag((GF_Node *)elt, TAG_SVG_ATT_transform, GF_TRUE, GF_TRUE, &info)==GF_OK) {
864
SVG_Transform *mat = info.far_ptr;
869
SVG_Transform *mat = (SVG_Transform *)info.far_ptr;
865
870
svg_parse_point(&pt, att->value);
866
871
gf_mx2d_add_scale(&mat->mat, pt.x, pt.y);
870
875
if (!stricmp(att_name, "translation") ) {
871
if (gf_node_get_attribute_by_tag((GF_Node *)elt, TAG_SVG_ATT_transform, 1, 1, &info)==GF_OK) {
876
if (gf_node_get_attribute_by_tag((GF_Node *)elt, TAG_SVG_ATT_transform, GF_TRUE, GF_TRUE, &info)==GF_OK) {
873
SVG_Transform *mat = info.far_ptr;
878
SVG_Transform *mat = (SVG_Transform *)info.far_ptr;
874
879
svg_parse_point(&pt, att->value);
875
880
gf_mx2d_add_translation(&mat->mat, pt.x, pt.y);
894
900
/* end of special cases of attributes */
896
902
/* General attribute creation and parsing */
897
if (gf_node_get_attribute_by_name((GF_Node *)elt, att_name, ns, 1, 0, &info)==GF_OK) {
903
if (gf_node_get_attribute_by_name((GF_Node *)elt, att_name, ns, GF_TRUE, GF_FALSE, &info)==GF_OK) {
898
904
#ifndef SKIP_ATTS_PARSING
899
905
GF_Err e = gf_svg_parse_attribute((GF_Node *)elt, &info, att->value, 0);
933
939
svg_report(parser, GF_OK, "Skipping attribute %s on node %s", att->name, name);
936
/*set the root of the SVG tree BEFORE processing events in order to have it setup for script init (e.g. load events)*/
937
if ((tag == TAG_SVG_svg) && !parser->has_root) {
938
svg_init_root_element(parser, elt);
941
942
/* When a handler element specifies the event attribute, an implicit listener is defined */
943
944
GF_Node *node = (GF_Node *)elt;
953
954
/* this listener listens to the given type of event */
954
955
type = gf_dom_event_type_by_name(ev_event);
955
gf_node_get_attribute_by_tag(node, TAG_XMLEV_ATT_event, 1, 0, &info);
956
((XMLEV_Event *)info.far_ptr)->type = type;
957
gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_event, 1, 0, &info);
958
((XMLEV_Event *)info.far_ptr)->type = type;
959
gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_handler, 1, 0, &info);
956
gf_node_get_attribute_by_tag(node, TAG_XMLEV_ATT_event, GF_TRUE, GF_FALSE, &info);
957
((XMLEV_Event *)info.far_ptr)->type = type;
958
gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_event, GF_TRUE, GF_FALSE, &info);
959
((XMLEV_Event *)info.far_ptr)->type = type;
960
gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_handler, GF_TRUE, GF_FALSE, &info);
960
961
((XMLRI *)info.far_ptr)->target = node;
962
963
if (ev_observer) {
963
964
/* An observer was specified, so it needs to be used */
964
gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_observer, 1, 0, &info);
965
gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_observer, GF_TRUE, GF_FALSE, &info);
965
966
gf_svg_parse_attribute((GF_Node *)elt, &info, (char*)ev_observer, 0);
967
968
/* No observer specified, this listener listens with the parent of the handler as the event target */
968
gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_target, 1, 0, &info);
969
gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_target, GF_TRUE, GF_FALSE, &info);
969
970
((XMLRI *)info.far_ptr)->target = parent->node;
971
972
/* if the target was found (already parsed), we are fine, otherwise we need to try to find it again,
1011
1012
if (parent && elt) {
1012
1013
/*mark parent element as dirty (new child added) and invalidate parent graph for progressive rendering*/
1013
gf_node_dirty_set((GF_Node *)parent->node, GF_SG_CHILD_DIRTY, 1);
1014
gf_node_dirty_set((GF_Node *)parent->node, GF_SG_CHILD_DIRTY, GF_TRUE);
1014
1015
/*request scene redraw*/
1015
1016
if (parser->load->scene_graph->NodeCallback) {
1016
1017
parser->load->scene_graph->NodeCallback(parser->load->scene_graph->userpriv, GF_SG_CALLBACK_MODIFIED, NULL, NULL);
1020
1021
/*If we are in playback mode, we register (reference counting for safe deleting) the listener element with the element that uses it */
1021
1022
if ((parser->load->flags & GF_SM_LOAD_FOR_PLAYBACK) && elt && (tag==TAG_SVG_listener)) {
1022
1023
GF_FieldInfo info;
1024
Bool post_pone = GF_FALSE;
1024
1025
SVG_Element *par = NULL;
1025
1026
SVG_Element *listener = (SVG_Element *)elt;
1027
if (gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_observer, 0, 0, &info) == GF_OK) {
1028
XMLRI *observer = info.far_ptr;
1028
if (gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_observer, GF_FALSE, GF_FALSE, &info) == GF_OK) {
1029
XMLRI *observer = (XMLRI *)info.far_ptr;
1029
1030
if (observer->type == XMLRI_ELEMENTID) {
1030
if (!observer->target) post_pone = 1;
1031
else par = observer->target;
1031
if (!observer->target) post_pone = GF_TRUE;
1032
else par = (SVG_Element *)observer->target;
1035
if (gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_target, 0, 0, &info) == GF_OK) {
1036
XMLRI *target = info.far_ptr;
1036
if (gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_target, GF_FALSE, GF_FALSE, &info) == GF_OK) {
1037
XMLRI *target = (XMLRI *)info.far_ptr;
1037
1038
if (!par && (target->type == XMLRI_ELEMENTID)) {
1038
if (!target->target) post_pone = 1;
1039
else par = target->target;
1039
if (!target->target) post_pone = GF_TRUE;
1040
else par = (SVG_Element *)target->target;
1042
1043
/*check handler, create it if not specified*/
1043
if (gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_handler, 1, 0, &info) == GF_OK) {
1044
XMLRI *handler = info.far_ptr;
1044
if (gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_handler, GF_TRUE, GF_FALSE, &info) == GF_OK) {
1045
XMLRI *handler = (XMLRI *)info.far_ptr;
1045
1046
if (!handler->target) {
1046
1047
if (!handler->string) handler->target = parent->node;
1049
1050
/*if event is a key event, register it with root*/
1050
if (!par && gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_event, 0, 0, &info) == GF_OK) {
1051
XMLEV_Event *ev = info.far_ptr;
1051
if (!par && gf_node_get_attribute_by_tag((GF_Node *)listener, TAG_XMLEV_ATT_event, GF_FALSE, GF_FALSE, &info) == GF_OK) {
1052
XMLEV_Event *ev = (XMLEV_Event *)info.far_ptr;
1052
1053
if ((ev->type>=GF_EVENT_KEYUP) && (ev->type<=GF_EVENT_TEXTINPUT)) par = (SVG_Element*) listener->sgprivate->scenegraph->RootNode;
1103
1104
field->fieldIndex = 0;
1104
1105
field->fieldType = 0;
1106
if (gf_node_get_attribute_by_name(parser->command->node, atAtt, parser->current_ns, 0, 0, &info)==GF_OK) {
1107
if (gf_node_get_attribute_by_name(parser->command->node, atAtt, parser->current_ns, GF_FALSE, GF_FALSE, &info)==GF_OK) {
1107
1108
field = gf_sg_command_field_new(parser->command);
1108
1109
field->pos = index;
1109
1110
field->fieldIndex = info.fieldIndex;
1348
1349
/* Create a default AU to behave as other streams (LASeR, BIFS)
1349
1350
but it is left empty, there is no notion of REPLACE Scene or NEw Scene,
1350
1351
the RAP is the graph */
1351
parser->laser_au = gf_sm_stream_au_new(parser->laser_es, 0, 0, 1);
1352
parser->laser_au = gf_sm_stream_au_new(parser->laser_es, 0, 0, GF_TRUE);
1353
1354
parser->laser_es = gf_list_get(parser->load->ctx->streams, 0);
1354
1355
parser->laser_au = gf_list_last(parser->laser_es->AUs);
1377
1378
if (!strcmp(name, "sceneUnit") ) {
1380
if (!gf_list_count(parser->laser_es->AUs)) rap = 1;
1383
if (!gf_list_count(parser->laser_es->AUs)) rap = GF_TRUE;
1381
1384
for (i=0; i<nb_attributes;i++) {
1382
1385
GF_XMLAttribute *att = (GF_XMLAttribute *) &attributes[i];
1383
1386
if (!strcmp(att->name, "time")) time = atoi(att->value);
1384
else if (!strcmp(att->name, "rap")) rap = !strcmp(att->value, "yes") ? 1 : 0;
1387
else if (!strcmp(att->name, "rap")) rap = !strcmp(att->value, "yes") ? GF_TRUE : GF_FALSE;
1386
1389
/*create new laser unit*/
1387
1390
parser->laser_au = gf_sm_stream_au_new(parser->laser_es, time, 0, rap);
1432
1435
st->stream_name = gf_strdup(ID);
1434
1437
/*create new SAF unit*/
1435
parser->saf_au = gf_sm_stream_au_new(parser->saf_es, time, 0, 0);
1438
parser->saf_au = gf_sm_stream_au_new(parser->saf_es, time, 0, GF_FALSE);
1436
1439
odU = (GF_ODUpdate *) gf_odf_com_new(GF_ODF_OD_UPDATE_TAG);
1437
1440
gf_list_add(parser->saf_au->commands, odU);
1438
1441
od = (GF_ObjectDescriptor *) gf_odf_desc_new(GF_ODF_OD_TAG);
1534
1537
if ((parser->load->type==GF_SM_LOAD_XSR) && !parser->laser_au && !cond) {
1535
1538
if (parser->load->flags & GF_SM_LOAD_CONTEXT_READY) {
1536
1539
assert(parser->laser_es);
1537
parser->laser_au = gf_sm_stream_au_new(parser->laser_es, 0, 0, 0);
1540
parser->laser_au = gf_sm_stream_au_new(parser->laser_es, 0, 0, GF_FALSE);
1539
1542
svg_report(parser, GF_BAD_PARAM, "LASeR sceneUnit not defined for command %s", name);
1884
1887
parser->sax_parser = gf_xml_sax_new(svg_node_start, svg_node_end, svg_text_content, parser);
1885
1888
parser->load = load;
1886
1889
load->loader_priv = parser;
1887
if (load->ctx) load->ctx->is_pixel_metrics = 1;
1890
if (load->ctx) load->ctx->is_pixel_metrics = GF_TRUE;
1889
1892
/*to cope with old files not signaling XMLNS, add the SVG NS by default*/
1890
1893
gf_sg_add_namespace(parser->load->scene_graph, "http://www.w3.org/2000/svg", NULL);
1911
1914
/*FIXME - if there still are som defered listeners, we should pass them to the scene graph
1912
1915
and wait for the parent to be defined*/
1913
1916
while (gf_list_count(parser->defered_listeners)) {
1914
GF_Node *l = gf_list_last(parser->defered_listeners);
1917
GF_Node *l = (GF_Node *)gf_list_last(parser->defered_listeners);
1915
1918
gf_list_rem_last(parser->defered_listeners);
1916
1919
/*listeners not resolved are not inserted in the tree - destroy them*/
1917
1920
gf_node_register(l, NULL);