Show
Ignore:
Timestamp:
11/20/09 15:31:11 (4 years ago)
Author:
robert
Message:

From Rafa Gaitan, "Current ffmpeg plugin didn't support pause and seek, I have added this
functionality and I also modified osgmovie example to support "seek"."

Note from Robert Osfield, changes osgmovie to use '>' for the seek as '+' was already used in a separate submission that had been merged.

Files:
1 modified

Legend:

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

    r10538 r10809  
    129129{ 
    130130    m_commands->push(CMD_REWIND); 
     131} 
     132 
     133void FFmpegImageStream::seek(double time) { 
     134    m_seek_time = time; 
     135    m_commands->push(CMD_SEEK); 
    131136} 
    132137 
     
    235240        return true; 
    236241 
     242    case CMD_SEEK: 
     243        cmdSeek(m_seek_time); 
     244        return true; 
     245 
    237246    case CMD_STOP: 
    238247        return false; 
     
    255264        if (! m_decoder->video_decoder().isRunning()) 
    256265            m_decoder->video_decoder().start(); 
     266 
     267        m_decoder->resume(); 
    257268    } 
    258269 
     
    266277    if (_status == PLAYING) 
    267278    { 
    268  
     279        m_decoder->pause(); 
    269280    } 
    270281 
     
    279290} 
    280291 
     292void FFmpegImageStream::cmdSeek(double time)  
     293{ 
     294    m_decoder->seek(time); 
     295} 
    281296 
    282297