Chromium Code Reviews| Index: ffmpeg/build_ffmpeg.sh |
| diff --git a/ffmpeg/build_ffmpeg.sh b/ffmpeg/build_ffmpeg.sh |
| index d5c5f312d44c238b3e8aec1f871428b7cc6f8125..3141b6f5b071cfce06ff41fe9f45593b7b5d32a8 100755 |
| --- a/ffmpeg/build_ffmpeg.sh |
| +++ b/ffmpeg/build_ffmpeg.sh |
| @@ -14,36 +14,45 @@ |
| if [ "$3" = "" ]; then |
|
Ami GONE FROM CHROMIUM
2011/08/16 05:27:13
-o "$4" != ""
scherkus (not reviewing)
2011/08/17 00:42:02
Done.
|
| echo "Usage:" |
| - echo " $0 [TARGET_OS] [TARGET_ARCH] [third_party BASE_PATH]" |
| + echo " $0 [TARGET_OS] [TARGET_ARCH] [path/to/third_party/ffmpeg]" |
| echo |
| echo "Valid combinations are linux [ia32|x64|arm|arm-neon]" |
| - echo " win ia32" |
| - echo " mac ia32" |
| + echo " win [ia32]" |
| + echo " mac [ia32]" |
| echo |
| echo " linux ia32/x64 - script can be run on a normal Ubuntu box." |
| echo " linux arm/arm-neon should be run inside of CrOS chroot." |
| echo " mac and win have to be run on Mac and Windows 7 (under mingw)." |
| echo |
| - echo "The base path should be absolute and point at the Chromium copies of FFmpeg" |
| - echo "and libvpx. This corresponds to:" |
| - echo " chrome/trunk/deps/third_party/" |
| - echo "It is assumbed that ffmpeg and libvpx reside in this directory." |
| + echo "The path should be absolute and point at Chromium's copy of FFmpeg." |
| + echo "This corresponds to:" |
| + echo " chrome/trunk/deps/third_party/ffmpeg" |
| echo |
| echo "Resulting binaries will be placed in:" |
| - echo " ffmpeg/build.TARGET_ARCH.TARGET_OS/Chromium/out/" |
| - echo " ffmpeg/build.TARGET_ARCH.TARGET_OS/Chrome/out/" |
| - echo " ffmpeg/build.TARGET_ARCH.TARGET_OS/ChromiumOS/out/" |
| - echo " ffmpeg/build.TARGET_ARCH.TARGET_OS/ChromeOS/out/" |
| + echo " build.TARGET_ARCH.TARGET_OS/Chromium/out/" |
| + echo " build.TARGET_ARCH.TARGET_OS/Chrome/out/" |
| + echo " build.TARGET_ARCH.TARGET_OS/ChromiumOS/out/" |
| + echo " build.TARGET_ARCH.TARGET_OS/ChromeOS/out/" |
| exit |
| fi |
| TARGET_OS=$1 |
| TARGET_ARCH=$2 |
| -BASE_PATH=$3 |
| -FFMPEG_PATH="$3/ffmpeg" |
| -LIBVPX_PATH="$3/libvpx" |
| +FFMPEG_PATH=$3 |
| -echo $0 $TARGET_OS $TARGET_ARCH $BASE_PATH |
| +# Check TARGET_OS (TARGET_ARCH is checked during configuration). |
| +if [[ "$TARGET_OS" != "linux" && |
| + "$TARGET_OS" != "mac" && |
| + "$TARGET_OS" != "win" ]]; then |
| + echo "Valid target OSes are: linux, mac, win" |
| + exit 1 |
| +fi |
| + |
| +# Check FFMPEG_PATH to contain this script. |
| +if [ ! -f "$FFMPEG_PATH/$0" ]; then |
| + echo "$FFMPEG_PATH doesn't appear to contain FFmpeg" |
| + exit 1 |
| +fi |
| # If configure & make works but this script doesn't, make sure to grep for these. |
| LIBAVCODEC_VERSION_MAJOR=53 |
| @@ -72,7 +81,7 @@ case $(uname -sm) in |
| JOBS=$NUMBER_OF_PROCESSORS |
| ;; |
| *) |
| - echo "Unrecognized TARGET_OS: $(uname)" |
| + echo "Unrecognized HOST_OS: $(uname)" |
| echo "Patches welcome!" |
| exit 1 |
| ;; |
| @@ -222,12 +231,12 @@ add_flag_common --disable-swscale |
| add_flag_common --disable-amd3dnow |
| add_flag_common --disable-amd3dnowext |
| add_flag_common --enable-shared |
| -add_flag_common --enable-libvpx |
| -add_flag_common --enable-decoder=theora,vorbis,libvpx |
| -# libvpx needed by remoting. |
| -add_flag_common --enable-encoder=libvpx |
| + |
| +# Common codecs. |
| +add_flag_common --enable-decoder=theora,vorbis,vp8 |
| add_flag_common --enable-decoder=pcm_u8,pcm_s16le,pcm_f32le |
| add_flag_common --enable-demuxer=ogg,matroska,wav |
| +add_flag_common --enable-parser=vp8 |
| # Linux only. |
| if [ "$TARGET_OS" = "linux" ]; then |
| @@ -250,7 +259,7 @@ if [ "$TARGET_OS" = "linux" ]; then |
| add_flag_common --enable-armvfp |
| add_flag_common --disable-neon |
| # Location is for CrOS chroot. If you want to use this, enter chroot |
| - # and copy ffmpeg and libvpx to a location that is reachable. |
| + # and copy ffmpeg to a location that is reachable. |
| add_flag_common --cross-prefix=/usr/bin/armv7a-cros-linux-gnueabi- |
| add_flag_common --extra-cflags=-march=armv7-a |
| add_flag_common --extra-cflags=-mtune=cortex-a8 |
| @@ -307,7 +316,6 @@ if [ "$TARGET_OS" = "mac" ]; then |
| add_flag_common --enable-yasm |
| add_flag_common --extra-cflags=-m32 |
| add_flag_common --extra-ldflags=-m32 |
| - echo "" |
| else |
| echo "Error: Unknown TARGET_ARCH=$TARGET_ARCH for TARGET_OS=$TARGET_OS!" |
| exit |
| @@ -319,10 +327,6 @@ if [ "$TARGET_OS" = "mac" ]; then |
| fi |
| fi |
| -# Location of the precompiled libvpx binary. |
| -add_flag_common --extra-cflags=-I$LIBVPX_PATH/include |
| -add_flag_common --extra-ldflags=-L$LIBVPX_PATH/lib/${TARGET_OS}/${TARGET_ARCH} |
| - |
| # Chromium & ChromiumOS specific configuration. |
| # (nothing at the moment) |
| @@ -334,9 +338,6 @@ add_flag_chrome --enable-bsf=h264_mp4toannexb |
| # ChromiumOS specific configuration. |
| # Warning: do *NOT* add avi, aac, h264, mp3, mp4, amr* |
| -# Increase performance over libvpx. |
| -add_flag_chromiumos --enable-decoder=vp8 |
| -add_flag_chromiumos --enable-parser=vp8 |
| # Flac support. |
| add_flag_chromiumos --enable-demuxer=flac |
| add_flag_chromiumos --enable-decoder=flac |
| @@ -351,9 +352,6 @@ add_flag_chromeos --enable-bsf=mpeg4video_es |
| # Enable playing Android 3gp files. |
| add_flag_chromeos --enable-demuxer=amr |
| add_flag_chromeos --enable-decoder=amrnb,amrwb |
| -# Increase performance over libvpx. |
| -add_flag_chromeos --enable-decoder=vp8 |
| -add_flag_chromeos --enable-parser=vp8 |
| # Flac support. |
| add_flag_chromeos --enable-demuxer=flac |
| add_flag_chromeos --enable-decoder=flac |