Android-vlc streamlined

Source: Internet
Author: User

 

First, streamline ffmpeg rules. mak

Changed:

[Plain] # FFmpeg
 
HASH = HEAD
 
# FFMPEG_SNAPURL: = http://git.videolan.org /? P = ffmpeg. git; a = snapshot; h = $ (HASH); sf = tgz
FFMPEG_SNAPURL: = http://git.libav.org /? P = libav. git; a = snapshot; h = $ (HASH); sf = tgz
 
FFMPEGCONF = \
-- Cc = "$ (CC )"\
-- Disable-doc \
-- Enable-libgsm \
-- Enable-libopenjpeg \
-- Disable-debug \
-- Disable-avdevice \
-- Disable-devices \
-- Disable-avfilter \
-- Disable-filters \
-- Disable-bsfs \
-- Disable-bzlib
 
# Those tools are named differently in FFmpeg and Libav
# -- Disable-ffserver \
# -- Disable-ffplay \
# -- Disable-ffprobe
DEPS_ffmpeg = zlib gsm openjpeg
 
# Optional dependencies
Ifdef BUILD_ENCODERS
FFMPEGCONF + = -- enable-libmp3lame -- enable-libvpx -- disable-decoder = libvpx_vp8 -- disable-decoder = libvpx_vp9
DEPS_ffmpeg + = lame $ (DEPS_lame) vpx $ (DEPS_vpx)
Else
FFMPEGCONF + = -- disable-encoders -- enable-encoder = png
FFMPEGCONF + = -- disable-decoders -- enable-decoder = h264
FFMPEGCONF + = -- disable-muxers
FFMPEGCONF + = -- disable-demuxers -- enable-demuxer = rtp -- enable-demuxer = rtsp
FFMPEGCONF + = -- disable-protocols -- enable-protocol = rtp -- enable-protocol = rtsp
FFMPEGCONF + = -- disable-parsers -- enable-parser = h264 -- enable-parser = mpeg4video
Endif
 
# Small size
Ifdef ENABLE_SMALL
FFMPEGCONF + = -- enable-small
Ifeq ($ (ARCH), arm)
Ifdef HAVE_ARMV7A
FFMPEGCONF + = -- enable-thumb
Endif
Endif
Endif
 
Ifdef HAVE_CROSS_COMPILE
FFMPEGCONF + = -- enable-cross-compile
Ifndef HAVE_IOS
FFMPEGCONF + = -- cross-prefix = $ (HOST )-
Endif
Endif
 
# ARM stuff
Ifeq ($ (ARCH), arm)
FFMPEGCONF + = -- arch = arm
Ifdef HAVE_NEON
FFMPEGCONF + = -- enable-neon
Endif
Ifdef HAVE_ARMV7A
FFMPEGCONF ++ = -- cpu = cortex-a8
Endif
Endif
 
# MIPS stuff
Ifeq ($ (ARCH), mipsel)
FFMPEGCONF + = -- arch = mips
Endif
 
# X86 stuff
Ifeq ($ (ARCH), i386)
Ifndef HAVE_DARWIN_ OS
FFMPEGCONF + = -- arch = x86
Endif
Endif
 
# Darwin
Ifdef HAVE_DARWIN_ OS
FFMPEGCONF + = -- arch = $ (ARCH) -- target-OS = darwin
Ifneq ($ (findstring $ (ARCH), i386 x86_64 ),)
FFMPEGCONF + = -- enable-memalign-hack
Endif
Ifeq ($ (ARCH), x86_64)
FFMPEGCONF + = -- cpu = core2
Endif
Endif
Ifdef HAVE_IOS
Ifeq ($ (ARCH), arm)
FFMPEGCONF + = -- enable-pic -- as = "$ ()"
Endif
Endif
 
# Linux
Ifdef HAVE_LINUX
FFMPEGCONF + = -- target-OS = linux -- enable-pic
 
Endif
 
# Windows
Ifdef HAVE_WIN32
Ifndef HAVE_MINGW_W64
DEPS_ffmpeg + = directx
Endif
FFMPEGCONF + = -- target-OS = mingw32 -- enable-memalign-hack
FFMPEGCONF + = -- enable-w32threads -- enable-dxva2 \
-- Disable-decoder = dca
 
Ifdef HAVE_WIN64
FFMPEGCONF + = -- cpu = athlon64 -- arch = x86_64
Else #! WIN64
FFMPEGCONF + = -- cpu = i686 -- arch = x86
Endif
 
Else #! Windows
FFMPEGCONF + = -- enable-pthreads
Endif
 
# Build
PKGS + = ffmpeg
Ifeq ($ (call need_pkg, "libavcodec >=52.25.0 libavformat >=52.30.0 libswscale "),)
PKGS_FOUND + = ffmpeg
Endif
 
