Changeset 1022

Show
Ignore:
Timestamp:
01/28/09 23:41:04 (19 months ago)
Author:
astrange
Message:

- Fix compilation due to libavutil headers moving around (requires #undef hacks)
- Make FourCCString() show hex for fourccs like 0x01
- Disable warnings in ffmpeg build, and restore half the optimization CFLAGS

Location:
trunk
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/Codecprintf.c

    r1003 r1022  
    5151const char *FourCCString(FourCharCode c) 
    5252{ 
    53     static unsigned char fourcc[5] = {0}; 
     53    static char fourcc[sizeof("0xFFFF")] = {0}; 
    5454    int i; 
    5555     
    56     for (i = 0; i < 4; i++) fourcc[i] = c >> 8*(3-i); 
     56        //not a fourcc or twocc 
     57        if (c < '\0\0AA') { 
     58                snprintf(fourcc, sizeof(fourcc), "%#x", (unsigned)c); 
     59        } else { 
     60                for (i = 0; i < 4; i++) fourcc[i] = c >> 8*(3-i); 
     61                fourcc[4] = '\0'; 
     62        } 
    5763     
    5864    return (char*)fourcc; 
  • trunk/bitstream_info.c

    r1014 r1022  
    2020 
    2121#include "bswap.h" 
     22#include "libavutil/internal.h" 
    2223#include "mpegvideo.h" 
    2324#include "parser.h" 
     
    2526 
    2627#include "CodecIDs.h" 
     28 
     29#undef malloc 
     30#undef free 
    2731 
    2832int inline MININT(int a, int b) 
  • trunk/createStaticLibs.sh

    r999 r1022  
    88 
    99generalConfigureOptions="--disable-muxers --disable-encoders --disable-stripping --enable-pthreads --disable-ffmpeg --disable-network --disable-ffplay --disable-vhook --disable-ffserver" 
    10 sdkflags="-isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -ggdb -gstabs -Dattribute_deprecated=" 
     10cflags="-isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET -ggdb -gstabs -Dattribute_deprecated= -w" 
    1111 
    1212if [ "$BUILD_STYLE" = "Development" ] ; then 
    1313    generalConfigureOptions="$generalConfigureOptions --disable-optimizations --disable-mmx" 
     14else 
    1415    optcflags="-falign-loops=16 -fweb -fstrict-aliasing -finline-limit=1000" 
    1516fi 
     
    2223 
    2324if [ $no_pic -gt 0 ]; then 
    24     sdkflags="$sdkflags -mdynamic-no-pic" # ld can't handle -fno-pic on ppc 
     25    cflags="$cflags -mdynamic-no-pic" # ld can't handle -fno-pic on ppc 
    2526else 
    2627    #no-pic only on pre-leopard 
     
    2930fi  
    3031 
    31 export sdkflags 
     32export cflags 
    3233 
    3334x86tune="generic" 
     
    122123        if [ "$oldbuildid_ffmpeg" != "quick" ] ; then 
    123124            if [ `arch` = ppc ] ; then 
    124                 "$SRCROOT/ffmpeg/configure" --cc=$CC --enable-cross-compile --arch=i386 --extra-ldflags="$sdkflags -arch i386" --extra-cflags="-arch i386 $sdkflags $optcflags" $extraConfigureOptions $generalConfigureOptions --cpu=pentium-m  
     125                "$SRCROOT/ffmpeg/configure" --cc=$CC --enable-cross-compile --arch=i386 --extra-ldflags="$cflags -arch i386" --extra-cflags="-arch i386 $cflags $optcflags" $extraConfigureOptions $generalConfigureOptions --cpu=pentium-m  
    125126            else 
    126                 "$SRCROOT/ffmpeg/configure" --cc=$CC --extra-cflags="$sdkflags $optcflags" $extraConfigureOptions $generalConfigureOptions --cpu=pentium-m 
     127                "$SRCROOT/ffmpeg/configure" --cc=$CC --extra-cflags="$cflags $optcflags" $extraConfigureOptions $generalConfigureOptions --cpu=pentium-m 
    127128            fi 
    128129         
     
    152153        if [ "$oldbuildid_ffmpeg" != "quick" ] ; then 
    153154            if [ `arch` = ppc ] ; then 
    154                 "$SRCROOT/ffmpeg/configure" --cc=$CC --extra-cflags="-faltivec $sdkflags $optcflags" $extraConfigureOptions $generalConfigureOptions 
     155                "$SRCROOT/ffmpeg/configure" --cc=$CC --extra-cflags="-faltivec $cflags $optcflags" $extraConfigureOptions $generalConfigureOptions 
    155156            else 
    156                 "$SRCROOT/ffmpeg/configure" --cc=$CC --enable-cross-compile --arch=ppc  --extra-ldflags="$sdkflags -arch ppc" --extra-cflags="-faltivec -arch ppc $sdkflags $optcflags" $extraConfigureOptions $generalConfigureOptions 
     157                "$SRCROOT/ffmpeg/configure" --cc=$CC --enable-cross-compile --arch=ppc  --extra-ldflags="$cflags -arch ppc" --extra-cflags="-faltivec -arch ppc $cflags $optcflags" $extraConfigureOptions $generalConfigureOptions 
    157158            fi 
    158159         
  • trunk/ff_private.c

    r1014 r1022  
    2323#include "ff_private.h" 
    2424#include "avcodec.h" 
     25#include "libavutil/internal.h" 
    2526#include "mpegaudio.h" 
    2627#include "Codecprintf.h" 
    2728#include "CommonUtils.h" 
    2829#include "CodecIDs.h" 
     30 
     31#undef malloc 
     32#undef free 
    2933 
    3034#include <CoreServices/CoreServices.h>