2017-03-28 1 views
0

에 gnuradio-mediatools.amodule를 설치하려고, 아이디어를 가지고 사람이 좋을 것입니다 ~ 내가 중요하다고 생각하는 것은Cmake 건물 에러, 모듈은 <a href="https://github.com/osh/gr-mediatools" rel="nofollow noreferrer">Here</a> 내가 어쩌면 약간의 의존성 오류가 발생 생각 찾을 수 있습니다 GNURadio

입니다

lib 디렉토리/CMakeFiles/gnuradio-mediatools.dir/build.make : 86 : 대상의 레시피 'lib 디렉토리/CMakeFiles/gnuradio-mediatools.dir/mediatools_audiosource_impl.cc.o이'전체 목록을 다음과 같이 실패 :

[email protected]:~/下载/GNU/ 模块/gr-mediatools-master/build$ make -j4 
Scanning dependencies of target mediatools_swig_swig_doc 
Scanning dependencies of target pygen_python_aead6 
Scanning dependencies of target pygen_apps_9a6dd 
Scanning dependencies of target gnuradio-mediatools 
[ 0%] Built target mediatools_swig_swig_doc 
[ 5%] Generating __init__.pyc 
[ 5%] Built target pygen_apps_9a6dd 
Scanning dependencies of target _mediatools_swig_swig_tag 
[ 11%] Generating __init__.pyo 
[ 17%] Building CXX object swig/CMakeFiles/_mediatools_swig_swig_tag.dir/_mediatools_swig_swig_tag.cpp.o 
[ 23%] Building CXX object lib/CMakeFiles/gnuradio-mediatools.dir/mediatools_audiosource_s.cc.o 
[ 29%] Building CXX object lib/CMakeFiles/gnuradio-mediatools.dir/mediatools_audiosource_impl.cc.o 
[ 35%] Linking CXX executable _mediatools_swig_swig_tag 
[ 35%] Built target pygen_python_aead6 
[ 35%] Built target _mediatools_swig_swig_tag 
[ 41%] Generating mediatools_swig.tag 
Scanning dependencies of target mediatools_swig_swig_2d0df 
[ 47%] Building CXX object swig/CMakeFiles/mediatools_swig_swig_2d0df.dir/mediatools_swig_swig_2d0df.cpp.o 
[ 52%] Linking CXX executable mediatools_swig_swig_2d0df 
Swig source 
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc: In member function ‘bool mediatools_audiosource_impl::open(std::__cxx11::string)’: 
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:42:58: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 
     d_codec_ctx = d_format_ctx->streams[stream_idx]->codec; 
                 ^
In file included from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/include/mediatools_audiosource_impl.h:11:0, 
       from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1: 
/usr/local/include/libavformat/avformat.h:893:21: note: declared here 
    AVCodecContext *codec; 
        ^
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:42:58: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 
     d_codec_ctx = d_format_ctx->streams[stream_idx]->codec; 
                 ^
In file included from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/include/mediatools_audiosource_impl.h:11:0, 
       from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1: 
/usr/local/include/libavformat/avformat.h:893:21: note: declared here 
    AVCodecContext *codec; 
        ^
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:42:58: warning: ‘AVStream::codec’ is deprecated [-Wdeprecated-declarations] 
     d_codec_ctx = d_format_ctx->streams[stream_idx]->codec; 
                 ^
In file included from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/include/mediatools_audiosource_impl.h:11:0, 
       from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1: 
/usr/local/include/libavformat/avformat.h:893:21: note: declared here 
    AVCodecContext *codec; 
        ^
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc: In member function ‘void mediatools_audiosource_impl::readData(std::vector<short int>&)’: 
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:91:39: error: ‘avcodec_alloc_frame’ was not declared in this scope 
     d_frame = avcodec_alloc_frame(); 
            ^
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:95:14: warning: ‘int avcodec_decode_audio4(AVCodecContext*, AVFrame*, int*, const AVPacket*)’ is deprecated [-Wdeprecated-declarations] 
    int rc = avcodec_decode_audio4(d_codec_ctx, d_frame, &got_frame, &d_packet); 
      ^
In file included from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/include/mediatools_audiosource_impl.h:10:0, 
       from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1: 
/usr/local/include/libavcodec/avcodec.h:4817:5: note: declared here 
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, 
    ^
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:95:14: warning: ‘int avcodec_decode_audio4(AVCodecContext*, AVFrame*, int*, const AVPacket*)’ is deprecated [-Wdeprecated-declarations] 
    int rc = avcodec_decode_audio4(d_codec_ctx, d_frame, &got_frame, &d_packet); 
      ^
In file included from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/include/mediatools_audiosource_impl.h:10:0, 
       from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1: 
/usr/local/include/libavcodec/avcodec.h:4817:5: note: declared here 
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, 
    ^
/home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:95:79: warning: ‘int avcodec_decode_audio4(AVCodecContext*, AVFrame*, int*, const AVPacket*)’ is deprecated [-Wdeprecated-declarations] 
    int rc = avcodec_decode_audio4(d_codec_ctx, d_frame, &got_frame, &d_packet); 
                      ^
In file included from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/include/mediatools_audiosource_impl.h:10:0, 
       from /home/imatrix/下载/GNU/ 模块/gr-mediatools-master/lib/mediatools_audiosource_impl.cc:1: 
/usr/local/include/libavcodec/avcodec.h:4817:5: note: declared here 
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame, 
    ^
lib/CMakeFiles/gnuradio-mediatools.dir/build.make:86: recipe for target 'lib/CMakeFiles/gnuradio-mediatools.dir/mediatools_audiosource_impl.cc.o' failed 
make[2]: *** [lib/CMakeFiles/gnuradio-mediatools.dir/mediatools_audiosource_impl.cc.o] Error 1 
make[2]: *** 正在等待未完成的任务.... 
[ 52%] Built target mediatools_swig_swig_2d0df 
Scanning dependencies of target pygen_swig_d4ca7 
[ 64%] Generating mediatools_swig.pyc 
[ 64%] Generating mediatools_swig.pyo 
[ 70%] Built target pygen_swig_d4ca7 
CMakeFiles/Makefile2:135: recipe for target 'lib/CMakeFiles/gnuradio-mediatools.dir/all' failed 
make[1]: *** [lib/CMakeFiles/gnuradio-mediatools.dir/all] Error 2 
Makefile:138: recipe for target 'all' failed 
make: *** [all] Error 2 

답변

0

여기에서 오류가 발생합니다 :

gr-mediatools-master/lib/mediatools_audiosource_impl.cc:91:39: error: ‘avcodec_alloc_frame’ was not declared in this scope 
     d_frame = avcodec_alloc_frame(); 

최신 버전의 ffmpeg에서는 avcodec_alloc_frame이 사용되지 않기 때문입니다. gr-mediatools 저장소는 이제 꽤 오래되었습니다.

라인 91lib/mediatools_audiosource_impl.ccav_frame_allocavcodec_alloc_frame 교체 트릭을 할 단지 수 있습니다.

관련 문제