vanhofen
7 years ago
4 changed files with 365 additions and 183 deletions
@ -0,0 +1,181 @@ |
|||
#
|
|||
# ffmpeg
|
|||
#
|
|||
|
|||
# -----------------------------------------------------------------------------
|
|||
|
|||
FFMPEG_VER = 3.3 |
|||
FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VER).tar.xz |
|||
|
|||
$(ARCHIVE)/$(FFMPEG_SOURCE): |
|||
$(WGET) http://www.ffmpeg.org/releases/$(FFMPEG_SOURCE) |
|||
|
|||
# -----------------------------------------------------------------------------
|
|||
|
|||
FFMPEG_PATCH = ffmpeg-$(FFMPEG_VER)-fix-hls.patch |
|||
FFMPEG_PATCH += ffmpeg-$(FFMPEG_VER)-buffer-size.patch |
|||
FFMPEG_PATCH += ffmpeg-$(FFMPEG_VER)-aac.patch |
|||
FFMPEG_PATCH += ffmpeg-$(FFMPEG_VER)-fix-edit-list-parsing.patch |
|||
# ffmpeg exteplayer3 patches
|
|||
FFMPEG_PATCH += ffmpeg-$(FFMPEG_VER)-fix-mpegts.patch |
|||
FFMPEG_PATCH += ffmpeg-$(FFMPEG_VER)-allow-to-choose-rtmp-impl-at-runtime.patch |
|||
FFMPEG_PATCH += ffmpeg-$(FFMPEG_VER)-add-dash-demux.patch |
|||
FFMPEG_PATCH += ffmpeg-$(FFMPEG_VER)-hls-replace-key-uri.patch |
|||
FFMPEG_PATCH += ffmpeg-$(FFMPEG_VER)-chunked_transfer_fix_eof.patch |
|||
|
|||
# -----------------------------------------------------------------------------
|
|||
|
|||
FFMPEG_DEPS = $(D)/openssl $(D)/librtmp $(D)/libbluray $(D)/libass $(D)/libxml2 |
|||
|
|||
# -----------------------------------------------------------------------------
|
|||
|
|||
FFMPEG_CONFIGURE_GENERIC = \
|
|||
--prefix=/ \
|
|||
--cross-prefix=$(TARGET)- \
|
|||
--mandir=/.remove \
|
|||
--datadir=/.remove \
|
|||
--docdir=/.remove \
|
|||
\
|
|||
--disable-doc \
|
|||
--disable-htmlpages \
|
|||
--disable-manpages \
|
|||
--disable-podpages \
|
|||
--disable-txtpages \
|
|||
\
|
|||
--disable-ffplay \
|
|||
--disable-ffserver \
|
|||
--disable-ffprobe \
|
|||
\
|
|||
--disable-altivec \
|
|||
--disable-mmx \
|
|||
\
|
|||
--disable-parsers \
|
|||
--enable-parser=aac \
|
|||
--enable-parser=aac_latm \
|
|||
--enable-parser=ac3 \
|
|||
--enable-parser=dca \
|
|||
--enable-parser=dvbsub \
|
|||
--enable-parser=dvdsub \
|
|||
--enable-parser=flac \
|
|||
--enable-parser=h264 \
|
|||
--enable-parser=mjpeg \
|
|||
--enable-parser=mpeg4video \
|
|||
--enable-parser=mpegaudio \
|
|||
--enable-parser=mpegvideo \
|
|||
--enable-parser=vc1 \
|
|||
--enable-parser=vorbis \
|
|||
\
|
|||
--disable-decoders \
|
|||
--enable-decoder=aac \
|
|||
--enable-decoder=ass \
|
|||
--enable-decoder=dca \
|
|||
--enable-decoder=dvbsub \
|
|||
--enable-decoder=dvdsub \
|
|||
--enable-decoder=flac \
|
|||
--enable-decoder=mjpeg \
|
|||
--enable-decoder=movtext \
|
|||
--enable-decoder=mp3 \
|
|||
--enable-decoder=pcm_s16le \
|
|||
--enable-decoder=pcm_s16le_planar \
|
|||
--enable-decoder=pgssub \
|
|||
--enable-decoder=srt \
|
|||
--enable-decoder=ssa \
|
|||
--enable-decoder=subrip \
|
|||
--enable-decoder=subviewer \
|
|||
--enable-decoder=subviewer1 \
|
|||
--enable-decoder=text \
|
|||
--enable-decoder=vorbis \
|
|||
--enable-decoder=xsub \
|
|||
\
|
|||
--disable-encoders \
|
|||
--enable-encoder=mpeg2video \
|
|||
\
|
|||
--disable-demuxers \
|
|||
--enable-demuxer=aac \
|
|||
--enable-demuxer=ac3 \
|
|||
--enable-demuxer=ass \
|
|||
--enable-demuxer=avi \
|
|||
--enable-demuxer=dash \
|
|||
--enable-demuxer=dts \
|
|||
--enable-demuxer=flac \
|
|||
--enable-demuxer=flv \
|
|||
--enable-demuxer=hls \
|
|||
--enable-demuxer=image2 \
|
|||
--enable-demuxer=matroska \
|
|||
--enable-demuxer=mjpeg \
|
|||
--enable-demuxer=mov \
|
|||
--enable-demuxer=mp3 \
|
|||
--enable-demuxer=mpegps \
|
|||
--enable-demuxer=mpegts \
|
|||
--enable-demuxer=mpegtsraw \
|
|||
--enable-demuxer=mpegvideo \
|
|||
--enable-demuxer=mpjpeg \
|
|||
--enable-demuxer=ogg \
|
|||
--enable-demuxer=pcm_s16be \
|
|||
--enable-demuxer=pcm_s16le \
|
|||
--enable-demuxer=rm \
|
|||
--enable-demuxer=rtsp \
|
|||
--enable-demuxer=srt \
|
|||
--enable-demuxer=vc1 \
|
|||
--enable-demuxer=wav \
|
|||
\
|
|||
--disable-muxers \
|
|||
--enable-muxer=mpegts \
|
|||
--enable-muxer=mpeg2video \
|
|||
\
|
|||
--disable-filters \
|
|||
--enable-filter=scale \
|
|||
\
|
|||
--disable-devices \
|
|||
\
|
|||
--disable-extra-warnings \
|
|||
--disable-postproc \
|
|||
\
|
|||
--enable-bsfs \
|
|||
--enable-libass \
|
|||
--enable-libbluray \
|
|||
--enable-librtmp \
|
|||
--enable-network \
|
|||
--enable-nonfree \
|
|||
--enable-openssl \
|
|||
--enable-swresample \
|
|||
--enable-hardcoded-tables \
|
|||
\
|
|||
--disable-debug \
|
|||
--enable-cross-compile \
|
|||
--enable-stripping \
|
|||
--disable-static \
|
|||
--enable-shared \
|
|||
\
|
|||
--target-os=linux \
|
|||
--arch=$(BOXARCH) \
|
|||
--extra-ldflags="$(TARGET_LDFLAGS)" |
|||
|
|||
# -----------------------------------------------------------------------------
|
|||
|
|||
FFMPEG_CONFIGURE_PLATFORM = \
|
|||
--cpu=cortex-a15 \
|
|||
--extra-cflags="-Wno-deprecated-declarations -I$(TARGET_INCLUDE_DIR) -mfpu=neon-vfpv4 -mfloat-abi=hard" |
|||
|
|||
# -----------------------------------------------------------------------------
|
|||
|
|||
$(D)/ffmpeg: $(FFMPEG_DEPS) $(ARCHIVE)/$(FFMPEG_SOURCE) | $(TARGET_DIR) |
|||
$(REMOVE)/ffmpeg-$(FFMPEG_VER) |
|||
$(UNTAR)/$(FFMPEG_SOURCE) |
|||
set -e; cd $(BUILD_TMP)/ffmpeg-$(FFMPEG_VER); \
|
|||
$(call apply_patches, $(FFMPEG_PATCH)); \
|
|||
./configure \
|
|||
$(FFMPEG_CONFIGURE_GENERIC) \
|
|||
$(FFMPEG_CONFIGURE_PLATFORM) \
|
|||
; \
|
|||
$(MAKE); \
|
|||
make install DESTDIR=$(TARGET_DIR) |
|||
$(REWRITE_PKGCONF) $(PKG_CONFIG_PATH)/libavcodec.pc |
|||
$(REWRITE_PKGCONF) $(PKG_CONFIG_PATH)/libavdevice.pc |
|||
$(REWRITE_PKGCONF) $(PKG_CONFIG_PATH)/libavfilter.pc |
|||
$(REWRITE_PKGCONF) $(PKG_CONFIG_PATH)/libavformat.pc |
|||
$(REWRITE_PKGCONF) $(PKG_CONFIG_PATH)/libavutil.pc |
|||
$(REWRITE_PKGCONF) $(PKG_CONFIG_PATH)/libswresample.pc |
|||
$(REWRITE_PKGCONF) $(PKG_CONFIG_PATH)/libswscale.pc |
|||
$(REMOVE)/ffmpeg-$(FFMPEG_VER) |
|||
touch $@ |
@ -0,0 +1,183 @@ |
|||
#
|
|||
# ffmpeg
|
|||
#
|
|||
|
|||
# -----------------------------------------------------------------------------
|
|||
|
|||
FFMPEG_DEPS = $(D)/openssl $(D)/librtmp $(D)/libbluray $(D)/libass |
|||
|
|||
# -----------------------------------------------------------------------------
|
|||
|
|||
ifeq ($(NI_FFMPEG_BRANCH), ni/ffmpeg/2.8) |
|||
FFMPEG_DEPS += $(D)/libroxml |
|||
FFMPEG_CONFIGURE_BRANCH = |
|||
else |
|||
FFMPEG_DEPS += $(D)/libxml2 |
|||
FFMPEG_CONFIGURE_BRANCH = \
|
|||
--enable-demuxer=dash \
|
|||
--enable-libxml2 |
|||
endif |
|||
|
|||
# -----------------------------------------------------------------------------
|
|||
|
|||
FFMPEG_CONFIGURE_GENERIC = \
|
|||
--prefix=/ \
|
|||
--cross-prefix=$(TARGET)- \
|
|||
--mandir=/.remove \
|
|||
--datadir=/.remove \
|
|||
--docdir=/.remove \
|
|||
\
|
|||
--disable-doc \
|
|||
--disable-htmlpages \
|
|||
--disable-manpages \
|
|||
--disable-podpages \
|
|||
--disable-txtpages \
|
|||
\
|
|||
--disable-ffmpeg \
|
|||
--disable-ffplay \
|
|||
--disable-ffprobe \
|
|||
--disable-ffserver \
|
|||
\
|
|||
--disable-altivec \
|
|||
--disable-mmx \
|
|||
--disable-neon \
|
|||
--disable-swscale \
|
|||
\
|
|||
--disable-parsers \
|
|||
--enable-parser=aac \
|
|||
--enable-parser=aac_latm \
|
|||
--enable-parser=ac3 \
|
|||
--enable-parser=dca \
|
|||
--enable-parser=dvbsub \
|
|||
--enable-parser=dvdsub \
|
|||
--enable-parser=flac \
|
|||
--enable-parser=h264 \
|
|||
--enable-parser=mjpeg \
|
|||
--enable-parser=mpeg4video \
|
|||
--enable-parser=mpegaudio \
|
|||
--enable-parser=mpegvideo \
|
|||
--enable-parser=vc1 \
|
|||
--enable-parser=vorbis \
|
|||
\
|
|||
--disable-decoders \
|
|||
--enable-decoder=aac \
|
|||
--enable-decoder=ass \
|
|||
--enable-decoder=dca \
|
|||
--enable-decoder=dvbsub \
|
|||
--enable-decoder=dvdsub \
|
|||
--enable-decoder=flac \
|
|||
--enable-decoder=mjpeg \
|
|||
--enable-decoder=movtext \
|
|||
--enable-decoder=mp3 \
|
|||
--enable-decoder=pcm_s16le \
|
|||
--enable-decoder=pcm_s16le_planar \
|
|||
--enable-decoder=pgssub \
|
|||
--enable-decoder=srt \
|
|||
--enable-decoder=ssa \
|
|||
--enable-decoder=subrip \
|
|||
--enable-decoder=subviewer \
|
|||
--enable-decoder=subviewer1 \
|
|||
--enable-decoder=text \
|
|||
--enable-decoder=vorbis \
|
|||
--enable-decoder=xsub \
|
|||
\
|
|||
--disable-encoders \
|
|||
\
|
|||
--disable-demuxers \
|
|||
--enable-demuxer=aac \
|
|||
--enable-demuxer=ac3 \
|
|||
--enable-demuxer=ass \
|
|||
--enable-demuxer=avi \
|
|||
--enable-demuxer=dts \
|
|||
--enable-demuxer=flac \
|
|||
--enable-demuxer=flv \
|
|||
--enable-demuxer=hds \
|
|||
--enable-demuxer=hls \
|
|||
--enable-demuxer=matroska \
|
|||
--enable-demuxer=mjpeg \
|
|||
--enable-demuxer=mov \
|
|||
--enable-demuxer=mp3 \
|
|||
--enable-demuxer=mpegps \
|
|||
--enable-demuxer=mpegts \
|
|||
--enable-demuxer=mpegtsraw \
|
|||
--enable-demuxer=mpegvideo \
|
|||
--enable-demuxer=mpjpeg \
|
|||
--enable-demuxer=ogg \
|
|||
--enable-demuxer=pcm_s16be \
|
|||
--enable-demuxer=pcm_s16le \
|
|||
--enable-demuxer=rm \
|
|||
--enable-demuxer=rtsp \
|
|||
--enable-demuxer=srt \
|
|||
--enable-demuxer=vc1 \
|
|||
--enable-demuxer=wav \
|
|||
\
|
|||
--disable-muxers \
|
|||
--enable-muxer=mpegts \
|
|||
\
|
|||
--disable-filters \
|
|||
\
|
|||
--disable-devices \
|
|||
\
|
|||
--disable-extra-warnings \
|
|||
--disable-postproc \
|
|||
\
|
|||
--enable-bsfs \
|
|||
--enable-libass \
|
|||
--enable-libbluray \
|
|||
--enable-librtmp \
|
|||
--enable-network \
|
|||
--enable-nonfree \
|
|||
--enable-openssl \
|
|||
--enable-swresample \
|
|||
\
|
|||
--disable-debug \
|
|||
--enable-cross-compile \
|
|||
--enable-stripping \
|
|||
--disable-static \
|
|||
--enable-shared \
|
|||
\
|
|||
--target-os=linux \
|
|||
--arch=$(BOXARCH) \
|
|||
--extra-ldflags="$(TARGET_LDFLAGS)" |
|||
|
|||
# -----------------------------------------------------------------------------
|
|||
|
|||
ifeq ($(BOXSERIES), hd1) |
|||
FFMPEG_CONFIGURE_PLATFORM = \
|
|||
--enable-small \
|
|||
--cpu=armv6 \
|
|||
--extra-cflags="-Wno-deprecated-declarations -I$(TARGET_INCLUDE_DIR)" |
|||
endif |
|||
|
|||
ifeq ($(BOXSERIES), hd2) |
|||
FFMPEG_CONFIGURE_PLATFORM = \
|
|||
--enable-decoder=h264 \
|
|||
--enable-decoder=vc1 \
|
|||
--enable-hardcoded-tables \
|
|||
--cpu=cortex-a9 \
|
|||
--extra-cflags="-Wno-deprecated-declarations -I$(TARGET_INCLUDE_DIR) -mfpu=vfpv3-d16 -mfloat-abi=hard" |
|||
endif |
|||
|
|||
# -----------------------------------------------------------------------------
|
|||
|
|||
$(D)/ffmpeg: $(FFMPEG_DEPS) | $(TARGET_DIR) |
|||
$(REMOVE)/$(NI_FFMPEG) |
|||
cd $(SOURCE_DIR)/$(NI_FFMPEG) && \
|
|||
git checkout $(NI_FFMPEG_BRANCH) && \
|
|||
tar -C $(SOURCE_DIR) -cp $(NI_FFMPEG) --exclude-vcs | tar -C $(BUILD_TMP) -x |
|||
cd $(BUILD_TMP)/$(NI_FFMPEG) && \
|
|||
./configure \
|
|||
$(FFMPEG_CONFIGURE_GENERIC) \
|
|||
$(FFMPEG_CONFIGURE_PLATFORM) \
|
|||
$(FFMPEG_CONFIGURE_BRANCH) \
|
|||
; \
|
|||
$(MAKE); \
|
|||
make install DESTDIR=$(TARGET_DIR) |
|||
$(REWRITE_PKGCONF) $(PKG_CONFIG_PATH)/libavcodec.pc |
|||
$(REWRITE_PKGCONF) $(PKG_CONFIG_PATH)/libavdevice.pc |
|||
$(REWRITE_PKGCONF) $(PKG_CONFIG_PATH)/libavfilter.pc |
|||
$(REWRITE_PKGCONF) $(PKG_CONFIG_PATH)/libavformat.pc |
|||
$(REWRITE_PKGCONF) $(PKG_CONFIG_PATH)/libavutil.pc |
|||
$(REWRITE_PKGCONF) $(PKG_CONFIG_PATH)/libswresample.pc |
|||
$(REMOVE)/$(NI_FFMPEG) |
|||
touch $@ |
Loading…
Reference in new issue