dr_meter
dr_meter copied to clipboard
Can't build dr_meter
Hi there, I tried to build dr_meter and got the following error. I am using Debian Wheezy and libavformat-dev 6:11-1.
cc -O3 -ggdb -std=c99 -Wall -Wextra -Werror -c -o main.o main.c
main.c: In function ‘sc_open’:
main.c:64:2: error: implicit declaration of function ‘av_find_stream_info’ [-Werror=implicit-function-declaration]
err = av_find_stream_info(self->format_ctx);
^
main.c: In function ‘sc_close’:
main.c:80:3: error: implicit declaration of function ‘av_close_input_stream’ [-Werror=implicit-function-declaration]
av_close_input_stream(self->format_ctx);
^
main.c: In function ‘sc_start_stream’:
main.c:98:20: error: ‘AVCODEC_MAX_AUDIO_FRAME_SIZE’ undeclared (first use in this function)
size_t buf_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
^
main.c:98:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:112:2: error: implicit declaration of function ‘avcodec_open’ [-Werror=implicit-function-declaration]
return avcodec_open(ctx, codec);
^
main.c: In function ‘sc_get_next_frame’:
main.c:126:3: error: implicit declaration of function ‘url_feof’ [-Werror=implicit-function-declaration]
if (err == AVERROR_EOF || url_feof(self->format_ctx->pb)) {
^
main.c:152:2: error: implicit declaration of function ‘avcodec_decode_audio3’ [-Werror=implicit-function-declaration]
err = avcodec_decode_audio3(codec_ctx, self->buf, &buf_size, &self->pkt);
^
main.c: In function ‘do_calculate_dr’:
main.c:459:7: error: format ‘%i’ expects argument of type ‘int’, but argument 4 has type ‘size_t’ [-Werror=format=]
(fragment * 3) % 60);
^
main.c:459:7: error: format ‘%i’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Werror=format=]
cc1: all warnings being treated as errors
<builtin>: recipe for target 'main.o' failed
make: *** [main.o] Error 1
Regards, scus
Same in 2018
I downloaded all branches of libav from https://libav.org/download/#git and tried building magiacl and adibol forks with each of the libav version (0.8.21, 9.21, 11,12, 12,3, snapshot). None of them seem to be compatible! The least amount of errors is with magical fork and libav-12,3 / libav-snapshot
Could you, please, add a link to the version of libav that you are using?
I managed to build it after making some fixes. See https://github.com/adiblol/dr_meter/pull/5.