Android - ffmpeg tentando incluir o suporte agg / vorbis

0

Eu tentei adicionar suporte libogg / libvorbis / libmp3lame ao ffmpeg compilado para Android. Para libogg eu usei:

 LINKER_LIBS="$LINKER_LIBS -logg"
    cd libogg 
    autoreconf -ivf
    export PKG_CONFIG_LIBDIR=$(pwd)/$PREFIX/lib/pkgconfig/
    export PKG_CONFIG_PATH=$(pwd)/$PREFIX/lib/pkgconfig/
    ./configure \
        --prefix=$(pwd)/$PREFIX \
        --host=$HOST \
        --disable-shared \
        --enable-static \
        --with-pic \
        || exit 1
    make clean || exit 1
    make -j${JOBS} install || exit 1
    cd ..

Para libvorbis eu usei:

    LINKER_LIBS="$LINKER_LIBS -logg -lvorbis -lvorbisenc -lvorbisfile"
    cd vorbis
    ADDITIONAL_CONFIGURE_FLAG="$ADDITIONAL_CONFIGURE_FLAG --enable-libvorbis"
#    autoreconf -ivf
    ./autogen.sh
    export PKG_CONFIG_LIBDIR=$(pwd)/$PREFIX/lib/pkgconfig/
    export PKG_CONFIG_PATH=$(pwd)/$PREFIX/lib/pkgconfig/
    ./configure \
        --prefix=$(pwd)/$PREFIX \
        --host=$HOST \
        --disable-shared \
        --enable-static \
    --with-OGG=yes \
        --with-pic \
        $ADDITIONAL_CONFIGURE_FLAG \
        || exit 1
    make clean || exit 1
    make -j${JOBS} install || exit 1
    cd ..

Para o libmp3lame, usei:

LINKER_LIBS="$LINKER_LIBS -lmp3lame"
cd lame
ADDITIONAL_CONFIGURE_FLAG="$ADDITIONAL_CONFIGURE_FLAG --enable-libmp3lame"
export PKG_CONFIG_LIBDIR=$(pwd)/$PREFIX/lib/pkgconfig/
export PKG_CONFIG_PATH=$(pwd)/$PREFIX/lib/pkgconfig/
./configure \
    --prefix=$(pwd)/$PREFIX \
    --host=$HOST \
    --disable-shared \
    --enable-static \
--with-VORBIS=yes \
    --with-pic \
    $ADDITIONAL_CONFIGURE_FLAG \
    || exit 1
make clean || exit 1
make -j${JOBS} install || exit 1
cd ..

E finalmente para o ffmpeg eu usei:

LINKER_LIBS="$LINKER_LIBS -lavcodec -lavformat -lavresample -lavutil -lswresample -lswscale"
PKG_CONFIG=${CROSS_COMPILE}pkg-config
if [ ! -f $PKG_CONFIG ];
then
    cat > $PKG_CONFIG << EOF
#!/bin/bash

pkg-config \$*
EOF
        chmod u+x $PKG_CONFIG
    fi
    cd ffmpeg
    export PKG_CONFIG_LIBDIR=$(pwd)/$PREFIX/lib/pkgconfig/
    export PKG_CONFIG_PATH=$(pwd)/$PREFIX/lib/pkgconfig/
    ./configure --target-os=linux \
        --prefix=$PREFIX \
        --enable-cross-compile \
        --arch=$ARCH \
        --cc=$CC \
        --cross-prefix=$CROSS_COMPILE \
        --nm=$NM \
        --sysroot=$SYSROOT \
        --extra-libs=$LIBGCC_LINK \
        --extra-cflags=" -O3 -DANDROID -fpic -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums  -fno-strict-aliasing -finline-limit=300 -I$PREFIX/include $OPTIMIZE_CFLAGS" \
        --disable-shared \
        --enable-static \
        --enable-runtime-cpudetect \
        --extra-ldflags="-Wl,-rpath-link=$SYSROOT/usr/lib -L$SYSROOT/usr/lib  -nostdlib -lc -lm -ldl -llog -L$PREFIX/lib" \
        --enable-bsfs \
        --enable-decoders \
        --enable-encoders \
        --enable-parsers \
        --enable-hwaccels \
        --enable-muxers \
        --enable-avformat \
        --enable-avcodec \
        --enable-avresample \
    --enable-libvorbis \
        --enable-zlib \
    --enable-libmp3lame \
        --disable-doc \
        --disable-ffplay \
        --disable-ffmpeg \
        --disable-ffplay \
        --disable-ffprobe \
        --disable-ffserver \
        --disable-avfilter \
        --disable-avdevice \
        --enable-nonfree \
        --enable-version3 \
    --disable-stripping \
    --disable-linux-perf \
        --enable-asm \
        $ADDITIONAL_CONFIGURE_FLAG \
        || exit 1
    make clean || exit 1
    make -j${JOBS} install || exit 1
    cd ..

