Opened 5 years ago

Closed 5 years ago

#853 closed defect (invalid)

codec_names.h isn't present but included

Reported by: Alex Owned by:
Priority: important Component: avcodec
Version: 0.9 Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


File: libavcodec/utils.c


const char *avcodec_get_name(enum CodecID id)
    AVCodec *codec;

    switch (id) {
#include "libavcodec/codec_names.h"
    av_log(NULL, AV_LOG_WARNING, "Codec 0x%x is not in the full list.\n", id);
    codec = avcodec_find_decoder(id);
    if (codec)
        return codec->name;
    codec = avcodec_find_encoder(id);
    if (codec)
        return codec->name;
    return "unknown_codec";

File codec_names.h isn't found entire ffmpeg-0.9 folder and subfolders.

My configure options:


./configure --target-os=linux \
--enable-shared \
--arch=armv41 \
--enable-cross-compile \
--cc=$PREBUILT/bin/arm-eabi-gcc \
--cross-prefix=$PREBUILT/bin/arm-eabi- \
--nm=$PREBUILT/bin/arm-eabi-nm \
--extra-cflags="-fPIC -DANDROID" \
--disable-static \
--enable-shared \
--disable-asm \
--disable-yasm \
--enable-neon \
--enable-armv5te \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-encoders \
--disable-devices \
--enable-avfilter \
--disable-network \
--disable-avdevice \
--prefix=./../../out/product/target/A10/system/bin \
--extra-ldflags="-Wl,-T,$PREBUILT/arm-eabi/lib/ldscripts/armelf.x -Wl,\
-rpath-link=./../../prebuilt/ndk/android-ndk-r4/platforms/android-8/arch-arm/usr/lib \
-L./../../prebuilt/ndk/android-ndk-r4/platforms/android-8/arch-arm/usr/lib -nostdlib \
${PREBUILT}/lib/gcc/arm-eabi/4.4.3/crtbegin.o \
${PREBUILT}/lib/gcc/arm-eabi/4.4.3/crtend.o -lc -lm -ldl"

Change History (5)

comment:1 Changed 5 years ago by Cigaes

codec_names.h is automatically generated, its absence from the source tarball is normal. Can you post your failing build log? More specifically, from a clean configured tree (make distclean; ./configure), the full output of the following command:

make V=1 libavcodec/utils.o

Also, please try to reproduce with current git head.

comment:2 Changed 5 years ago by Alex

Tnx for a quick answer.

I can't to give you output of

make V=1 libavcodec/utils.o

since I build ffmpeg together with all andoroid sources. By this reason I made a some tricks in build scripts.

Seems my tricks don't use

Let's close it as not a bug.

comment:3 Changed 5 years ago by Cigaes

  • Status changed from new to open

If you tweaked the build system for the 0.8 series, then indeed you will probably need to adapt it to the new features of 0.9, including codec_names.h. The part concerning codec_names.h is at the end of libavcodec/Makefile. Basically, it amounts to:

cc -E libavcodec/avcodec.h | libabvcodec/ config.h libavcodec/codec_names.h

but of course with the bunch of compiler flags.

Feel free to reopen the bug if it happens that the original build system fails.

comment:4 Changed 5 years ago by Alex

Tnx a lot, I found a Makefile that does it.

comment:5 Changed 5 years ago by cehoyos

  • Resolution set to invalid
  • Status changed from open to closed

I believe I have seen this broken script before, allow me to repeat that it is not a good idea to use it.

If you believe FFmpeg's build system is missing features, please report it as a new enhancement ticket.

Note: See TracTickets for help on using tickets.