我想为 Http Live Stream 制作 m3u8-segmenter:https ://github.com/johnf/m3u8-segmenter
我做的时候有错误,错误是:
gcc -g -O -Wall -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wcast-qual -Wnested-externs -Wshadow -Wbad-function-cast -Wwrite-strings -Werror m3u8-segmenter.c -o m3u8-segmenter -lavformat -lavcodec -lavutil
m3u8-segmenter.c: In function ‘add_output_stream’:
m3u8-segmenter.c:82:14: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
m3u8-segmenter.c:82:14: note: each undeclared identifier is reported only once for each function it appears in
m3u8-segmenter.c:94:14: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
m3u8-segmenter.c: In function ‘main’:
m3u8-segmenter.c:338:5: error: ‘av_open_input_file’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1090) [-Werror=deprecated-declarations]
m3u8-segmenter.c:352:5: error: implicit declaration of function ‘guess_format’ [-Werror=implicit-function-declaration]
m3u8-segmenter.c:352:5: error: nested extern declaration of ‘guess_format’ [-Werror=nested-externs]
m3u8-segmenter.c:352:10: error: assignment makes pointer from integer without a cast [-Werror]
m3u8-segmenter.c:371:18: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
m3u8-segmenter.c:376:18: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
m3u8-segmenter.c:387:5: error: ‘av_set_parameters’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1434) [-Werror=deprecated-declarations]
m3u8-segmenter.c:392:5: error: ‘dump_format’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1559) [-Werror=deprecated-declarations]
m3u8-segmenter.c:406:5: error: ‘url_fopen’ is deprecated (declared at /usr/local/include/libavformat/avio.h:279) [-Werror=deprecated-declarations]
m3u8-segmenter.c:411:5: error: ‘av_write_header’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1492) [-Werror=deprecated-declarations]
m3u8-segmenter.c:444:67: error: ‘PKT_FLAG_KEY’ undeclared (first use in this function)
m3u8-segmenter.c:455:13: error: ‘put_flush_packet’ is deprecated (declared at /usr/local/include/libavformat/avio.h:293) [-Werror=deprecated-declarations]
m3u8-segmenter.c:456:13: error: ‘url_fclose’ is deprecated (declared at /usr/local/include/libavformat/avio.h:280) [-Werror=deprecated-declarations]
m3u8-segmenter.c:476:13: error: ‘url_fopen’ is deprecated (declared at /usr/local/include/libavformat/avio.h:279) [-Werror=deprecated-declarations]
m3u8-segmenter.c:482:13: error: ‘av_write_header’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1492) [-Werror=deprecated-declarations]
m3u8-segmenter.c:514:5: error: ‘url_fclose’ is deprecated (declared at /usr/local/include/libavformat/avio.h:280) [-Werror=deprecated-declarations]
cc1: all warnings being treated as errors
make: *** [all] Error 1