Hi,

Trying to build OSG from source, under Ubuntu 16.04.1, with GCC/G++ 5.4.0. It 
seems there is NO Option for FFMPEG (Enable or NOT), but it automatically look 
for FFMPEG related directories by default, and found the following:



Code:
                                                                                
                                         
 FFMPEG_LIBAVCODEC_INCLUDE_DIRS   /usr/local/include                            
                                                                                
                        
 FFMPEG_LIBAVCODEC_LIBRARIES      /usr/local/lib/libavcodec.so                  
                                                                                
                        
 FFMPEG_LIBAVDEVICE_INCLUDE_DIR   /usr/local/include                            
                                                                                
                        
 FFMPEG_LIBAVDEVICE_LIBRARIES     /usr/local/lib/libavdevice.so                 
                                                                                
                        
 FFMPEG_LIBAVFORMAT_INCLUDE_DIR   /usr/local/include                            
                                                                                
                        
 FFMPEG_LIBAVFORMAT_LIBRARIES     /usr/local/lib/libavformat.so                 
                                                                                
                        
 FFMPEG_LIBAVUTIL_INCLUDE_DIRS    /usr/local/include                            
                                                                                
                        
 FFMPEG_LIBAVUTIL_LIBRARIES       /usr/local/lib/libavutil.so                   
                                                                                
                        
 FFMPEG_LIBSWSCALE_INCLUDE_DIRS   /usr/local/include                            
                                                                                
                        
 FFMPEG_LIBSWSCALE_LIBRARIES      /usr/local/lib/libswscale.so 



And, what I got later on is the following ERROR messages:


Code:

....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member 
function ‘void osgFFmpeg::FFmpegDecoderVideo::open(AVStream*)’:
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:74:46: 
error: ‘PIX_FMT_YUVA420P’ was not declared in this scope
     m_alpha_channel = (m_context->pix_fmt == PIX_FMT_YUVA420P);
                                              ^
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:98:39: 
error: ‘avcodec_alloc_frame’ was not declared in this scope
     m_frame.reset(avcodec_alloc_frame());
                                       ^
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:102:48: 
error: ‘PIX_FMT_RGB24’ was not declared in this scope
     m_buffer_rgba[0].resize(avpicture_get_size(PIX_FMT_RGB24, width(), 
height()));
                                                ^
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:110:28: 
error: invalid conversion from ‘int (*)(AVCodecContext*, AVFrame*)’ to ‘int 
(*)(AVCodecContext*, AVFrame*, int)’ [-fpermissive]
     m_context->get_buffer2 = getBuffer;
                            ^
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:111:16: 
error: ‘AVCodecContext {aka struct AVCodecContext}’ has no member named 
‘release_buffer’
     m_context->release_buffer = releaseBuffer;
                ^
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member 
function ‘int osgFFmpeg::FFmpegDecoderVideo::convert(AVPicture*, int, 
AVPicture*, int, int, int)’:
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:270:64: 
error: ‘PixelFormat2’ was not declared in this scope
         m_swscale_ctx = sws_getContext(src_width, src_height, (PixelFormat2) 
src_pix_fmt,
                                                                ^
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:271:77: 
error: expected ‘)’ before ‘dst_pix_fmt’
                                       src_width, src_height, (PixelFormat2) 
dst_pix_fmt,
                                                                             ^
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member 
function ‘void osgFFmpeg::FFmpegDecoderVideo::publishFrame(double, bool)’:
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:318:92: 
error: ‘PIX_FMT_RGB24’ was not declared in this scope
     avpicture_fill((AVPicture *) (m_frame_rgba).get(), 
&(m_buffer_rgba[m_writeBuffer])[0], PIX_FMT_RGB24, width(), height());
                                                                                
            ^
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:322:31: 
error: ‘PIX_FMT_YUVA420P’ was not declared in this scope
     if (m_context->pix_fmt == PIX_FMT_YUVA420P)
                               ^
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In member 
function ‘void osgFFmpeg::FFmpegDecoderVideo::yuva420pToRgba(AVPicture*, 
AVPicture*, int, int)’:
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:352:18: 
error: ‘PIX_FMT_RGB24’ was not declared in this scope
     convert(dst, PIX_FMT_RGB24, src, m_context->pix_fmt, width, height);
                  ^
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In static 
member function ‘static int 
osgFFmpeg::FFmpegDecoderVideo::getBuffer(AVCodecContext*, AVFrame*)’:
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:376:68: 
error: too few arguments to function ‘int 
avcodec_default_get_buffer2(AVCodecContext*, AVFrame*, int)’
     const int result = avcodec_default_get_buffer2(context, picture);
                                                                    ^
In file included from 
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegHeaders.hpp:11:0,
                 from 
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.hpp:6,
                 from 
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:1:
/usr/local/include/libavcodec/avcodec.h:4669:5: note: declared here
 int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags);
     ^
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp: In static 
member function ‘static void 
osgFFmpeg::FFmpegDecoderVideo::releaseBuffer(AVCodecContext*, AVFrame*)’:
....../OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoderVideo.cpp:392:52: 
error: ‘avcodec_default_release_buffer’ was not declared in this scope
     avcodec_default_release_buffer(context, picture);
                                                    ^




So, my questions:

 Is there a way to DISABLE FFMPEG while building OSG?


 if FFMPEG MUST be ENABLED by default, any way to make current OSG compatible 
with current FFMPEG release 3.2.2 ?



Thank you!

Cheers,
Pei

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69906#69906





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to