void VLCVideoTextureObjChunk::resizeVideo()
{
    if ((libvlc == NULL) || (vlcmediaplayer == NULL)) return;    
    libvlc_time_t current_time=0;
    bool play = true;

    if (libvlc_media_player_is_playing(vlcmediaplayer)!=1) play=false;
    
    current_time = libvlc_media_player_get_time(vlcmediaplayer);           
    SINFO << "restart video at " << current_time << std::endl;
        
    createVLCInstance(current_time,play);
}
void VLCVideoTextureObjChunk::changed(ConstFieldMaskArg whichField,
                                      UInt32            origin,
                                      BitVector         details)
{

    Inherited::changed(whichField, origin, details);

    if (0x0000 != (whichField & UrlFieldMask)) {
        // init VLC internal structures
        if (getUrl().length() > 0) 
        {
            createVLCInstance();
        }
    }
    else
        if ((0x0000 != (whichField & WidthFieldMask)) ||
            (0x0000 != (whichField & HeightFieldMask)))
        {
            // reinit VLC internal structures
            if (getUrl().length() > 1)
            {
                resizeVideo();
            }
        }

    if (0x0000 != (whichField & StatusFieldMask)) {
        // update VLC        
    }

    if (0x0000 != (whichField & TimestampFieldMask)) {
        // update VLC
        if (getUrl().length() > 1)
        {
            if (!this->getIsMaster())
            {
                updateTime();
            }
        }
    }
}