xmar / 360Transformations

68 stars 16 forks source link

Issue faced when building the docker image ('make' step) - 'AVStream::codec' is deprecated #27

Closed hirwaam closed 5 years ago

hirwaam commented 5 years ago

docker build -t trans360 .

$ cat Dockerfile FROM debian:buster as builder RUN apt-get update && apt-get upgrade -y && apt-get install -y ffmpeg libopencv-dev libboost-all-dev RUN apt-get install -y build-essential RUN apt-get install -y cmake libgomp1 WORKDIR /tmp COPY . /tmp RUN rm -rf build && mkdir build WORKDIR /tmp/build RUN cmake .. RUN make

Step 10/14 : RUN make ---> Running in 037444fbfed4 Scanning dependencies of target LibAvWrapper [ 5%] Building CXX object LibAvWrapper/CMakeFiles/LibAvWrapper.dir/src/Packet.cpp.o [ 10%] Building CXX object LibAvWrapper/CMakeFiles/LibAvWrapper.dir/src/VideoReader.cpp.o /tmp/LibAvWrapper/src/VideoReader.cpp: In destructor 'virtual IMT::LibAv::VideoReader::~VideoReader()': /tmp/LibAvWrapper/src/VideoReader.cpp:34:44: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] avcodec_close(m_fmt_ctx->streams[i]->codec); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:34:44: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] avcodec_close(m_fmt_ctx->streams[i]->codec); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:34:44: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] avcodec_close(m_fmt_ctx->streams[i]->codec); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp: In function 'void printA(AVFormatContext)': /tmp/LibAvWrapper/src/VideoReader.cpp:50:24: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] if(_a->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:50:24: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] if(_a->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:50:24: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] if(_a->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp: In member function 'void IMT::LibAv::VideoReader::Init(unsigned int)': /tmp/LibAvWrapper/src/VideoReader.cpp:65:21: warning: 'void av_register_all()' is deprecated [-Wdeprecated-declarations] av_register_all(); ^ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:2043:6: note: declared here void av_register_all(void); ^~~~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:65:21: warning: 'void av_register_all()' is deprecated [-Wdeprecated-declarations] av_register_all(); ^ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:2043:6: note: declared here void av_register_all(void); ^~~~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:107:35: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] if(m_fmt_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:107:35: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] if(m_fmt_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:107:35: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] if(m_fmt_ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:109:36: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] m_fmt_ctx->streams[i]->codec->refcounted_frames = 1; ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:109:36: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] m_fmt_ctx->streams[i]->codec->refcounted_frames = 1; ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:109:36: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] m_fmt_ctx->streams[i]->codec->refcounted_frames = 1; ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:109:43: warning: 'AVCodecContext::refcounted_frames' is deprecated [-Wdeprecated-declarations] m_fmt_ctx->streams[i]->codec->refcounted_frames = 1; ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:11, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:2360:9: note: declared here int refcounted_frames; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:109:43: warning: 'AVCodecContext::refcounted_frames' is deprecated [-Wdeprecated-declarations] m_fmt_ctx->streams[i]->codec->refcounted_frames = 1; ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:11, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:2360:9: note: declared here int refcounted_frames; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:109:43: warning: 'AVCodecContext::refcounted_frames' is deprecated [-Wdeprecated-declarations] m_fmt_ctx->streams[i]->codec->refcounted_frames = 1; ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:11, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:2360:9: note: declared here int refcounted_frames; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:113:73: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] auto decoder = avcodec_find_decoder(m_fmt_ctx->streams[i]->codec->codec_id); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:113:73: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] auto decoder = avcodec_find_decoder(m_fmt_ctx->streams[i]->codec->codec_id); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:113:73: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] auto decoder = avcodec_find_decoder(m_fmt_ctx->streams[i]->codec->codec_id); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:119:61: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] if ((ret = avcodec_open2(m_fmt_ctx->streams[i]->codec, decoder, nullptr)) < 0) ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:119:61: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] if ((ret = avcodec_open2(m_fmt_ctx->streams[i]->codec, decoder, nullptr)) < 0) ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:119:61: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] if ((ret = avcodec_open2(m_fmt_ctx->streams[i]->codec, decoder, nullptr)) < 0) ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp: In member function 'void IMT::LibAv::VideoReader::DecodeNextStep()': /tmp/LibAvWrapper/src/VideoReader.cpp:178:60: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] auto codecCtx = m_fmt_ctx->streams[streamId]->codec; ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:178:60: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] auto codecCtx = m_fmt_ctx->streams[streamId]->codec; ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:178:60: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] auto codecCtx = m_fmt_ctx->streams[streamId]->codec; ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:216:72: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] avcodec_send_packet(m_fmt_ctx->streams[m_videoStreamIds[i]]->codec, nullptr); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:216:72: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] avcodec_send_packet(m_fmt_ctx->streams[m_videoStreamIds[i]]->codec, nullptr); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:216:72: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] avcodec_send_packet(m_fmt_ctx->streams[m_videoStreamIds[i]]->codec, nullptr); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:225:86: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] auto codecCtx = m_fmt_ctx->streams[m_videoStreamIds[streamVectId]]->codec; ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:225:86: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] auto codecCtx = m_fmt_ctx->streams[m_videoStreamIds[streamVectId]]->codec; ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:225:86: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] auto codecCtx = m_fmt_ctx->streams[m_videoStreamIds[streamVectId]]->codec; ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:227:101: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] int ret = avcodec_receive_frame(m_fmt_ctx->streams[m_videoStreamIds[streamVectId]]->codec, frame_ptr); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:227:101: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] int ret = avcodec_receive_frame(m_fmt_ctx->streams[m_videoStreamIds[streamVectId]]->codec, frame_ptr); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ /tmp/LibAvWrapper/src/VideoReader.cpp:227:101: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] int ret = avcodec_receive_frame(m_fmt_ctx->streams[m_videoStreamIds[streamVectId]]->codec, frame_ptr); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoReader.hpp:12, from /tmp/LibAvWrapper/src/VideoReader.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ [ 15%] Building CXX object LibAvWrapper/CMakeFiles/LibAvWrapper.dir/src/VideoWriter.cpp.o In file included from /tmp/LibAvWrapper/src/VideoWriter.cpp:1: /tmp/LibAvWrapper/inc/VideoWriter.hpp: In member function 'void IMT::LibAv::VideoWriter::Init(std::__cxx11::string, std::array<unsigned int, nbStreams>, std::array<unsigned int, nbStreams>, unsigned int, unsigned int, std::array<int, nbStreams>)': /tmp/LibAvWrapper/inc/VideoWriter.hpp:94:58: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] m_codec_ctx.push_back(m_vstream[id]->codec); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoWriter.hpp:9, from /tmp/LibAvWrapper/src/VideoWriter.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ In file included from /tmp/LibAvWrapper/src/VideoWriter.cpp:1: /tmp/LibAvWrapper/inc/VideoWriter.hpp:94:58: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] m_codec_ctx.push_back(m_vstream[id]->codec); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoWriter.hpp:9, from /tmp/LibAvWrapper/src/VideoWriter.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext codec; ^~~~~ In file included from /tmp/LibAvWrapper/src/VideoWriter.cpp:1: /tmp/LibAvWrapper/inc/VideoWriter.hpp:94:58: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations] m_codec_ctx.push_back(m_vstream[id]->codec); ^~~~~ In file included from /tmp/LibAvWrapper/inc/VideoWriter.hpp:9, from /tmp/LibAvWrapper/src/VideoWriter.cpp:1: /usr/include/x86_64-linux-gnu/libavformat/avformat.h:878:21: note: declared here AVCodecContext *codec; ^~~~~ In file included from /tmp/LibAvWrapper/src/VideoWriter.cpp:1: /tmp/LibAvWrapper/inc/VideoWriter.hpp:134:38: warning: 'AVCodecContext::refcounted_frames' is deprecated [-Wdeprecated-declarations] m_codec_ctx[id]->refcounted_frames = 1; ^~~~~ In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319, from /tmp/LibAvWrapper/inc/VideoWriter.hpp:9, from /tmp/LibAvWrapper/src/VideoWriter.cpp:1: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:2360:9: note: declared here int refcounted_frames; ^~~~~ In file included from /tmp/LibAvWrapper/src/VideoWriter.cpp:1: /tmp/LibAvWrapper/inc/VideoWriter.hpp:134:38: warning: 'AVCodecContext::refcounted_frames' is deprecated [-Wdeprecated-declarations] m_codec_ctx[id]->refcounted_frames = 1; ^~~~~ In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319, from /tmp/LibAvWrapper/inc/VideoWriter.hpp:9, from /tmp/LibAvWrapper/src/VideoWriter.cpp:1: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:2360:9: note: declared here int refcounted_frames; ^~~~~ In file included from /tmp/LibAvWrapper/src/VideoWriter.cpp:1: /tmp/LibAvWrapper/inc/VideoWriter.hpp:134:38: warning: 'AVCodecContext::refcounted_frames' is deprecated [-Wdeprecated-declarations] m_codec_ctx[id]->refcounted_frames = 1; ^~~~~ In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319, from /tmp/LibAvWrapper/inc/VideoWriter.hpp:9, from /tmp/LibAvWrapper/src/VideoWriter.cpp:1: /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:2360:9: note: declared here int refcounted_frames; ^~~~~ In file included from /tmp/LibAvWrapper/src/VideoWriter.cpp:1: /tmp/LibAvWrapper/inc/VideoWriter.hpp:174:45: error: 'CODEC_FLAG_GLOBAL_HEADER' was not declared in this scope codec_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER; ^~~~~~~~ /tmp/LibAvWrapper/inc/VideoWriter.hpp:174:45: note: suggested alternative: 'AV_CODEC_FLAG_GLOBAL_HEADER' codec_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER; ^~~~~~~~ AV_CODEC_FLAG_GLOBAL_HEADER make[2]: [LibAvWrapper/CMakeFiles/LibAvWrapper.dir/build.make:89: LibAvWrapper/CMakeFiles/LibAvWrapper.dir/src/VideoWriter.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:91: LibAvWrapper/CMakeFiles/LibAvWrapper.dir/all] Error 2 make: *** [Makefile:84: all] Error 2 The command '/bin/sh -c make' returned a non-zero code: 2

