not able compile lightspark with ffmpeg different versions

Bug #1661854 reported by abhijit_mohanta on 2017-02-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Lightspark
Undecided
Unassigned

Bug Description

I tried to compile latest version of lighstspark from github but did not work.
I get error related to avcodec. I tried different version of ffmpeg but did not work. Can anybody suggest me what version of ffmpeg version should I use.
Tried latest ffmpeg from github. few older versions from https://ffmpeg.org/olddownload.html
http://ffmpeg.org/releases/

logs :
usertest@usertest:~/lightspark-master$ sudo make
[sudo] password for usertest:
[ 3%] Built target translations
[ 4%] Building CXX object src/CMakeFiles/spark.dir/backends/decoder.cpp.o
In file included from /usr/include/libavresample/avresample.h:97:0,
                 from /home/usertest/lightspark-master/src/backends/decoder.h:32,
                 from /home/usertest/lightspark-master/src/backends/audio.h:25,
                 from /home/usertest/lightspark-master/src/backends/decoder.cpp:23:
/usr/include/libavutil/channel_layout.h:152:55: error: declaration of C function ‘uint64_t av_get_default_channel_layout(int)’ conflicts with
 uint64_t av_get_default_channel_layout(int nb_channels);
                                                       ^
In file included from /usr/local/include/libavcodec/avcodec.h:457:0,
                 from /home/usertest/lightspark-master/src/backends/decoder.h:29,
                 from /home/usertest/lightspark-master/src/backends/audio.h:25,
                 from /home/usertest/lightspark-master/src/backends/decoder.cpp:23:
/usr/local/include/libavutil/audioconvert.h:141:9: error: previous declaration ‘int64_t av_get_default_channel_layout(int)’ here
 int64_t av_get_default_channel_layout(int nb_channels);
         ^
/home/usertest/lightspark-master/src/backends/decoder.cpp: In member function ‘virtual void lightspark::FFMpegVideoDecoder::switchCodec(lightspark::LS_VIDEO_CODEC, uint8_t*, uint32_t, double)’:
/home/usertest/lightspark-master/src/backends/decoder.cpp:133:15: warning: ‘AVCodecContext* avcodec_alloc_context()’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4025) [-Wdeprecated-declarations]
  codecContext=avcodec_alloc_context();
               ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:133:37: warning: ‘AVCodecContext* avcodec_alloc_context()’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4025) [-Wdeprecated-declarations]
  codecContext=avcodec_alloc_context();
                                     ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:176:5: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4155) [-Wdeprecated-declarations]
  if(avcodec_open(codecContext, codec)<0)
     ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:176:37: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4155) [-Wdeprecated-declarations]
  if(avcodec_open(codecContext, codec)<0)
                                     ^
/home/usertest/lightspark-master/src/backends/decoder.cpp: In constructor ‘lightspark::FFMpegVideoDecoder::FFMpegVideoDecoder(AVCodecContext*, double)’:
/home/usertest/lightspark-master/src/backends/decoder.cpp:249:5: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4155) [-Wdeprecated-declarations]
  if(avcodec_open(codecContext, codec)<0)
     ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:249:37: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4155) [-Wdeprecated-declarations]
  if(avcodec_open(codecContext, codec)<0)
                                     ^
/home/usertest/lightspark-master/src/backends/decoder.cpp: In member function ‘virtual bool lightspark::FFMpegVideoDecoder::decodeData(uint8_t*, uint32_t, uint32_t)’:
/home/usertest/lightspark-master/src/backends/decoder.cpp:358:77: error: ‘avcodec_decode_video’ was not declared in this scope
  int ret=avcodec_decode_video(codecContext, frameIn, &frameOk, data, datalen);
                                                                             ^
/home/usertest/lightspark-master/src/backends/decoder.cpp: In member function ‘bool lightspark::FFMpegVideoDecoder::decodePacket(AVPacket*, uint32_t)’:
/home/usertest/lightspark-master/src/backends/decoder.cpp:411:84: error: ‘avcodec_decode_video’ was not declared in this scope
  int ret=avcodec_decode_video(codecContext, frameIn, &frameOk, pkt->data, pkt->size);
                                                                                    ^
/home/usertest/lightspark-master/src/backends/decoder.cpp: In member function ‘virtual void lightspark::FFMpegAudioDecoder::switchCodec(lightspark::LS_AUDIO_CODEC, uint8_t*, uint32_t)’:
/home/usertest/lightspark-master/src/backends/decoder.cpp:597:15: warning: ‘AVCodecContext* avcodec_alloc_context()’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4025) [-Wdeprecated-declarations]
  codecContext=avcodec_alloc_context();
               ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:597:37: warning: ‘AVCodecContext* avcodec_alloc_context()’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4025) [-Wdeprecated-declarations]
  codecContext=avcodec_alloc_context();
                                     ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:609:5: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4155) [-Wdeprecated-declarations]
  if(avcodec_open(codecContext, codec)<0)
     ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:609:37: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4155) [-Wdeprecated-declarations]
  if(avcodec_open(codecContext, codec)<0)
                                     ^
