Changeset 9861

Show
Ignore:
Timestamp:
03/04/09 17:03:28 (6 years ago)
Author:
robert
Message:

Removed boost reference and cleaned up debug output

Location:
OpenSceneGraph/trunk/src/osgPlugins/ffmpeg
Files:
4 modified

Legend:

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

    r9847 r9861  
    4242private: 
    4343 
    44     //typedef boost::shared_ptr<AVFrame> FramePtr; 
    4544    typedef osg::ref_ptr<osg::AudioSink> SinkPtr; 
    4645    typedef std::vector<uint8_t> Buffer; 
  • OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp

    r9860 r9861  
    3333FFmpegDecoderVideo::~FFmpegDecoderVideo() 
    3434{ 
     35    osg::notify(osg::NOTICE)<<"Destructing FFmpegDecoderVideo..."<<std::endl; 
     36 
    3537    if (isRunning()) 
    3638    { 
     
    4648    } 
    4749#endif 
     50 
     51    osg::notify(osg::NOTICE)<<"Destructed FFmpegDecoderVideo"<<std::endl; 
    4852} 
    4953 
     
    261265    AVPicture * const dst = (AVPicture *) m_frame_rgba.get(); 
    262266 
    263     osg::Timer_t startTick = osg::Timer::instance()->tick(); 
    264  
    265267    // Assign appropriate parts of the buffer to image planes in m_frame_rgba 
    266268    avpicture_fill((AVPicture *) (m_frame_rgba).get(), &(m_buffer_rgba[m_writeBuffer])[0], PIX_FMT_RGB32, width(), height()); 
     
    273275        convert(dst, PIX_FMT_RGB32, src, m_context->pix_fmt, width(), height()); 
    274276 
    275  
    276     // Flip and swap buffer 
    277     // swapBuffers(); 
    278  
    279  
    280     osg::Timer_t endTick = osg::Timer::instance()->tick(); 
    281     osg::notify(osg::NOTICE)<<" time of swapBuffers = "<<osg::Timer::instance()->delta_m(startTick,endTick)<<"ms"<<std::endl; 
    282  
    283277    // Wait 'delay' seconds before publishing the picture. 
    284278    int i_delay = static_cast<int>(delay * 1000000 + 0.5); 
     
    300294 
    301295    m_publish_func(* this, m_user_data); 
    302 } 
    303  
    304  
    305  
    306 void FFmpegDecoderVideo::swapBuffers() 
    307 { 
    308     for (int h = 0; h < height(); ++h) 
    309         memcpy(&(m_buffer_rgba[1-m_writeBuffer])[(height() - h - 1) * width() * 4], &(m_buffer_rgba[m_writeBuffer])[h * width() * 4], width() * 4); 
    310296} 
    311297 
  • OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp

    r9860 r9861  
    99#include "FFmpegPacket.hpp" 
    1010 
    11 #include <boost/shared_ptr.hpp> 
    1211#include <OpenThreads/Thread> 
    1312#include <vector> 
     
    8685    void findAspectRatio(); 
    8786    void publishFrame(double delay); 
    88     void swapBuffers(); 
    8987    double synchronizeVideo(double pts); 
    9088    void yuva420pToRgba(AVPicture *dst, const AVPicture *src, int width, int height); 
  • OpenSceneGraph/trunk/src/osgPlugins/ffmpeg/FFmpegImageStream.cpp

    r9860 r9861  
    4040FFmpegImageStream::~FFmpegImageStream() 
    4141{ 
     42    osg::notify(osg::NOTICE)<<"Destructing FFMpegImageStream..."<<std::endl; 
     43 
    4244    quit(true); 
    4345 
     46    // destroy the decoder and associated threads 
     47    m_decoder = 0; 
     48 
     49 
    4450    delete m_commands; 
     51 
     52    osg::notify(osg::NOTICE)<<"Destructed FFMpegImageStream."<<std::endl; 
    4553} 
    4654