You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

205 lines
4.2 KiB

  1. #
  2. # Copyright (C) 2006-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=gst1-libav
  9. PKG_VERSION:=1.4.4
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  12. PKG_SOURCE:=gst-libav-$(PKG_VERSION).tar.xz
  13. PKG_SOURCE_URL:=http://gstreamer.freedesktop.org/src/gst-libav
  14. PKG_MD5SUM:=64a3e2cda2687132cadca4efdc63f3b4
  15. PKG_LICENSE:=GPL-2.0 LGPL-2.0
  16. PKG_LICENSE_FILES:=COPYING COPYING.LIB
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/gst-libav-$(PKG_VERSION)
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. PKG_USE_MIPS16:=0
  21. GST_VERSION:=1.0
  22. LIBAV_ENCODERS:= \
  23. ac3 \
  24. jpegls \
  25. mpeg1video \
  26. mpeg2video \
  27. mpeg4 \
  28. pcm_s16be \
  29. pcm_s16le \
  30. png \
  31. vorbis \
  32. zlib \
  33. LIBAV_DECODERS:= \
  34. aac \
  35. ac3 \
  36. atrac3 \
  37. gif \
  38. h264 \
  39. jpegls \
  40. mp2 \
  41. mp3 \
  42. mpeg1video \
  43. mpeg2video \
  44. mpeg4 \
  45. mpeg4aac \
  46. mpegvideo \
  47. pcm_s16be \
  48. pcm_s16le \
  49. png \
  50. vorbis \
  51. wmav1 \
  52. wmav2 \
  53. zlib \
  54. LIBAV_MUXERS:= \
  55. ac3 \
  56. ffm \
  57. h264 \
  58. mp3 \
  59. mp4 \
  60. mpeg1video \
  61. mpeg2video \
  62. mpegts \
  63. ogg \
  64. oss \
  65. rtp \
  66. LIBAV_DEMUXERS:= \
  67. ac3 \
  68. ffm \
  69. h264 \
  70. mp3 \
  71. mpegps \
  72. mpegts \
  73. mpegvideo \
  74. ogg \
  75. rm \
  76. rtsp \
  77. sdp \
  78. v4l2 \
  79. LIBAV_PARSERS:= \
  80. aac \
  81. ac3 \
  82. h264 \
  83. mpegaudio \
  84. mpegvideo \
  85. mpeg4video \
  86. LIBAV_PROTOCOLS:= \
  87. file http pipe rtp tcp udp
  88. PKG_CONFIG_DEPENDS:= \
  89. $(patsubst %,CONFIG_GST1_LIBAV_ENCODER_%,$(LIBAV_ENCODERS)) \
  90. $(patsubst %,CONFIG_GST1_LIBAV_DECODER_%,$(LIBAV_DECODERS)) \
  91. $(patsubst %,CONFIG_GST1_LIBAV_MUXER_%,$(LIBAV_DEMUXERS)) \
  92. $(patsubst %,CONFIG_GST1_LIBAV_DEMUXER_%,$(LIBAV_DEMUXERS)) \
  93. $(patsubst %,CONFIG_GST1_LIBAV_PARSER_%,$(LIBAV_PARSERS)) \
  94. $(patsubst %,CONFIG_GST1_LIBAV_PROTOCOL_%,$(LIBAV_PROTOCOLS))
  95. PKG_BUILD_DEPENDS:= libgstreamer1 gstreamer1-plugins-base
  96. include $(INCLUDE_DIR)/package.mk
  97. include $(INCLUDE_DIR)/nls.mk
  98. define Package/gst1-libav
  99. SECTION:=multimedia
  100. CATEGORY:=Multimedia
  101. TITLE:=GStreamer Libav plugin
  102. URL:=http://www.gstreamer.net/modules/gst-libav.html
  103. DEPENDS:= +libgstreamer1 +gstreamer1-plugins-base \
  104. +gst1-mod-alsa +libgst1audio +libgst1pbutils +libgst1video \
  105. +libbz2
  106. endef
  107. define Package/gst1-libav/description
  108. GStreamer with libav bindings using internal Libav
  109. endef
  110. define Package/gst1-libav/config
  111. source "$(SOURCE)/Config.in"
  112. endef
  113. FILTER_CONFIG= \
  114. $(foreach c, $(3), \
  115. $(if $(CONFIG_GST1_LIBAV_$(1)_$(c)),--enable-$(2)='$(c)') \
  116. )
  117. LIBAV_CONFIGURE_ENCODERS:=$(call FILTER_CONFIG,ENCODER,encoder,$(LIBAV_ENCODERS))
  118. LIBAV_CONFIGURE_DECODERS:=$(call FILTER_CONFIG,DECODER,decoder,$(LIBAV_DECODERS))
  119. LIBAV_CONFIGURE_MUXERS:=$(call FILTER_CONFIG,MUXER,muxer,$(LIBAV_MUXERS))
  120. LIBAV_CONFIGURE_DEMUXERS:=$(call FILTER_CONFIG,DEMUXER,demuxer,$(LIBAV_DEMUXERS))
  121. LIBAV_CONFIGURE_PARSERS:=$(call FILTER_CONFIG,PARSER,parser,$(LIBAV_PARSERS))
  122. LIBAV_CONFIGURE_PROTOCOLS:=$(call FILTER_CONFIG,PROTOCOL,protocol,$(LIBAV_PROTOCOLS))
  123. CONFIGURE_ARGS += \
  124. --without-system-libav \
  125. --with-libav-extra-configure="--target-os=linux \
  126. --disable-bsfs \
  127. --disable-programs \
  128. --disable-devices \
  129. --disable-encoders \
  130. $(LIBAV_CONFIGURE_ENCODERS) \
  131. --disable-decoders \
  132. $(LIBAV_CONFIGURE_DECODERS) \
  133. --disable-muxers \
  134. $(LIBAV_CONFIGURE_MUXERS) \
  135. --disable-demuxers \
  136. $(LIBAV_CONFIGURE_DEMUXERS) \
  137. --disable-parsers \
  138. $(LIBAV_CONFIGURE_PARSERS) \
  139. --disable-protocols \
  140. $(LIBAV_CONFIGURE_PROTOCOLS) \
  141. --disable-asm \
  142. --disable-altivec \
  143. --disable-amd3dnow \
  144. --disable-amd3dnowext \
  145. --disable-mmx \
  146. --disable-mmxext \
  147. --disable-sse \
  148. --disable-sse2 \
  149. --disable-sse3 \
  150. --disable-ssse3 \
  151. --disable-sse4 \
  152. --disable-sse42 \
  153. --disable-avx \
  154. --disable-xop \
  155. --disable-fma3 \
  156. --disable-fma4 \
  157. --disable-avx2 \
  158. --disable-vfp \
  159. --disable-neon \
  160. --disable-inline-asm \
  161. --disable-yasm"
  162. # XXX: trick to force use of embedded Libav headers
  163. TARGET_CFLAGS += $(TARGET_CPPFLAGS)
  164. TARGET_CPPFLAGS :=
  165. TARGET_LDFLAGS += $(FPIC)
  166. define Build/Prepare
  167. $(call Build/Prepare/Default)
  168. endef
  169. define Package/gst1-libav/install
  170. $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
  171. ( cd $(PKG_INSTALL_DIR); $(CP) \
  172. ./usr/lib/gstreamer-$(GST_VERSION)/libgstlibav.so* \
  173. $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  174. )
  175. endef
  176. $(eval $(call BuildPackage,gst1-libav))