untrunc
untrunc copied to clipboard
MAC(10.15.7) build error (xcode12.4)
% g++ -o untrunc file.cpp main.cpp track.cpp atom.cpp codec_*.cpp codecstats.cpp codec.cpp mp4.cpp log.cpp -I./libav-12.3 -L./libav-12.3/libavformat -lavformat -L./libav-12.3/libavcodec -lavcodec -L./libav-12.3/libavresample -lavresample -L./libav-12.3/libavutil -lavutil -lpthread -lz -framework CoreFoundation -framework CoreVideo -framework VideoDecodeAcceleration -lbz2 -DOSX
In file included from main.cpp:21: In file included from ./mp4.h:28: In file included from ./track.h:30: In file included from ./codec.h:7: ./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int fixed_size = 0; //zero we don't know ^ ./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int64_t fixed_begin64 = 0; ^ ./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t fixed_begin32 = 0; ^ ./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t largestSample = 0; ^ ./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t smallestSample = (1<<20); ^ In file included from main.cpp:21: In file included from ./mp4.h:28: In file included from ./track.h:30: ./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t id = 0; ^ ./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t length = 0; ^ ./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t duration = 0; //audio often provide a duration for the packet. ^ ./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] float chances = 0.0f; //1/chances is the probability to NOT be a match ^ ./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool keyframe = false; ^ ./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t pcm_bytes_per_sample = 0; //sample size. ^ ./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool pcm = false; ^ ./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool tmcd_seen = false; ^ In file included from main.cpp:21: In file included from ./mp4.h:28: ./track.h:42:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool hint_track = false; ^ ./track.h:43:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t hinted_id = -1; ^ ./track.h:46:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int default_time = 0; ^ ./track.h:51:29: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int default_chunk_nsamples = 0; ^ ./track.h:52:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int default_size = 0; //default SAMPLE size ^ ./track.h:65:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint64_t offset = 0; ^ ./track.h:66:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t size = 0; ^ ./track.h:67:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t nsamples = 0; ^ ./track.h:68:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t first_sample = 0; ^ In file included from main.cpp:22: ./atom.h:44:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool length64 = false; ^ main.cpp:110:31: error: non-aggregate type 'vectorMp4::MdatStrategy' cannot be initialized with an initializer list vectorMp4::MdatStrategy strategies = { Mp4::SAME, Mp4::SEARCH, Mp4::LAST }; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ main.cpp:111:35: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(Mp4::MdatStrategy strategy: strategies) { ^ 24 warnings and 1 error generated. In file included from track.cpp:27: In file included from ./track.h:30: In file included from ./codec.h:7: ./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int fixed_size = 0; //zero we don't know ^ ./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int64_t fixed_begin64 = 0; ^ ./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t fixed_begin32 = 0; ^ ./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t largestSample = 0; ^ ./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t smallestSample = (1<<20); ^ In file included from track.cpp:27: In file included from ./track.h:30: ./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t id = 0; ^ ./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t length = 0; ^ ./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t duration = 0; //audio often provide a duration for the packet. ^ ./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] float chances = 0.0f; //1/chances is the probability to NOT be a match ^ ./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool keyframe = false; ^ ./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t pcm_bytes_per_sample = 0; //sample size. ^ ./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool pcm = false; ^ ./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool tmcd_seen = false; ^ In file included from track.cpp:27: ./track.h:42:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool hint_track = false; ^ ./track.h:43:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t hinted_id = -1; ^ ./track.h:46:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int default_time = 0; ^ ./track.h:51:29: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int default_chunk_nsamples = 0; ^ ./track.h:52:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int default_size = 0; //default SAMPLE size ^ ./track.h:65:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint64_t offset = 0; ^ ./track.h:66:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t size = 0; ^ ./track.h:67:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t nsamples = 0; ^ ./track.h:68:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t first_sample = 0; ^ In file included from track.cpp:28: ./atom.h:44:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool length64 = false; ^ track.cpp:142:17: warning: empty parentheses interpreted as a function declaration [-Wvexing-parse] AvLog useAvLog(); ^~ track.cpp:142:17: note: remove parentheses to declare a variable AvLog useAvLog(); ^~ track.cpp:292:12: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(int t: times) { ^ 25 warnings generated. In file included from atom.cpp:23: ./atom.h:44:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool length64 = false; ^ atom.cpp:292:19: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(uint8_t s: sequenceParameterSetNALUnit) ^ atom.cpp:295:19: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(uint8_t s: pictureParameterSetNALUnit) ^ 3 warnings generated. In file included from codec_alac.cpp:1: In file included from ./codec.h:7: ./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int fixed_size = 0; //zero we don't know ^ ./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int64_t fixed_begin64 = 0; ^ ./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t fixed_begin32 = 0; ^ ./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t largestSample = 0; ^ ./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t smallestSample = (1<<20); ^ In file included from codec_alac.cpp:1: ./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t id = 0; ^ ./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t length = 0; ^ ./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t duration = 0; //audio often provide a duration for the packet. ^ ./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] float chances = 0.0f; //1/chances is the probability to NOT be a match ^ ./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool keyframe = false; ^ ./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t pcm_bytes_per_sample = 0; //sample size. ^ ./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool pcm = false; ^ ./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool tmcd_seen = false; ^ codec_alac.cpp:65:16: warning: empty parentheses interpreted as a function declaration [-Wvexing-parse] AvLog useAvLog(); ^~ codec_alac.cpp:65:16: note: remove parentheses to declare a variable AvLog useAvLog(); ^~ codec_alac.cpp:75:2: warning: 'avcodec_decode_audio4' is deprecated [-Wdeprecated-declarations] avcodec_decode_audio4(context, frame, &got_frame, &avp); ^ ./libav-12.3/libavcodec/avcodec.h:4150:1: note: 'avcodec_decode_audio4' has been explicitly marked deprecated here attribute_deprecated ^ ./libav-12.3/libavutil/attributes.h:76:49: note: expanded from macro 'attribute_deprecated'
define attribute_deprecated attribute((deprecated))
^
15 warnings generated.
In file included from codec_apch.cpp:1:
In file included from ./codec.h:7:
./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int fixed_size = 0; //zero we don't know
^
./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int64_t fixed_begin64 = 0;
^
./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int32_t fixed_begin32 = 0;
^
./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int32_t largestSample = 0;
^
./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int32_t smallestSample = (1<<20);
^
In file included from codec_apch.cpp:1:
./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t id = 0;
^
./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t length = 0;
^
./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t duration = 0; //audio often provide a duration for the packet.
^
./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
float chances = 0.0f; //1/chances is the probability to NOT be a match
^
./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
bool keyframe = false;
^
./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t pcm_bytes_per_sample = 0; //sample size.
^
./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
bool pcm = false;
^
./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
bool tmcd_seen = false;
^
13 warnings generated.
In file included from codec_avc1.cpp:1:
In file included from ./codec.h:7:
./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int fixed_size = 0; //zero we don't know
^
./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int64_t fixed_begin64 = 0;
^
./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int32_t fixed_begin32 = 0;
^
./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int32_t largestSample = 0;
^
./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int32_t smallestSample = (1<<20);
^
In file included from codec_avc1.cpp:1:
./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t id = 0;
^
./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t length = 0;
^
./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t duration = 0; //audio often provide a duration for the packet.
^
./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
float chances = 0.0f; //1/chances is the probability to NOT be a match
^
./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
bool keyframe = false;
^
./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t pcm_bytes_per_sample = 0; //sample size.
^
./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
bool pcm = false;
^
./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
bool tmcd_seen = false;
^
13 warnings generated.
In file included from codec_fdsc.cpp:1:
In file included from ./codec.h:7:
./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int fixed_size = 0; //zero we don't know
^
./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int64_t fixed_begin64 = 0;
^
./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int32_t fixed_begin32 = 0;
^
./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int32_t largestSample = 0;
^
./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int32_t smallestSample = (1<<20);
^
In file included from codec_fdsc.cpp:1:
./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t id = 0;
^
./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t length = 0;
^
./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t duration = 0; //audio often provide a duration for the packet.
^
./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
float chances = 0.0f; //1/chances is the probability to NOT be a match
^
./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
bool keyframe = false;
^
./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t pcm_bytes_per_sample = 0; //sample size.
^
./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
bool pcm = false;
^
./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
bool tmcd_seen = false;
^
13 warnings generated.
In file included from codec_gpmd.cpp:1:
In file included from ./codec.h:7:
./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int fixed_size = 0; //zero we don't know
^
./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int64_t fixed_begin64 = 0;
^
./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int32_t fixed_begin32 = 0;
^
./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int32_t largestSample = 0;
^
./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
int32_t smallestSample = (1<<20);
^
In file included from codec_gpmd.cpp:1:
./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t id = 0;
^
./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t length = 0;
^
./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t duration = 0; //audio often provide a duration for the packet.
^
./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
float chances = 0.0f; //1/chances is the probability to NOT be a match
^
./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
bool keyframe = false;
^
./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
uint32_t pcm_bytes_per_sample = 0; //sample size.
^
./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
bool pcm = false;
^
./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
bool tmcd_seen = false;
^
codec_gpmd.cpp:9:14: error: non-aggregate type 'setstd::__1::string' (aka 'set<basic_string<char, char_traits
define attribute_deprecated attribute((deprecated))
^
codec_mp4a.cpp:52:21: warning: 'avcodec_decode_audio4' is deprecated [-Wdeprecated-declarations] int consumed2 = avcodec_decode_audio4(context, frame, &got_frame, &avp); ^ ./libav-12.3/libavcodec/avcodec.h:4150:1: note: 'avcodec_decode_audio4' has been explicitly marked deprecated here attribute_deprecated ^ ./libav-12.3/libavutil/attributes.h:76:49: note: expanded from macro 'attribute_deprecated'
define attribute_deprecated attribute((deprecated))
^
16 warnings generated. In file included from codec_mp4v.cpp:1: In file included from ./codec.h:7: ./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int fixed_size = 0; //zero we don't know ^ ./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int64_t fixed_begin64 = 0; ^ ./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t fixed_begin32 = 0; ^ ./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t largestSample = 0; ^ ./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t smallestSample = (1<<20); ^ In file included from codec_mp4v.cpp:1: ./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t id = 0; ^ ./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t length = 0; ^ ./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t duration = 0; //audio often provide a duration for the packet. ^ ./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] float chances = 0.0f; //1/chances is the probability to NOT be a match ^ ./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool keyframe = false; ^ ./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t pcm_bytes_per_sample = 0; //sample size. ^ ./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool pcm = false; ^ ./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool tmcd_seen = false; ^ codec_mp4v.cpp:37:17: warning: empty parentheses interpreted as a function declaration [-Wvexing-parse] AvLog useAvLog(); ^~ codec_mp4v.cpp:37:17: note: remove parentheses to declare a variable AvLog useAvLog(); ^~ codec_mp4v.cpp:47:14: warning: 'avcodec_decode_video2' is deprecated [-Wdeprecated-declarations] consumed = avcodec_decode_video2(context, frame, &got_frame, packet); ^ ./libav-12.3/libavcodec/avcodec.h:4199:1: note: 'avcodec_decode_video2' has been explicitly marked deprecated here attribute_deprecated ^ ./libav-12.3/libavutil/attributes.h:76:49: note: expanded from macro 'attribute_deprecated'
define attribute_deprecated attribute((deprecated))
^
15 warnings generated. In file included from codec_pcm.cpp:1: In file included from ./codec.h:7: ./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int fixed_size = 0; //zero we don't know ^ ./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int64_t fixed_begin64 = 0; ^ ./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t fixed_begin32 = 0; ^ ./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t largestSample = 0; ^ ./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t smallestSample = (1<<20); ^ In file included from codec_pcm.cpp:1: ./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t id = 0; ^ ./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t length = 0; ^ ./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t duration = 0; //audio often provide a duration for the packet. ^ ./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] float chances = 0.0f; //1/chances is the probability to NOT be a match ^ ./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool keyframe = false; ^ ./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t pcm_bytes_per_sample = 0; //sample size. ^ ./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool pcm = false; ^ ./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool tmcd_seen = false; ^ 13 warnings generated. In file included from codec_rtp.cpp:1: In file included from ./codec.h:7: ./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int fixed_size = 0; //zero we don't know ^ ./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int64_t fixed_begin64 = 0; ^ ./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t fixed_begin32 = 0; ^ ./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t largestSample = 0; ^ ./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t smallestSample = (1<<20); ^ In file included from codec_rtp.cpp:1: ./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t id = 0; ^ ./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t length = 0; ^ ./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t duration = 0; //audio often provide a duration for the packet. ^ ./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] float chances = 0.0f; //1/chances is the probability to NOT be a match ^ ./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool keyframe = false; ^ ./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t pcm_bytes_per_sample = 0; //sample size. ^ ./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool pcm = false; ^ ./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool tmcd_seen = false; ^ 13 warnings generated. In file included from codec_text.cpp:1: In file included from ./codec.h:7: ./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int fixed_size = 0; //zero we don't know ^ ./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int64_t fixed_begin64 = 0; ^ ./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t fixed_begin32 = 0; ^ ./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t largestSample = 0; ^ ./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t smallestSample = (1<<20); ^ In file included from codec_text.cpp:1: ./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t id = 0; ^ ./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t length = 0; ^ ./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t duration = 0; //audio often provide a duration for the packet. ^ ./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] float chances = 0.0f; //1/chances is the probability to NOT be a match ^ ./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool keyframe = false; ^ ./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t pcm_bytes_per_sample = 0; //sample size. ^ ./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool pcm = false; ^ ./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool tmcd_seen = false; ^ 13 warnings generated. In file included from codec_tmcd.cpp:1: In file included from ./codec.h:7: ./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int fixed_size = 0; //zero we don't know ^ ./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int64_t fixed_begin64 = 0; ^ ./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t fixed_begin32 = 0; ^ ./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t largestSample = 0; ^ ./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t smallestSample = (1<<20); ^ In file included from codec_tmcd.cpp:1: ./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t id = 0; ^ ./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t length = 0; ^ ./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t duration = 0; //audio often provide a duration for the packet. ^ ./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] float chances = 0.0f; //1/chances is the probability to NOT be a match ^ ./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool keyframe = false; ^ ./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t pcm_bytes_per_sample = 0; //sample size. ^ ./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool pcm = false; ^ ./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool tmcd_seen = false; ^ 13 warnings generated. In file included from codec_unknown.cpp:1: In file included from ./codec.h:7: ./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int fixed_size = 0; //zero we don't know ^ ./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int64_t fixed_begin64 = 0; ^ ./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t fixed_begin32 = 0; ^ ./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t largestSample = 0; ^ ./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t smallestSample = (1<<20); ^ In file included from codec_unknown.cpp:1: ./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t id = 0; ^ ./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t length = 0; ^ ./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t duration = 0; //audio often provide a duration for the packet. ^ ./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] float chances = 0.0f; //1/chances is the probability to NOT be a match ^ ./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool keyframe = false; ^ ./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t pcm_bytes_per_sample = 0; //sample size. ^ ./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool pcm = false; ^ ./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool tmcd_seen = false; ^ 13 warnings generated. In file included from codecstats.cpp:1: ./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int fixed_size = 0; //zero we don't know ^ ./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int64_t fixed_begin64 = 0; ^ ./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t fixed_begin32 = 0; ^ ./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t largestSample = 0; ^ ./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t smallestSample = (1<<20); ^ In file included from codecstats.cpp:2: In file included from ./track.h:30: ./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t id = 0; ^ ./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t length = 0; ^ ./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t duration = 0; //audio often provide a duration for the packet. ^ ./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] float chances = 0.0f; //1/chances is the probability to NOT be a match ^ ./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool keyframe = false; ^ ./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t pcm_bytes_per_sample = 0; //sample size. ^ ./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool pcm = false; ^ ./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool tmcd_seen = false; ^ In file included from codecstats.cpp:2: ./track.h:42:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool hint_track = false; ^ ./track.h:43:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t hinted_id = -1; ^ ./track.h:46:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int default_time = 0; ^ ./track.h:51:29: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int default_chunk_nsamples = 0; ^ ./track.h:52:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int default_size = 0; //default SAMPLE size ^ ./track.h:65:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint64_t offset = 0; ^ ./track.h:66:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t size = 0; ^ ./track.h:67:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t nsamples = 0; ^ ./track.h:68:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t first_sample = 0; ^ In file included from codecstats.cpp:4: ./atom.h:44:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool length64 = false; ^ codecstats.cpp:32:3: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] auto &c = chunks[i]; ^ codecstats.cpp:52:25: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(Track::Chunk &chunk: track.chunks) { ^ codecstats.cpp:66:42: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] begin32 = readBE<int32_t>(start + 4) && 0x0000ffff; ^ ~~~~~~~~~~ codecstats.cpp:66:42: note: use '&' for a bitwise operation begin32 = readBE<int32_t>(start + 4) && 0x0000ffff; ^~ & codecstats.cpp:66:42: note: remove constant to silence this warning begin32 = readBE<int32_t>(start + 4) && 0x0000ffff; ~^~~~~~~~~~~~~ codecstats.cpp:91:6: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions] for(auto &c: beginnings64) { ^ codecstats.cpp:91:13: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(auto &c: beginnings64) { ^ 28 warnings generated. In file included from codec.cpp:1: In file included from ./codec.h:7: ./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int fixed_size = 0; //zero we don't know ^ ./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int64_t fixed_begin64 = 0; ^ ./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t fixed_begin32 = 0; ^ ./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t largestSample = 0; ^ ./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t smallestSample = (1<<20); ^ In file included from codec.cpp:1: ./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t id = 0; ^ ./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t length = 0; ^ ./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t duration = 0; //audio often provide a duration for the packet. ^ ./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] float chances = 0.0f; //1/chances is the probability to NOT be a match ^ ./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool keyframe = false; ^ ./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t pcm_bytes_per_sample = 0; //sample size. ^ ./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool pcm = false; ^ ./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool tmcd_seen = false; ^ In file included from codec.cpp:2: ./atom.h:44:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool length64 = false; ^ 14 warnings generated. In file included from mp4.cpp:50: In file included from ./mp4.h:28: In file included from ./track.h:30: In file included from ./codec.h:7: ./codecstats.h:16:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int fixed_size = 0; //zero we don't know ^ ./codecstats.h:18:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int64_t fixed_begin64 = 0; ^ ./codecstats.h:19:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t fixed_begin32 = 0; ^ ./codecstats.h:20:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t largestSample = 0; ^ ./codecstats.h:21:25: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t smallestSample = (1<<20); ^ In file included from mp4.cpp:50: In file included from ./mp4.h:28: In file included from ./track.h:30: ./codec.h:19:14: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t id = 0; ^ ./codec.h:20:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t length = 0; ^ ./codec.h:21:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t duration = 0; //audio often provide a duration for the packet. ^ ./codec.h:22:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] float chances = 0.0f; //1/chances is the probability to NOT be a match ^ ./codec.h:23:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool keyframe = false; ^ ./codec.h:39:32: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint32_t pcm_bytes_per_sample = 0; //sample size. ^ ./codec.h:40:11: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool pcm = false; ^ ./codec.h:41:17: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool tmcd_seen = false; ^ In file included from mp4.cpp:50: In file included from ./mp4.h:28: ./track.h:42:18: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool hint_track = false; ^ ./track.h:43:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t hinted_id = -1; ^ ./track.h:46:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int default_time = 0; ^ ./track.h:51:29: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int default_chunk_nsamples = 0; ^ ./track.h:52:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int default_size = 0; //default SAMPLE size ^ ./track.h:65:19: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] uint64_t offset = 0; ^ ./track.h:66:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t size = 0; ^ ./track.h:67:20: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t nsamples = 0; ^ ./track.h:68:24: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] int32_t first_sample = 0; ^ In file included from mp4.cpp:51: ./atom.h:44:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions] bool length64 = false; ^ mp4.cpp:221:17: warning: empty parentheses interpreted as a function declaration [-Wvexing-parse] AvLog useAvLog(); ^~ mp4.cpp:221:17: note: remove parentheses to declare a variable AvLog useAvLog(); ^~ mp4.cpp:552:27: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(Track::Chunk &chunk: track.chunks) { ^ mp4.cpp:672:44: error: expected expression std::sort(packets.begin(), packets.end(), [](const Match &m1, const Match &m2) { return m1.offset < m2.offset; }); ^ mp4.cpp:688:14: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(Match &m: packets) { ^ mp4.cpp:703:14: warning: range-based for loop is a C++11 extension [-Wc++11-extensions] for(Match m: matches) { ^ mp4.cpp:755:35: error: expected expression sort(group.begin(), group.end(), [](const Match &m1, const Match &m2) { return m1.chances > m2.chances; }); ^ mp4.cpp:777:46: warning: 'codec' is deprecated [-Wdeprecated-declarations] track.codec.context = context->streams[i]->codec; ^ ./libav-12.3/libavformat/avformat.h:711:5: note: 'codec' has been explicitly marked deprecated here attribute_deprecated ^ ./libav-12.3/libavutil/attributes.h:76:49: note: expanded from macro 'attribute_deprecated'
define attribute_deprecated attribute((deprecated))
^
mp4.cpp:825:18: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for(Track &track: tracks) {
^
mp4.cpp:826:26: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for(Track::Chunk &chunk: track.chunks) {
^
mp4.cpp:872:20: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for(Track &track: tracks) {
^
mp4.cpp:936:18: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for(Track &track: tracks) {
^
mp4.cpp:1115:12: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
if(begin && 0xff00ffff) { // && readBE<uint16_t>(start);
^ ~~~~~~~~~~
mp4.cpp:1115:12: note: use '&' for a bitwise operation
if(begin && 0xff00ffff) { // && readBE<uint16_t>(start);
^~
&
mp4.cpp:1115:12: note: remove constant to silence this warning
if(begin && 0xff00ffff) { // && readBE<uint16_t>(start);
~^~~~~~~~~~~~~
mp4.cpp:1257:23: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for(MatchGroup &group: matches) {
^
mp4.cpp:1298:19: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for(Track &track: tracks) {
^
mp4.cpp:1307:9: warning: 'auto' type specifier is a C++11 extension [-Wc++11-extensions]
for(auto &t: track.times)
^
mp4.cpp:1307:16: warning: range-based for loop is a C++11 extension [-Wc++11-extensions]
for(auto &t: track.times)
^
In file included from mp4.cpp:23:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/vector:274:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__bit_reference:15:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:715:71: error: invalid operands to binary expression ('const Match' and 'const Match')
bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
~~~ ^ ~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:3944:17: note: in instantiation of member function
'std::__1::__less<Match, Match>::operator()' requested here
if (__comp(*--__last, *__first))
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4125:12: note: in instantiation of function template specialization
'std::__1::__sort<std::__1::__less<Match, Match> &, Match *>' requested here
_VSTD::__sort<_Comp_ref>(__first, __last, _Comp_ref(__comp));
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4133:12: note: in instantiation of function template specialization
'std::__1::sort<Match *, std::__1::__less<Match, Match> >' requested here
_VSTD::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:4149:12: note: in instantiation of function template specialization
'std::__1::sort<Match *>' requested here
_VSTD::sort(__first.base(), __last.base());
^
mp4.cpp:1157:3: note: in instantiation of function template specialization 'std::__1::sort<Match>' requested here
sort(group.begin(), group.end());
^
./codec.h:24:7: note: candidate function not viable: 'this' argument has type 'const Match', but method is not marked const
bool operator<(const Match &b) { return chances < b.chances; }
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/utility:592:1: note: candidate template ignored: could not match
'pair<type-parameter-0-0, type-parameter-0-1>' against 'const Match'
operator< (const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iterator:815:1: note: candidate template ignored: could not match
'reverse_iterator
Same here :(
Mac OS 11.2.3
Is it possible the command line needs this option: -std=c++11
? (can't really test on Mac...)
I tried this per @ponchio 's suggestion, and the documentation, but got 16 similar errors, refering to __sort3 etc.:
g++ -o untrunc -I./libav file.cpp main.cpp track.cpp atom.cpp codec_*.cpp codecstats.cpp codec.cpp mp4.cpp log.cpp -L./libav/libavformat -lavformat -L./libav/libavcodec -lavcodec -L./libav/libavresample -lavresample -L./libav/libavutil -lavutil -lpthread -lz -framework CoreFoundation -framework CoreVideo -framework VideoDecodeAcceleration -std=c++11
Here's a gist of the result.
Most probably the lessthan operator for ChunkTime needed to be marked const. I have committed the change.
@ponchio, much fewer errors this time! Here's the gist of the current result for me running:
g++ -o untrunc -I./libav file.cpp main.cpp track.cpp atom.cpp codec_*.cpp codecstats.cpp codec.cpp mp4.cpp log.cpp -L./libav/libavformat -lavformat -L./libav/libavcodec -lavcodec -L./libav/libavresample -lavresample -L./libav/libavutil -lavutil -lpthread -lz -framework CoreFoundation -framework CoreVideo -framework VideoDecodeAcceleration -std=c++11
(Mac OS 10.14.6, Xcode 11.3)
It looks like I made the same mistake twice...
The last update got rid of the errors for me! Thanks!
Processing a video resulted in a file with no video and static for audio, but that's probably a separate issue.