/home/usertest/lightspark-master/src/backends/decoder.cpp: In constructor ‘lightspark::FFMpegAudioDecoder::FFMpegAudioDecoder(lightspark::EngineData*, lightspark::LS_AUDIO_CODEC, int, int, bool)’:
/home/usertest/lightspark-master/src/backends/decoder.cpp:637:5: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4155) [-Wdeprecated-declarations]
  if(avcodec_open(codecContext, codec)<0)
     ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:637:37: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4155) [-Wdeprecated-declarations]
  if(avcodec_open(codecContext, codec)<0)
                                     ^
/home/usertest/lightspark-master/src/backends/decoder.cpp: In constructor ‘lightspark::FFMpegAudioDecoder::FFMpegAudioDecoder(lightspark::EngineData*, AVCodecContext*)’:
/home/usertest/lightspark-master/src/backends/decoder.cpp:689:5: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4155) [-Wdeprecated-declarations]
  if(avcodec_open(codecContext, codec)<0)
     ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:689:37: warning: ‘int avcodec_open(AVCodecContext*, AVCodec*)’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4155) [-Wdeprecated-declarations]
  if(avcodec_open(codecContext, codec)<0)
                                     ^
/home/usertest/lightspark-master/src/backends/decoder.cpp: In member function ‘virtual uint32_t lightspark::FFMpegAudioDecoder::decodeData(uint8_t*, int32_t, uint32_t)’:
/home/usertest/lightspark-master/src/backends/decoder.cpp:874:89: error: ‘avcodec_decode_audio2’ was not declared in this scope
  int32_t ret=avcodec_decode_audio2(codecContext, curTail.samples, &maxLen, data, datalen);
                                                                                         ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:874:10: warning: unused variable ‘ret’ [-Wunused-variable]
  int32_t ret=avcodec_decode_audio2(codecContext, curTail.samples, &maxLen, data, datalen);
          ^
/home/usertest/lightspark-master/src/backends/decoder.cpp: In member function ‘uint32_t lightspark::FFMpegAudioDecoder::decodePacket(AVPacket*, uint32_t)’:
/home/usertest/lightspark-master/src/backends/decoder.cpp:939:92: error: ‘avcodec_decode_audio2’ was not declared in this scope
  int ret=avcodec_decode_audio2(codecContext, curTail.samples, &maxLen, pkt->data, pkt->size);
                                                                                            ^
/home/usertest/lightspark-master/src/backends/decoder.cpp: In constructor ‘lightspark::FFMpegStreamDecoder::FFMpegStreamDecoder(lightspark::EngineData*, std::istream&, lightspark::AudioFormat*, int)’:
/home/usertest/lightspark-master/src/backends/decoder.cpp:1042:14: warning: ‘AVIOContext* av_alloc_put_byte(unsigned char*, int, int, void*, int (*)(void*, uint8_t*, int), int (*)(void*, uint8_t*, int), int64_t (*)(void*, int64_t, int))’ is deprecated (declared at /usr/local/include/libavformat/avio.h:270) [-Wdeprecated-declarations]
  avioContext=av_alloc_put_byte(avioBuffer,aviobufsize,0,this,avioReadPacket,NULL,NULL);
              ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:1042:86: warning: ‘AVIOContext* av_alloc_put_byte(unsigned char*, int, int, void*, int (*)(void*, uint8_t*, int), int (*)(void*, uint8_t*, int), int64_t (*)(void*, int64_t, int))’ is deprecated (declared at /usr/local/include/libavformat/avio.h:270) [-Wdeprecated-declarations]
  avioContext=av_alloc_put_byte(avioBuffer,aviobufsize,0,this,avioReadPacket,NULL,NULL);
                                                                                      ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:1079:13: error: ‘AVProbeData’ has no member named ‘mime_type’
   probeData.mime_type=NULL;
             ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:1100:10: warning: ‘int av_open_input_stream(AVFormatContext**, AVIOContext*, const char*, AVInputFormat*, AVFormatParameters*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1462) [-Wdeprecated-declarations]
  int ret=av_open_input_stream(&formatCtx, avioContext, "lightspark_stream", fmt, NULL);
          ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:1100:86: warning: ‘int av_open_input_stream(AVFormatContext**, AVIOContext*, const char*, AVInputFormat*, AVFormatParameters*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1462) [-Wdeprecated-declarations]
  int ret=av_open_input_stream(&formatCtx, avioContext, "lightspark_stream", fmt, NULL);
                                                                                      ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:1109:7: warning: ‘int av_find_stream_info(AVFormatContext*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1526) [-Wdeprecated-declarations]
   ret=av_find_stream_info(formatCtx);
       ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:1109:36: warning: ‘int av_find_stream_info(AVFormatContext*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1526) [-Wdeprecated-declarations]
   ret=av_find_stream_info(formatCtx);
                                    ^
/home/usertest/lightspark-master/src/backends/decoder.cpp: In destructor ‘virtual lightspark::FFMpegStreamDecoder::~FFMpegStreamDecoder()’:
/home/usertest/lightspark-master/src/backends/decoder.cpp:1188:3: warning: ‘void av_close_input_stream(AVFormatContext*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1695) [-Wdeprecated-declarations]
   av_close_input_stream(formatCtx);
   ^
/home/usertest/lightspark-master/src/backends/decoder.cpp:1188:34: warning: ‘void av_close_input_stream(AVFormatContext*)’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1695) [-Wdeprecated-declarations]
   av_close_input_stream(formatCtx);
                                  ^
make[2]: *** [src/CMakeFiles/spark.dir/backends/decoder.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/spark.dir/all] Error 2
make: *** [all] Error 2

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers