Show
Ignore:
Timestamp:
12/02/09 19:58:45 (3 years ago)
Author:
robert
Message:

From Julen Garcia,"I've been lately working also with the ffmpeg plugin and I implemented pause(), seek() and getReferenceTime(). I think that I have solved the internal clock issues (maybe not in the most elegant way :?"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp

    r10414 r10851  
    2121    m_user_data(0), 
    2222    m_publish_func(0), 
     23    m_paused(true), 
    2324    m_exit(false) 
    2425#ifdef USE_SWSCALE 
     
    118119} 
    119120 
     121void FFmpegDecoderVideo::pause(bool pause) 
     122{ 
     123    if(pause) 
     124        m_paused = true; 
     125    else 
     126        m_paused = false; 
     127} 
    120128 
    121129void FFmpegDecoderVideo::run() 
     
    193201                publishFrame(frame_delay, m_clocks.audioDisabled()); 
    194202            } 
     203        } 
     204 
     205        while(m_paused && !m_exit) 
     206        { 
     207            microSleep(10000); 
    195208        } 
    196209