composite-video-simulator
composite-video-simulator copied to clipboard
I can't compile on MinGW
Can you help?
I can't compile on MinGW. I'm using MinGW64.
May be a problem with AVStream being deprecated.
$ make
make all-recursive
make[1]: Entering directory '/c/Users/RGM/Documents/ForkProjects/FFMPEG_Composite'
make[2]: Entering directory '/c/Users/RGM/Documents/ForkProjects/FFMPEG_Composite'
g++ -DHAVE_CONFIG_H -I. -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include -IC:/msys64/mingw64/include -g -O2 -MT normalize_ts-normalize_ts.o -MD -MP -MF .deps/normalize_ts-normalize_ts.Tpo -c -o normalize_ts-normalize_ts.o `test -f 'normalize_ts.cpp' || echo './'`normalize_ts.cpp
normalize_ts.cpp: In function 'int main(int, char**)':
normalize_ts.cpp:139:20: warning: 'void av_register_all()' is deprecated [-Wdeprecated-declarations]
139 | av_register_all();
| ~~~~~~~~~~~~~~~^~
In file included from normalize_ts.cpp:41:
C:/msys64/mingw64/include/libavformat/avformat.h:1955:6: note: declared here
1955 | void av_register_all(void);
| ^~~~~~~~~~~~~~~
normalize_ts.cpp:224:28: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
224 | if (in_stream->codec == NULL) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:224:28: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
224 | if (in_stream->codec == NULL) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:224:28: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
224 | if (in_stream->codec == NULL) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:225:30: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
225 | if (!(in_stream->codec->codec_type == AVMEDIA_TYPE_AUDIO || in_stream->codec->codec_type == AVMEDIA_TYPE_VIDEO)) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:225:30: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
225 | if (!(in_stream->codec->codec_type == AVMEDIA_TYPE_AUDIO || in_stream->codec->codec_type == AVMEDIA_TYPE_VIDEO)) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:225:30: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
225 | if (!(in_stream->codec->codec_type == AVMEDIA_TYPE_AUDIO || in_stream->codec->codec_type == AVMEDIA_TYPE_VIDEO)) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:225:84: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
225 | if (!(in_stream->codec->codec_type == AVMEDIA_TYPE_AUDIO || in_stream->codec->codec_type == AVMEDIA_TYPE_VIDEO)) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:225:84: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
225 | if (!(in_stream->codec->codec_type == AVMEDIA_TYPE_AUDIO || in_stream->codec->codec_type == AVMEDIA_TYPE_VIDEO)) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:225:84: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
225 | if (!(in_stream->codec->codec_type == AVMEDIA_TYPE_AUDIO || in_stream->codec->codec_type == AVMEDIA_TYPE_VIDEO)) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:246:77: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
246 | AVStream *out_stream = avformat_new_stream(ofmt_ctx, in_stream->codec->codec);
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:246:77: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
246 | AVStream *out_stream = avformat_new_stream(ofmt_ctx, in_stream->codec->codec);
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:246:77: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
246 | AVStream *out_stream = avformat_new_stream(ofmt_ctx, in_stream->codec->codec);
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:253:52: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
253 | ret = avcodec_copy_context(out_stream->codec, in_stream->codec);
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:253:52: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
253 | ret = avcodec_copy_context(out_stream->codec, in_stream->codec);
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:253:52: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
253 | ret = avcodec_copy_context(out_stream->codec, in_stream->codec);
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:253:70: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
253 | ret = avcodec_copy_context(out_stream->codec, in_stream->codec);
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:253:70: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
253 | ret = avcodec_copy_context(out_stream->codec, in_stream->codec);
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:253:70: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
253 | ret = avcodec_copy_context(out_stream->codec, in_stream->codec);
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:253:39: warning: 'int avcodec_copy_context(AVCodecContext*, const AVCodecContext*)' is deprecated [-Wdeprecated-declarations]
253 | ret = avcodec_copy_context(out_stream->codec, in_stream->codec);
| ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from C:/msys64/mingw64/include/libavformat/avformat.h:312:
C:/msys64/mingw64/include/libavcodec/avcodec.h:2843:5: note: declared here
2843 | int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
| ^~~~~~~~~~~~~~~~~~~~
normalize_ts.cpp:258:25: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
258 | out_stream->codec->codec_tag = 0;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:258:25: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
258 | out_stream->codec->codec_tag = 0;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:258:25: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
258 | out_stream->codec->codec_tag = 0;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:260:29: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
260 | out_stream->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:260:29: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
260 | out_stream->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:260:29: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
260 | out_stream->codec->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:264:29: error: 'AVStream' {aka 'struct AVStream'} has no member named 'program_num'
264 | out_stream->program_num = out_program->program_num;
| ^~~~~~~~~~~
normalize_ts.cpp:265:29: error: 'AVStream' {aka 'struct AVStream'} has no member named 'pmt_version'
265 | out_stream->pmt_version = out_program->pmt_version;
| ^~~~~~~~~~~
normalize_ts.cpp:276:32: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
276 | if (in_stream->codec == NULL) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:276:32: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
276 | if (in_stream->codec == NULL) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:276:32: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
276 | if (in_stream->codec == NULL) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:278:32: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
278 | if (in_stream->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:278:32: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
278 | if (in_stream->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:278:32: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
278 | if (in_stream->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:289:32: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
289 | if (in_stream->codec == NULL) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:289:32: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
289 | if (in_stream->codec == NULL) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:289:32: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
289 | if (in_stream->codec == NULL) continue;
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:291:32: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
291 | if (in_stream->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:291:32: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
291 | if (in_stream->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:291:32: warning: 'AVStream::codec' is deprecated [-Wdeprecated-declarations]
291 | if (in_stream->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
| ^~~~~
C:/msys64/mingw64/include/libavformat/avformat.h:888:21: note: declared here
888 | AVCodecContext *codec;
| ^~~~~
normalize_ts.cpp:322:16: error: 'SIGHUP' was not declared in this scope
322 | signal(SIGHUP,sigma);
| ^~~~~~
normalize_ts.cpp:323:16: error: 'SIGQUIT' was not declared in this scope
323 | signal(SIGQUIT,sigma);
| ^~~~~~~
make[2]: *** [Makefile:1059: normalize_ts-normalize_ts.o] Error 1
make[2]: Leaving directory '/c/Users/RGM/Documents/ForkProjects/FFMPEG_Composite'
make[1]: *** [Makefile:1079: all-recursive] Error 1
make[1]: Leaving directory '/c/Users/RGM/Documents/ForkProjects/FFMPEG_Composite'
make: *** [Makefile:605: all] Error 2
If you wade through all the warnings, the error is that SIGHUP and SIGQUIT are not defined. Is it able to find signal.h?
Yeah
The normalize_ts part have this on line 35
#include <signal.h>
Also, there are other errors too
normalize_ts.cpp:264:29: error: 'AVStream' {aka 'struct AVStream'} has no member named 'program_num'
264 | out_stream->program_num = out_program->program_num;
| ^~~~~~~~~~~
normalize_ts.cpp:265:29: error: 'AVStream' {aka 'struct AVStream'} has no member named 'pmt_version'
265 | out_stream->pmt_version = out_program->pmt_version;
| ^~~~~~~~~~~
Strange that the include signal is here, but it's not knowing about SIGHUP and SIGQUIT.
I face the same problem, have you solved it?