Opened 13 years ago

Closed 13 years ago

#853 closed defect (invalid)

codec_names.h isn't present but included

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

Description

File: libavcodec/utils.c

Function:

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

#if !CONFIG_SMALL
    switch (id) {
#include "libavcodec/codec_names.h"
    }
    av_log(NULL, AV_LOG_WARNING, "Codec 0x%x is not in the full list.\n", id);
#endif
    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:

PREBUILT=${TOP}/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3

./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 by Cigaes, 13 years ago

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 by Alex Khokhlov, 13 years ago

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 codec_names.sh

Let's close it as not a bug.

comment:3 by Cigaes, 13 years ago

Status: newopen

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/codec_names.sh 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 by Alex Khokhlov, 13 years ago

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

comment:5 by Carl Eugen Hoyos, 13 years ago

Resolution: invalid
Status: openclosed

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.