error: use of undeclared identifier 'avcodec_free_frame'; did you mean 'avcodec_get_name'?

asked 2016-03-14 10:00:07 -0600

zel gravatar image

updated 2016-03-14 10:47:20 -0600

berak gravatar image

problem with of the ffmpeg-devel port opencv unable to reinstall in mac OS Version 10.9.5. Any idea?

[ 31%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o
In file included from /Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:317:9: error: use of undeclared identifier 'avcodec_free_frame'; did you mean
      'avcodec_get_name'?
        avcodec_free_frame(&picture);
        ^~~~~~~~~~~~~~~~~~
        avcodec_get_name
/usr/local/Cellar/ffmpeg/3.0/include/libavcodec/avcodec.h:5349:13: note: 'avcodec_get_name' declared here
const char *avcodec_get_name(enum AVCodecID id);
            ^
In file included from /Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:317:28: error: cannot initialize a parameter of type 'enum AVCodecID' with an
      rvalue of type 'AVFrame **'
        avcodec_free_frame(&picture);
                           ^~~~~~~~
/usr/local/Cellar/ffmpeg/3.0/include/libavcodec/avcodec.h:5349:45: note: passing argument to parameter 'id' here
const char *avcodec_get_name(enum AVCodecID id);
                                            ^
In file included from /Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:632:23: error: use of undeclared identifier 'avcodec_alloc_frame'
            picture = avcodec_alloc_frame();
                      ^
/Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:635:41: error: use of undeclared identifier 'PIX_FMT_BGR24'; did you mean
      'AV_PIX_FMT_BGR24'?
                    avpicture_get_size( PIX_FMT_BGR24,
                                        ^~~~~~~~~~~~~
                                        AV_PIX_FMT_BGR24
/usr/local/Cellar/ffmpeg/3.0/include/libavutil/pixfmt.h:66:5: note: 'AV_PIX_FMT_BGR24' declared here
    AV_PIX_FMT_BGR24,     ///< packed RGB 8:8:8, 24bpp, BGRBGR...
    ^
In file included from /Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:638:29: error: use of undeclared identifier 'PIX_FMT_BGR24'; did you mean
      'AV_PIX_FMT_BGR24'?
                            PIX_FMT_BGR24, enc->width, enc->height );
                            ^~~~~~~~~~~~~
                            AV_PIX_FMT_BGR24
/usr/local/Cellar/ffmpeg/3.0/include/libavutil/pixfmt.h:66:5: note: 'AV_PIX_FMT_BGR24' declared here
    AV_PIX_FMT_BGR24,     ///< packed RGB 8:8:8, 24bpp, BGRBGR...
    ^
In file included from /Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:738:67: error: use of undeclared identifier 'PIX_FMT_RGB24'; did you mean
      'AV_PIX_FMT_RGB24'?
    avpicture_fill((AVPicture*)&rgb_picture, rgb_picture.data[0], PIX_FMT_RGB24,
                                                                  ^~~~~~~~~~~~~
                                                                  AV_PIX_FMT_RGB24
/usr/local/Cellar/ffmpeg/3.0/include/libavutil/pixfmt.h:65:5: note: 'AV_PIX_FMT_RGB24' declared here
    AV_PIX_FMT_RGB24,     ///< packed RGB 8:8:8, 24bpp, RGBRGB...
    ^
In file included from /Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:756:17: error: use of undeclared identifier 'PIX_FMT_BGR24'; did you mean
      'AV_PIX_FMT_BGR24'?
                PIX_FMT_BGR24,
                ^~~~~~~~~~~~~
                AV_PIX_FMT_BGR24
/usr/local/Cellar/ffmpeg/3.0/include/libavutil/pixfmt.h:66:5: note: 'AV_PIX_FMT_BGR24' declared here
    AV_PIX_FMT_BGR24,     ///< packed RGB 8:8:8, 24bpp, BGRBGR...
    ^
In file included from /Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg.cpp:45:
/Users/tesfaz1/Downloads/opencv-3.0.0/modules/videoio/src/cap_ffmpeg_impl.hpp:1110:15: error: use of undeclared identifier 'avcodec_alloc_frame'
    picture = avcodec_alloc_frame();
              ^
/Users/tesfaz1/Downloads/opencv-3 ...
(more)
edit retag flag offensive close merge delete

Comments

Did you find a solution?

yaffaity gravatar imageyaffaity ( 2016-09-08 20:10:23 -0600 )edit

@yaffaity please do not post answers, if you have none.

berak gravatar imageberak ( 2016-09-08 22:59:33 -0600 )edit

@berak Well you didn't have an answer , and you still posted. so let's calm down.

yaffaity gravatar imageyaffaity ( 2016-09-10 11:03:18 -0600 )edit