diff --git a/recipes/ffmpeg/__init__.py b/recipes/ffmpeg/__init__.py index 9f8bc3d..7a50a83 100644 --- a/recipes/ffmpeg/__init__.py +++ b/recipes/ffmpeg/__init__.py @@ -1,5 +1,5 @@ from toolchain import Recipe, shprint -from os.path import join +from os.path import join, exists import sh @@ -26,6 +26,42 @@ class FFMpegRecipe(Recipe): "--disable-doc", "--enable-pic", "--enable-avresample") + options = ( + "--disable-everything", + "--enable-parser=h264,aac", + "--enable-decoder=h263,h264,aac", + "--enable-filter=aresample,resample,crop", + "--enable-protocol=file,http,https,tls_openssl", + "--enable-demuxer=sdp", + "--enable-pic", + "--enable-small", + "--enable-hwaccels", + "--enable-static", + "--disable-shared", + # libpostproc is GPL: https://ffmpeg.org/pipermail/ffmpeg-user/2012-February/005162.html + "--enable-gpl", + # enable openssl if needed + # if [ "X$BUILD_openssl" != "X" ]; then + # FLAGS="--enable-openssl --enable-nonfree" + # FLAGS="--enable-protocol=https,tls_openssl" + # fi + + # disable some unused algo + # note: "golomb" are the one used in our video test, so don't use --disable-golomb + # note: and for aac decoding: "rdft", "mdct", and "fft" are needed + "--disable-dxva2", + "--disable-vdpau", + "--disable-vaapi", + "--disable-dct", + + # disable binaries / doc + "--enable-cross-compile", + "--disable-debug", + "--disable-programs", + "--disable-doc", + "--enable-pic", + "--enable-avresample") + build_env = arch.get_env() build_env["VERBOSE"] = "1" configure = sh.Command(join(self.build_dir, "configure")) @@ -39,6 +75,21 @@ class FFMpegRecipe(Recipe): "--extra-ldflags={}".format(build_env["LDFLAGS"]), *options, _env=build_env) + """ + shprint(sh.sed, + "-i.bak", + "s/HAVE_CLOSESOCKET=yes//g", + "config.mak") + shprint(sh.sed, + "-i.bak", + "s/#define HAVE_CLOSESOCKET 1//g", + "config.h") + if exists("config.asm"): + shprint(sh.sed, + "-i.bak", + "s/%define HAVE_CLOSESOCKET 1//g", + "config.asm") + """ shprint(sh.make, "clean", _env=build_env) shprint(sh.make, "-j4", _env=build_env) shprint(sh.make, "install") diff --git a/toolchain.py b/toolchain.py index 06d7a5f..25f1262 100755 --- a/toolchain.py +++ b/toolchain.py @@ -1134,7 +1134,6 @@ Xcode: parser.add_argument("filename", help="Path to your project or xcodeproj") args = parser.parse_args(sys.argv[2:]) - filename = args.filename if not filename.endswith(".xcodeproj"): # try to find the xcodeproj