From: Jo-Philipp Wich Date: Fri, 11 Mar 2011 21:24:20 +0000 (+0000) Subject: add gst-ffmpeg, gstreamer backend for the ffmpeg codec family (#8759) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=828ef9d6cd0b7aaca211625fb0eaca3d8057bfd4;p=openwrt%2Fsvn-archive%2Fpackages.git add gst-ffmpeg, gstreamer backend for the ffmpeg codec family (#8759) SVN-Revision: 26045 --- diff --git a/multimedia/gst-ffmpeg/Config.in b/multimedia/gst-ffmpeg/Config.in new file mode 100644 index 000000000..9f579c7c1 --- /dev/null +++ b/multimedia/gst-ffmpeg/Config.in @@ -0,0 +1,269 @@ +menu "Configuration" + depends PACKAGE_gst-ffmpeg + +config GST_FFMPEG_IPV6 + bool "Enable IPv6" + default IPV6 + +config GST_FFMPEG_PATENTED + bool "Include patented codecs and technologies" + default BUILD_PATENTED + +config GET_FFMPEG_LIBDLNA_SUPPORT + bool "Include support for libdlna/ushare" + depends GST_FFMPEG_PATENTED + select GST_FFMPEG_DECODER_ac3 + select GST_FFMPEG_DECODER_atrac3 + select GST_FFMPEG_DECODER_h264 + select GST_FFMPEG_DECODER_jpegls + select GST_FFMPEG_DECODER_mp3 + select GST_FFMPEG_DECODER_mpeg1video + select GST_FFMPEG_DECODER_mpeg2video + select GST_FFMPEG_DECODER_mpeg4 + select GST_FFMPEG_DECODER_mpeg4aac + select GST_FFMPEG_DECODER_mpegvideo + select GST_FFMPEG_DECODER_wmav1 + select GST_FFMPEG_DECODER_wmav2 + select GST_FFMPEG_DECODER_png + select GST_FFMPEG_DEMUXER_ac3 + select GST_FFMPEG_DEMUXER_h264 + select GST_FFMPEG_DEMUXER_mp3 + select GST_FFMPEG_DEMUXER_mpegvideo + +comment "Encoders ---" + +config GST_FFMPEG_ENCODER_ac3 + bool "AC3" + depends GST_FFMPEG_PATENTED + select GST_FFMPEG_PARSER_ac3 + +config GST_FFMPEG_ENCODER_jpegls + bool "JPEG-LS" + +config GST_FFMPEG_ENCODER_mpeg1video + bool "MPEG-1 Video" + +config GST_FFMPEG_ENCODER_mpeg2video + bool "MPEG-2 Video" + depends GST_FFMPEG_PATENTED + +config GST_FFMPEG_ENCODER_mpeg4 + bool "MPEG-4" + depends GST_FFMPEG_PATENTED + +config GST_FFMPEG_ENCODER_pcm_s16be + bool "PCM signed 16-bit big-endian" + +config GST_FFMPEG_ENCODER_pcm_s16le + bool "PCM signed 16-bit little-endian" + +config GST_FFMPEG_ENCODER_png + bool "PNG" + select GST_FFMPEG_ENCODER_zlib + +config GST_FFMPEG_ENCODER_vorbis + bool "Vorbis" + +config GST_FFMPEG_ENCODER_zlib + bool "Zlib" + +comment "Decoders ---" + +config GST_FFMPEG_DECODER_aac + bool "AAC (Advanced Audio Coding)" + depends GST_FFMPEG_PATENTED + select GST_FFMPEG_PARSER_aac + +config GST_FFMPEG_DECODER_ac3 + bool "AC3" + depends GST_FFMPEG_PATENTED + select GST_FFMPEG_PARSER_ac3 + +config GST_FFMPEG_DECODER_atrac3 + bool "ATRAC3" + depends GST_FFMPEG_PATENTED + +config GST_FFMPEG_DECODER_gif + bool "GIF" + +config GST_FFMPEG_DECODER_h264 + bool "H.264" + depends GST_FFMPEG_PATENTED + +config GST_FFMPEG_DECODER_jpegls + bool "JPEG-LS" + +config GST_FFMPEG_DECODER_mp2 + bool "MP2 (MPEG Audio Layer 2)" + depends GST_FFMPEG_PATENTED + +config GST_FFMPEG_DECODER_mp3 + bool "MP3 (MPEG Audio Layer 2)" + depends GST_FFMPEG_PATENTED + +config GST_FFMPEG_DECODER_mpegvideo + bool "MPEG Video" + +config GST_FFMPEG_DECODER_mpeg1video + bool "MPEG-1 Video" + +config GST_FFMPEG_DECODER_mpeg2video + bool "MPEG-2 Video" + depends GST_FFMPEG_PATENTED + +config GST_FFMPEG_DECODER_mpeg4 + bool "MPEG-4" + depends GST_FFMPEG_PATENTED + +config GST_FFMPEG_DECODER_mpeg4aac + bool "MPEG-4 (AAC)" + depends GST_FFMPEG_PATENTED + +config GST_FFMPEG_DECODER_pcm_s16be + bool "PCM signed 16-bit big-endian" + +config GST_FFMPEG_DECODER_pcm_s16le + bool "PCM signed 16-bit little-endian" + +config GST_FFMPEG_DECODER_png + bool "PNG" + select GST_FFMPEG_DECODER_zlib + +config GST_FFMPEG_DECODER_vorbis + bool "Vorbis" + +config GST_FFMPEG_DECODER_wmav1 + bool "WMAv1" + depends GST_FFMPEG_PATENTED + +config GST_FFMPEG_DECODER_wmav2 + bool "WMAv2" + depends GST_FFMPEG_PATENTED + +config GST_FFMPEG_DECODER_zlib + bool "Zlib" + +comment "Muxers ---" + +config GST_FFMPEG_MUXER_ac3 + bool "AC3" + depends GST_FFMPEG_PATENTED + +config GST_FFMPEG_MUXER_ffm + bool "FFM (ffserver live feed)" + +config GST_FFMPEG_MUXER_h264 + bool "H.264" + depends GST_FFMPEG_PATENTED + +config GST_FFMPEG_MUXER_mp3 + bool "MP3 (MPEG Audio Layer 3)" + +config GST_FFMPEG_MUXER_mp4 + bool "MP4" + +config GST_FFMPEG_MUXER_mpeg1video + bool "MPEG-1 Video" + +config GST_FFMPEG_MUXER_mpeg2video + bool "MPEG-2 Video" + +config GST_FFMPEG_MUXER_mpegts + bool "MPEG-2 (TS)" + +config GST_FFMPEG_MUXER_ogg + bool "Ogg" + +config GST_FFMPEG_MUXER_oss + bool "OSS (Open Sound System playback)" + +config GST_FFMPEG_MUXER_rtp + bool "RTP" + +comment "Demuxers ---" + +config GST_FFMPEG_DEMUXER_ac3 + bool "AC3" + +config GST_FFMPEG_DEMUXER_ffm + bool "FFM (ffserver live feed)" + +config GST_FFMPEG_DEMUXER_h264 + bool "H.264" + depends FFMPEG_PATENTED + +config GST_FFMPEG_DEMUXER_mp3 + bool "MP3 (MPEG Audio Layer 3)" + +config GST_FFMPEG_DEMUXER_mpegvideo + bool "MPEG Video" + +config GST_FFMPEG_DEMUXER_mpegps + bool "MPEG-2 (PS)" + +config GST_FFMPEG_DEMUXER_mpegts + bool "MPEG-2 (TS)" + +config GST_FFMPEG_DEMUXER_ogg + bool "Ogg" + +config GST_FFMPEG_DEMUXER_rm + bool "RM" + help + RealMedia format demuxer + +config GST_FFMPEG_DEMUXER_rtsp + bool "RTSP" + select GST_FFMPEG_DEMUXER_rm + select GST_FFMPEG_DEMUXER_sdp + +config GST_FFMPEG_DEMUXER_sdp + bool "SDP" + select GST_FFMPEG_DEMUXER_mpegts + +comment "Parsers ---" + +config GST_FFMPEG_PARSER_aac + bool "AAC (Advanced Audio Coding)" + depends GST_FFMPEG_PATENTED + +config GST_FFMPEG_PARSER_ac3 + bool "AC3" + +config GST_FFMPEG_PARSER_h264 + bool "H.264" + depends GST_FFMPEG_PATENTED + select GST_FFMPEG_DECODER_h264 + +config GST_FFMPEG_PARSER_mpegaudio + bool "MPEG Audio" + +config GST_FFMPEG_PARSER_mpegvideo + bool "MPEG Video" + +config GST_FFMPEG_PARSER_mpeg4video + bool "MPEG-4 Video" + +comment "Protocols ---" + +config GST_FFMPEG_PROTOCOL_file + bool "file:" + +config GST_FFMPEG_PROTOCOL_http + bool "http:" + +config GST_FFMPEG_PROTOCOL_pipe + bool "pipe:" + +config GST_FFMPEG_PROTOCOL_rtp + bool "rtp:" + select GST_FFMPEG_PROTOCOL_udp + +config GST_FFMPEG_PROTOCOL_tcp + bool "tcp:" + +config GST_FFMPEG_PROTOCOL_udp + bool "udp:" + +endmenu + diff --git a/multimedia/gst-ffmpeg/Makefile b/multimedia/gst-ffmpeg/Makefile new file mode 100644 index 000000000..663244f0a --- /dev/null +++ b/multimedia/gst-ffmpeg/Makefile @@ -0,0 +1,166 @@ +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gst-ffmpeg +PKG_RELEASE:=1 +PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-ffmpeg +PKG_VERSION:=0.10.11 +PKG_MD5SUM:=0d23197ba7ac06ea34fa66d38469ebe5 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 + +PKG_FIXUP:=autoreconf +PKG_INSTALL:=1 + +FFMPEG_ENCODERS:= \ + ac3 \ + jpegls \ + mpeg1video \ + mpeg2video \ + mpeg4 \ + pcm_s16be \ + pcm_s16le \ + png \ + vorbis \ + zlib \ + +FFMPEG_DECODERS:= \ + aac \ + ac3 \ + atrac3 \ + gif \ + h264 \ + jpegls \ + mp2 \ + mp3 \ + mpeg1video \ + mpeg2video \ + mpeg4 \ + mpeg4aac \ + mpegvideo \ + pcm_s16be \ + pcm_s16le \ + png \ + vorbis \ + wmav1 \ + wmav2 \ + zlib \ + +FFMPEG_MUXERS:= \ + ac3 \ + ffm \ + h264 \ + mp3 \ + mp4 \ + mpeg1video \ + mpeg2video \ + mpegts \ + ogg \ + oss \ + rtp \ + +FFMPEG_DEMUXERS:= \ + ac3 \ + ffm \ + h264 \ + mp3 \ + mpegps \ + mpegts \ + mpegvideo \ + ogg \ + rm \ + rtsp \ + sdp \ + v4l2 \ + +FFMPEG_PARSERS:= \ + aac \ + ac3 \ + h264 \ + mpegaudio \ + mpegvideo \ + mpeg4video \ + +FFMPEG_PROTOCOLS:= \ + file http pipe rtp tcp udp + +PKG_CONFIG_DEPENDS:= \ + $(patsubst %,CONFIG_GST_FFMPEG_ENCODER_%,$(FFMPEG_ENCODERS)) \ + $(patsubst %,CONFIG_GST_FFMPEG_DECODER_%,$(FFMPEG_DECODERS)) \ + $(patsubst %,CONFIG_GST_FFMPEG_MUXER_%,$(FFMPEG_DEMUXERS)) \ + $(patsubst %,CONFIG_GST_FFMPEG_DEMUXER_%,$(FFMPEG_DEMUXERS)) \ + $(patsubst %,CONFIG_GST_FFMPEG_PARSER_%,$(FFMPEG_PARSERS)) \ + $(patsubst %,CONFIG_GST_FFMPEG_PROTOCOL_%,$(FFMPEG_PROTOCOLS)) + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/nls.mk + +define Package/gst-ffmpeg + SECTION:=multimedia + CATEGORY:=Multimedia + TITLE:=GStreamer ffmpeg bindings + URL:=http://www.gstreamer.net/modules/gst-ffmpeg.html + MAINTAINER:=Okkel Klaver + DEPENDS:= +libgstreamer +gst-mod-alsa +endef + +define Package/gst-ffmpeg/description + GStreamer ffmpeg bindings +endef + +define Package/gst-ffmpeg/config +source "$(SOURCE)/Config.in" +endef + +FILTER_CONFIG= \ + $(foreach c, $(3), \ + $(if $(CONFIG_GST_FFMPEG_$(1)_$(c)),--enable-$(2)='$(c)') \ + ) + +FFMPEG_CONFIGURE_ENCODERS:=$(call FILTER_CONFIG,ENCODER,encoder,$(FFMPEG_ENCODERS)) +FFMPEG_CONFIGURE_DECODERS:=$(call FILTER_CONFIG,DECODER,decoder,$(FFMPEG_DECODERS)) +FFMPEG_CONFIGURE_MUXERS:=$(call FILTER_CONFIG,MUXER,muxer,$(FFMPEG_MUXERS)) +FFMPEG_CONFIGURE_DEMUXERS:=$(call FILTER_CONFIG,DEMUXER,demuxer,$(FFMPEG_DEMUXERS)) +FFMPEG_CONFIGURE_PARSERS:=$(call FILTER_CONFIG,PARSER,parser,$(FFMPEG_PARSERS)) +FFMPEG_CONFIGURE_PROTOCOLS:=$(call FILTER_CONFIG,PROTOCOL,protocol,$(FFMPEG_PROTOCOLS)) + +GST_VERSION:=0.10 + +CONFIGURE_ARGS += \ + --with-ffmpeg-extra-configure="--target-os=linux \ + --disable-bsfs \ + --disable-devices \ + --disable-encoders \ + $(FFMPEG_CONFIGURE_ENCODERS) \ + --disable-decoders \ + $(FFMPEG_CONFIGURE_DECODERS) \ + --disable-muxers \ + $(FFMPEG_CONFIGURE_MUXERS) \ + --disable-demuxers \ + $(FFMPEG_CONFIGURE_DEMUXERS) \ + --disable-parsers \ + $(FFMPEG_CONFIGURE_PARSERS) \ + --disable-protocols \ + $(FFMPEG_CONFIGURE_PROTOCOLS)" + +TARGET_LDFLAGS += $(FPIC) + +define Build/Prepare +$(call Build/Prepare/Default) +endef + +define Package/gst-ffmpeg/install + $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION) + ( cd $(PKG_INSTALL_DIR); $(CP) \ + ./usr/lib/gstreamer-$(GST_VERSION)/libgstffmpeg.so* \ + $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \ + ) +endef + +$(eval $(call BuildPackage,gst-ffmpeg))