Mas ao tentar criá-lo, eu tenho no ffbuild / config.log:

../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function _vorbis_pack_comment: error: undefined reference to 'oggpack_write'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function _vorbis_pack_comment: error: undefined reference to 'oggpack_write'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function _vorbis_pack_comment: error: undefined reference to 'oggpack_write'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function _vorbis_pack_comment: error: undefined reference to 'oggpack_write'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_idheader: error: undefined reference to 'oggpack_readinit'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_idheader: error: undefined reference to 'oggpack_read'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_idheader: error: undefined reference to 'oggpack_read'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_headerin: error: undefined reference to 'oggpack_readinit'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_headerin: error: undefined reference to 'oggpack_read'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_headerin: error: undefined reference to 'oggpack_read'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_headerin: error: undefined reference to 'oggpack_bytes'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_synthesis_headerin: error: undefined reference to 'oggpack_bytes'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_commentheader_out: error: undefined reference to 'oggpack_writeinit'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_commentheader_out: error: undefined reference to 'oggpack_bytes'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_commentheader_out: error: undefined reference to 'oggpack_bytes'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_commentheader_out: error: undefined reference to 'oggpack_writeclear'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_commentheader_out: error: undefined reference to 'oggpack_writeclear'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_analysis_headerout: error: undefined reference to 'oggpack_writeinit'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_analysis_headerout: error: undefined reference to 'oggpack_reset'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_analysis_headerout: error: undefined reference to 'oggpack_reset'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_analysis_headerout: error: undefined reference to 'oggpack_writeclear'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(info.o):info.c:function vorbis_analysis_headerout: error: undefined reference to 'oggpack_writeclear'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decode: error: undefined reference to 'oggpack_look'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decode: error: undefined reference to 'oggpack_look'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decode: error: undefined reference to 'oggpack_adv'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decode: error: undefined reference to 'oggpack_adv'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decode: error: undefined reference to 'oggpack_adv'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decodevs_add: error: undefined reference to 'oggpack_look'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decodevs_add: error: undefined reference to 'oggpack_look'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(codebook.o):codebook.c:function vorbis_book_decodevs_add: error: undefined reference to 'oggpack_adv'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(bitrate.o):bitrate.c:function vorbis_bitrate_addblock: error: undefined reference to 'oggpack_writetrunc'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(bitrate.o):bitrate.c:function vorbis_bitrate_flushpacket: error: undefined reference to 'oggpack_get_buffer'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(block.o):block.c:function vorbis_block_init: error: undefined reference to 'oggpack_writeinit'
../../VPlayer_library/jni/ffmpeg-build/armeabi-v7a/lib/libvorbis.a(block.o):block.c:function vorbis_block_init: error: undefined reference to 'oggpack_writeinit'
collect2: error: ld returned 1 exit status
ERROR: vorbis not found using pkg-config

Parece que a libogg não foi encontrada. Mas existe perto de todas as outras bibliotecas no diretório armeabi-v7a / lib. Eu tentei colocar -log em todos os lugares: na construção de libvorbis, libmp3lame, ffmpeg, mas sem sucesso.

Alguma dica? Obrigado.

    
por Mihaela 26.02.2018 / 14:45

0 respostas