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.

215 lines
4.6 KiB

  1. #
  2. # Copyright (C) 2006-2016 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.15.2
  10. PKG_RELEASE:=2
  11. PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
  12. Ted Hess <thess@kitschensync.net>
  13. PKG_SOURCE:=gst-libav-$(PKG_VERSION).tar.xz
  14. PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-libav
  15. PKG_HASH:=96241130cb0067e01925a7cfe084dcf05941f139eb1ab45e5556c3f95120ce49
  16. PKG_LICENSE:=GPL-2.0 LGPL-2.0
  17. PKG_LICENSE_FILES:=COPYING COPYING.LIB
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/gst-libav-$(PKG_VERSION)
  19. PKG_FIXUP:=autoreconf
  20. PKG_INSTALL:=1
  21. PKG_USE_MIPS16:=0
  22. GST_VERSION:=1.0
  23. LIBAV_ENCODERS:= \
  24. ac3 \
  25. jpegls \
  26. mpeg1video \
  27. mpeg2video \
  28. mpeg4 \
  29. pcm_s16be \
  30. pcm_s16le \
  31. png \
  32. vorbis \
  33. zlib \
  34. LIBAV_DECODERS:= \
  35. aac \
  36. ac3 \
  37. atrac3 \
  38. gif \
  39. h264 \
  40. jpegls \
  41. mp2 \
  42. mp3 \
  43. mpeg1video \
  44. mpeg2video \
  45. mpeg4 \
  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. include $(INCLUDE_DIR)/package.mk
  96. include $(INCLUDE_DIR)/nls.mk
  97. define Package/gst1-libav
  98. SECTION:=multimedia
  99. CATEGORY:=Multimedia
  100. TITLE:=GStreamer Libav plugin
  101. URL:=https://www.gstreamer.net/modules/gst-libav.html
  102. DEPENDS:= +libgstreamer1 +gstreamer1-plugins-base \
  103. +gst1-mod-alsa +libgst1audio +libgst1pbutils +libgst1video \
  104. +libbz2 +liblzma
  105. endef
  106. define Package/gst1-libav/description
  107. GStreamer with libav bindings using internal Libav
  108. endef
  109. define Package/gst1-libav/config
  110. source "$(SOURCE)/Config.in"
  111. endef
  112. FILTER_CONFIG= \
  113. $(foreach c, $(3), \
  114. $(if $(CONFIG_GST1_LIBAV_$(1)_$(c)),--enable-$(2)='$(c)') \
  115. )
  116. LIBAV_CONFIGURE_ENCODERS:=$(call FILTER_CONFIG,ENCODER,encoder,$(LIBAV_ENCODERS))
  117. LIBAV_CONFIGURE_DECODERS:=$(call FILTER_CONFIG,DECODER,decoder,$(LIBAV_DECODERS))
  118. LIBAV_CONFIGURE_MUXERS:=$(call FILTER_CONFIG,MUXER,muxer,$(LIBAV_MUXERS))
  119. LIBAV_CONFIGURE_DEMUXERS:=$(call FILTER_CONFIG,DEMUXER,demuxer,$(LIBAV_DEMUXERS))
  120. LIBAV_CONFIGURE_PARSERS:=$(call FILTER_CONFIG,PARSER,parser,$(LIBAV_PARSERS))
  121. LIBAV_CONFIGURE_PROTOCOLS:=$(call FILTER_CONFIG,PROTOCOL,protocol,$(LIBAV_PROTOCOLS))
  122. #hack to build on mips64
  123. ifeq ($(CONFIG_CPU_TYPE),octeonplus)
  124. REAL_CPU_TYPE:=octeon+
  125. else
  126. # Strip off FPU notation
  127. REAL_CPU_TYPE:=$(firstword $(subst +, ,$(CONFIG_CPU_TYPE)))
  128. endif
  129. CONFIGURE_ARGS += \
  130. --disable-Bsymbolic \
  131. --disable-fatal-warnings \
  132. --disable-glib-asserts \
  133. --disable-gobject-cast-checks \
  134. --disable-gtk-doc-html \
  135. --disable-valgrind \
  136. --without-system-libav \
  137. --with-pic \
  138. --with-libav-extra-configure=" \
  139. $(if $(REAL_CPU_TYPE),--cpu=$(call qstrip,$(REAL_CPU_TYPE)),) \
  140. --disable-bsfs \
  141. --disable-programs \
  142. --disable-devices \
  143. --disable-debug \
  144. --disable-doc \
  145. --disable-extra-warnings \
  146. --disable-htmlpages \
  147. --disable-manpages \
  148. --disable-podpages \
  149. --disable-txtpages \
  150. --disable-runtime-cpudetect \
  151. --disable-encoders \
  152. $(LIBAV_CONFIGURE_ENCODERS) \
  153. --disable-decoders \
  154. $(LIBAV_CONFIGURE_DECODERS) \
  155. --disable-muxers \
  156. $(LIBAV_CONFIGURE_MUXERS) \
  157. --disable-demuxers \
  158. $(LIBAV_CONFIGURE_DEMUXERS) \
  159. --disable-parsers \
  160. $(LIBAV_CONFIGURE_PARSERS) \
  161. --disable-protocols \
  162. $(LIBAV_CONFIGURE_PROTOCOLS) \
  163. --disable-asm \
  164. --disable-altivec \
  165. --disable-amd3dnow \
  166. --disable-amd3dnowext \
  167. --disable-mmx \
  168. --disable-mmxext \
  169. --disable-sse \
  170. --disable-sse2 \
  171. --disable-sse3 \
  172. --disable-ssse3 \
  173. --disable-sse4 \
  174. --disable-sse42 \
  175. --disable-avx \
  176. --disable-xop \
  177. --disable-fma3 \
  178. --disable-fma4 \
  179. --disable-avx2 \
  180. --disable-inline-asm \
  181. --disable-x86asm"
  182. define Package/gst1-libav/install
  183. $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
  184. ( cd $(PKG_INSTALL_DIR); $(CP) \
  185. ./usr/lib/gstreamer-$(GST_VERSION)/libgstlibav.so* \
  186. $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  187. )
  188. endef
  189. $(eval $(call BuildPackage,gst1-libav))