hirwaam commented 5 years ago

After using the git branch "DevXav". git clone -b DevXav https://github.com/xmar/360Transformations.git

/360Transformations/transformation/LibAvWrapper/inc$ vi VideoWriter.hpp

PRINT_DEBUG_VideoWrite("Write header") if (m_fmt_ctx->oformat->flags & AVFMT_GLOBALHEADER) { for (auto& codec_ctx: m_codec_ctx) {

ifdef CODEC_FLAG_GLOBAL_HEADER

                    codec_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER;

else

                    codec_ctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;

endif

docker build -t trans360 . Step 10/14 : RUN make ---> Running in 6ac0ed01496b Scanning dependencies of target LibAvWrapper [ 3%] Building CXX object LibAvWrapper/CMakeFiles/LibAvWrapper.dir/src/Packet.cpp.o [ 7%] Building CXX object LibAvWrapper/CMakeFiles/LibAvWrapper.dir/src/VideoReader.cpp.o

LibAvWrapper/src/VideoReader.cpp:34:44: warning: 'AVStream::codec' is deprecated LibAvWrapper/inc/VideoWriter.hpp:134:38: warning: 'AVCodecContext::refcounted_frames' is deprecated

This can be found repeatedly occuring during the make. Finally, the make exits with:

virtual memory exhausted: Cannot allocate memory make[2]: [MainProject/CMakeFiles/trans.dir/build.make:284: MainProject/CMakeFiles/trans.dir/src/Picture.cpp.o] Error 1 make[1]: [CMakeFiles/Makefile2:146: MainProject/CMakeFiles/trans.dir/all] Error 2 make: *** [Makefile:84: all] Error 2 The command '/bin/sh -c make' returned a non-zero code: 2

Upon checking further in LibAV documentation:

https://libav.org/documentation/doxygen/master/structAVCodecContext.html#a17d91e3ddcf7cc8fb235ba4f15777282 attribute_deprecated int AVCodecContext::refcounted_frames Definition at line 2019 of file avcodec.h.

https://libav.org/documentation/doxygen/master/structAVStream.html attribute_deprecated AVCodecContext* AVStream::codec Deprecated: use the codecpar struct instead Definition at line 706 of file avformat.h

root@ip-172-31-36-115:~# find / -name "avformat.h" /var/lib/docker/overlay2/3c5267d83590b9c18ee83c02fe0f7ed12914aa16731ec6ae17f6eed715f83370/diff/usr/include/x86_64-linux-gnu/libavformat/avformat.h /var/lib/docker/overlay2/3c5267d83590b9c18ee83c02fe0f7ed12914aa16731ec6ae17f6eed715f83370/diff/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h

hirwaam commented 5 years ago

Issue was resolved after creating swap file - followed instructions at https://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/