void compositor_imagetexture_modified(GF_Node *node) { MFURL url; SFURL sfurl; GF_TextureHandler *txh = (GF_TextureHandler *) gf_node_get_private(node); if (!txh) return; if (gf_node_get_tag(node)!=TAG_MPEG4_CacheTexture) { url = ((M_ImageTexture *) node)->url; } else { url.count = 1; sfurl.OD_ID=GF_MEDIA_EXTERNAL_ID; sfurl.url = ((M_CacheTexture *) node)->image.buffer; url.vals = &sfurl; } /*if open and changed, stop and play*/ if (txh->is_open) { if (! gf_sc_texture_check_url_change(txh, &url)) return; gf_sc_texture_stop(txh); gf_sc_texture_play(txh, &url); return; } /*if not open and changed play*/ if (url.count) gf_sc_texture_play(txh, &url); }
static void back_check_gf_sc_texture_change(GF_TextureHandler *txh, MFURL *url) { /*if open and changed, stop and play*/ if (txh->is_open) { if (! gf_sc_texture_check_url_change(txh, url)) return; gf_sc_texture_stop(txh); gf_sc_texture_play(txh, url); return; } /*if not open and changed play*/ if (url->count) gf_sc_texture_play(txh, url); }
void compositor_movietexture_modified(GF_Node *node) { M_MovieTexture *mt = (M_MovieTexture *)node; MovieTextureStack *st = (MovieTextureStack *) gf_node_get_private(node); if (!st) return; /*if open and changed, stop and play*/ if (gf_sc_texture_check_url_change(&st->txh, &mt->url)) { if (st->txh.is_open) gf_sc_texture_stop(&st->txh); if (mt->isActive) gf_sc_texture_play(&st->txh, &mt->url); } /*update state if we're active*/ else if (mt->isActive) { movietexture_update_time(&st->time_handle); if (!mt->isActive) return; } /*reregister if needed*/ st->time_handle.needs_unregister = 0; if (!st->time_handle.is_registered) gf_sc_register_time_node(st->txh.compositor, &st->time_handle); }
void compositor_background2d_modified(GF_Node *node) { M_Background2D *bck = (M_Background2D *)node; Background2DStack *st = (Background2DStack *) gf_node_get_private(node); if (!st) return; /*dirty node and parents in order to trigger parent visual redraw*/ gf_node_dirty_set(node, 0, 1); /*if open and changed, stop and play*/ if (st->txh.is_open) { if (! gf_sc_texture_check_url_change(&st->txh, &bck->url)) return; gf_sc_texture_stop(&st->txh); gf_sc_texture_play(&st->txh, &bck->url); return; } /*if not open and changed play*/ if (bck->url.count) gf_sc_texture_play(&st->txh, &bck->url); gf_sc_invalidate(st->txh.compositor, NULL); }