aos-AVP icon indicating copy to clipboard operation
aos-AVP copied to clipboard

avos does not compile with latest ffmpeg 5.0

Open courville opened this issue 2 years ago • 5 comments

make[2]: Entering directory '/Users/marc/Documents/git/nova6/native/avos'
[armeabi-v7a] Compile arm    : avos <= codec_mediacodec_audio.c
jni/../Source/codec_mediacodec_audio.c:47:2: error: must use 'struct' tag to refer to type 'AVCodecParserContext'
        AVCodecParserContext *aparser;
        ^
        struct 
jni/../Source/codec_mediacodec_audio.c:48:2: error: must use 'struct' tag to refer to type 'AVCodecContext'
        AVCodecContext avctx;
        ^
        struct 
jni/../Source/codec_mediacodec_audio.c:48:17: error: field has incomplete type 'struct AVCodecContext'
        AVCodecContext avctx;
                       ^
jni/../../ffmpeg-android-builder/dist-full-armeabi-v7a/include/libavcodec/codec.h:195:8: note: forward declaration of 'struct AVCodecContext'
struct AVCodecContext;
       ^
jni/../Source/codec_mediacodec_audio.c:73:2: error: implicit declaration of function 'av_register_all' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        av_register_all();
        ^
jni/../Source/codec_mediacodec_audio.c:84:15: error: implicit declaration of function 'av_parser_init' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        p->aparser = av_parser_init( codecid );
                     ^
jni/../Source/codec_mediacodec_audio.c:84:13: error: incompatible integer to pointer conversion assigning to 'struct AVCodecParserContext *' from 'int' [-Werror,-Wint-conversion]
        p->aparser = av_parser_init( codecid );
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
jni/../Source/codec_mediacodec_audio.c:130:3: error: implicit declaration of function 'av_parser_close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                av_parser_close( p->aparser );
                ^
jni/../Source/codec_mediacodec_audio.c:130:3: note: did you mean 'av_packet_clone'?
jni/../../ffmpeg-android-builder/dist-full-armeabi-v7a/include/libavcodec/packet.h:479:11: note: 'av_packet_clone' declared here
AVPacket *av_packet_clone(const AVPacket *src);
          ^
7 errors generated.
make[2]: *** [/opt/android-sdk/ndk/23.1.7779620/build/core/build-binary.mk:476: obj/local/armeabi-v7a/objs/avos/Source/codec_mediacodec_audio.o] Error 1
make[2]: Leaving directory '/Users/marc/Documents/git/nova6/native/avos'

courville avatar Mar 19 '22 18:03 courville

Would it be better for this project in the long run if you dropped 5.0 in favor of mpv which already works on Android apps?

https://github.com/mpv-android/mpv-android

Pentaphon avatar Mar 20 '22 09:03 Pentaphon

mpv is based also on ffmpeg. Let's fix avos (nova) first and see what we do in the future. mpv is a good option indeed.

courville avatar Mar 20 '22 21:03 courville

mpv is based also on ffmpeg. Let's fix avos (nova) first and see what we do in the future. mpv is a good option indeed.

I'm aware its based on ffmpeg. I was just trying to save your project some work since MPV is already quite Android-friendly and you may find more dev help and community support by switching to mpv. The ffmpeg community isn't as focused on playback as the mpv community is, and that's all you need from an ffmpeg-based solution in the first place. I'll keep my mouth shut in this thread now but I wanted to make sure mpv was mentioned in case 5.0 is harder to implement than expected. Thanks for listening to my suggestion.

Pentaphon avatar Mar 20 '22 22:03 Pentaphon

Deprecated see http://ffmpeg.org/pipermail/ffmpeg-devel/2018-February/225051.html and https://github.com/leandromoreira/ffmpeg-libav-tutorial/issues/29#issuecomment-404939213 and https://stackoverflow.com/questions/57177855/how-to-fix-these-errors

courville avatar Mar 22 '22 12:03 courville

Courville, kinda off topic, but why don't you merge this one in the code and collaborate with him? https://github.com/moneytoo/Player

rahaaatul avatar Mar 27 '22 02:03 rahaaatul

@rahaaatul I could indeed and it crossed my mind too.

courville avatar Jan 08 '23 18:01 courville

@courville there is also Findroid which is currently using Exoplayer and MPV that you could look at for inspiration for future versions of Nova?

https://github.com/jarnedemeulemeester/findroid

Is 6.0 also giving you issues?

Pentaphon avatar Sep 14 '23 21:09 Pentaphon