$ (Tarbils)/ffmpeg-((hash).tar.gz:
$ (Call download, $ (FFMPEG_SNAPURL ))
 
. Sum-ffmpeg: $ (tarbils)/ffmpeg-((hash).tar.gz
$ (Warning Not implemented .)
Touch $ @
 
Ffmpeg: ffmpeg-((hash).tar.gz. sum-ffmpeg
Rm-Rf $-$ (HASH)
Mkdir-p $ @-$ (HASH)
$ (ZCAT) "$ <" | (cd $ @-$ (HASH) & tar xv -- strip-components = 1)
$ (MOVE)
 
. Ffmpeg: ffmpeg
Cd $ <& $ (HOSTVARS)./configure \
-- Extra-ldflags = "$ (LDFLAGS)" $ (FFMPEGCONF )\
-- Prefix = "$ (PREFIX)" -- enable-static -- disable-shared
Cd $ <& $ (MAKE) install-libs install-headers
Touch $ @

# FFmpeg

HASH = HEAD

# FFMPEG_SNAPURL: = http://git.videolan.org /? P = ffmpeg. git; a = snapshot; h = $ (HASH); sf = tgz
FFMPEG_SNAPURL: = http://git.libav.org /? P = libav. git; a = snapshot; h = $ (HASH); sf = tgz

FFMPEGCONF = \
-- Cc = "$ (CC )"\
-- Disable-doc \
-- Enable-libgsm \
-- Enable-libopenjpeg \
-- Disable-debug \
-- Disable-avdevice \
-- Disable-devices \
-- Disable-avfilter \
-- Disable-filters \
-- Disable-bsfs \
-- Disable-bzlib

# Those tools are named differently in FFmpeg and Libav
# -- Disable-ffserver \
# -- Disable-ffplay \
# -- Disable-ffprobe
DEPS_ffmpeg = zlib gsm openjpeg

# Optional dependencies
Ifdef BUILD_ENCODERS
FFMPEGCONF + = -- enable-libmp3lame -- enable-libvpx -- disable-decoder = libvpx_vp8 -- disable-decoder = libvpx_vp9
DEPS_ffmpeg + = lame $ (DEPS_lame) vpx $ (DEPS_vpx)
Else
FFMPEGCONF + = -- disable-encoders -- enable-encoder = png
FFMPEGCONF + = -- disable-decoders -- enable-decoder = h264
FFMPEGCONF + = -- disable-muxers
FFMPEGCONF + = -- disable-demuxers -- enable-demuxer = rtp -- enable-demuxer = rtsp
FFMPEGCONF + = -- disable-protocols -- enable-protocol = rtp -- enable-protocol = rtsp
FFMPEGCONF + = -- disable-parsers -- enable-parser = h264 -- enable-parser = mpeg4video
Endif

# Small size
Ifdef ENABLE_SMALL
FFMPEGCONF + = -- enable-small
Ifeq ($ (ARCH), arm)
Ifdef HAVE_ARMV7A
FFMPEGCONF + = -- enable-thumb
Endif
Endif
Endif

Ifdef HAVE_CROSS_COMPILE
FFMPEGCONF + = -- enable-cross-compile
Ifndef HAVE_IOS
FFMPEGCONF + = -- cross-prefix = $ (HOST )-
Endif
Endif

# ARM stuff
Ifeq ($ (ARCH), arm)
FFMPEGCONF + = -- arch = arm
Ifdef HAVE_NEON
FFMPEGCONF + = -- enable-neon
Endif
Ifdef HAVE_ARMV7A
FFMPEGCONF ++ = -- cpu = cortex-a8
Endif
Endif

# MIPS stuff
Ifeq ($ (ARCH), mipsel)
FFMPEGCONF + = -- arch = mips
Endif

# X86 stuff
Ifeq ($ (ARCH), i386)
Ifndef HAVE_DARWIN_ OS
FFMPEGCONF + = -- arch = x86
Endif
Endif

# Darwin
Ifdef HAVE_DARWIN_ OS
FFMPEGCONF + = -- arch = $ (ARCH) -- target-OS = darwin
Ifneq ($ (findstring $ (ARCH), i386 x86_64 ),)
FFMPEGCONF + = -- enable-memalign-hack
Endif
Ifeq ($ (ARCH), x86_64)
FFMPEGCONF + = -- cpu = core2
Endif
Endif
Ifdef HAVE_IOS
Ifeq ($ (ARCH), arm)
FFMPEGCONF + = -- enable-pic -- as = "$ ()"
Endif
Endif

# Linux
Ifdef HAVE_LINUX
FFMPEGCONF + = -- target-OS = linux -- enable-pic

Endif

# Windows
Ifdef HAVE_WIN32
Ifndef HAVE_MINGW_W64
DEPS_ffmpeg + = directx
Endif
FFMPEGCONF + = -- target-OS = mingw32 -- enable-memalign-hack
FFMPEGCONF + = -- enable-w32threads -- enable-dxva2 \
-- Disable-decoder = dca

Ifdef HAVE_WIN64
FFMPEGCONF + = -- cpu = athlon64 -- arch = x86_64
Else #! WIN64
FFMPEGCONF + = -- cpu = i686 -- arch = x86
Endif

Else #! Windows
FFMPEGCONF + = -- enable-pthreads
Endif

# Build
PKGS + = ffmpeg
Ifeq ($ (call need_pkg, "libavcodec >=52.25.0 libavformat >=52.30.0 libswscale "),)
PKGS_FOUND + = ffmpeg
Endif

$ (Tarbils)/ffmpeg-((hash).tar.gz:
$ (Call download, $ (FFMPEG_SNAPURL ))

. Sum-ffmpeg: $ (tarbils)/ffmpeg-((hash).tar.gz
$ (Warning Not implemented .)
Touch $ @

Ffmpeg: ffmpeg-((hash).tar.gz. sum-ffmpeg
Rm-Rf $-$ (HASH)
Mkdir-p $ @-$ (HASH)
$ (ZCAT) "$ <" | (cd $ @-$ (HASH) & tar xv -- strip-components = 1)
$ (MOVE)

. Ffmpeg: ffmpeg
Cd $ <& $ (HOSTVARS)./configure \
-- Extra-ldflags = "$ (LDFLAGS)" $ (FFMPEGCONF )\
-- Prefix = "$ (PREFIX)" -- enable-static -- disable-shared
Cd $ <& $ (MAKE) install-libs install-headers
Touch $ @

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.