Show
Ignore:
Timestamp:
03/04/09 15:49:39 (4 years ago)
Author:
robert
Message:

Introduced double buffering of video stream to avoid tearing of image.

Removed swapBufers call and image y inversion.

Files:
1 modified

Legend:

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

    r9856 r9860  
    108108    FramePtr                m_frame; 
    109109    FramePtr                m_frame_rgba; 
    110     Buffer                  m_buffer_rgba; 
    111     Buffer                  m_buffer_rgba_public; 
     110    Buffer                  m_buffer_rgba[2]; 
     111    int                     m_writeBuffer; 
    112112 
    113113    void *                  m_user_data; 
     
    176176inline const uint8_t * FFmpegDecoderVideo::image() const 
    177177{ 
    178     return &m_buffer_rgba_public[0]; 
     178    return &((m_buffer_rgba[1-m_writeBuffer])[0]); 
    179179} 
    180180