找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 8761|回复: 13

gmediarender编译

[复制链接]
刚刚看了 https://www.right.com.cn/forum/forum.php?mod=viewthread&tid=135975 感觉很有意思,闲的无事搞了一下,结论是在X86 BB上成功,在X86 CC上不成功(CC的gstreamer位置变了,gmediarender找不到他,好事者可以试试。)。
作者git地址。https://github.com/hzeller/gmrender-resurrect。最近跟新日期是2014年3月2日。

制作方法(本文所提源码非本人原创,只修改了下makefile)。
1、在bb/feeds/oldpackages/multimedia目录下建立gmediarender目录
2、讲makefile文件复制进去。makefile文件源码如下。

  1. #
  2. # Copyright (C) 2013 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:=gmediarender
  9. PKG_VERSION:=2014-03-02
  10. PKG_RELEASE=1

  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://github.com/hzeller/gmrender-resurrect.git
  13. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz

  15. PKG_FIXUP:=autoreconf
  16. PKG_INSTALL=1
  17. PKG_REMOVE_FILES:=autogen.sh aclocal.m4

  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/nls.mk

  20. define Package/gmediarender
  21.   SECTION:=multimedia
  22.   CATEGORY:=Multimedia
  23.   DEPENDS:= +gstreamer +glib2 +libupnp
  24.   TITLE:=A Headless UPnP Renderer
  25. endef

  26. define Package/gmediarender/description
  27.   gmediarender implements the server component that provides UPnP
  28.   controllers a means to render media content (audio, video and images)
  29.   from a UPnP media server.
  30. endef

  31. CONFIGURE_ARGS+= \
  32.         --with-build-cc="$(HOSTCC)" \
  33.         --prefix="\usr"

  34. define Package/gmediarender/install
  35.         $(INSTALL_DIR) $(1)/usr/sbin
  36.         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/sbin/
  37.         $(INSTALL_DIR) $(1)/etc/init.d
  38.         $(CP)                    $(PKG_BUILD_DIR)/scripts/init.d/$(PKG_NAME)er $(1)/etc/init.d/$(PKG_NAME)
  39. endef

  40. $(eval $(call BuildPackage,gmediarender))
复制代码
3、在gmediarender目录下建立patches目录,目录内建一个文件:000-add-std-c99-option.patch,该文件源码如下:
  1. --- a/configure.ac
  2. +++ b/configure.ac
  3. @@ -20,7 +20,7 @@ EXTRA_GCC_DEBUG_CXXFLAGS=""
  4. if test -n "$GCC"; then
  5.     EXTRA_GCC_DEBUG_CFLAGS="$CFLAGS"
  6.     EXTRA_GCC_DEBUG_CXXFLAGS="$CXXFLAGS"
  7. -   CFLAGS="-Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Wwrite-strings"
  8. +   CFLAGS="-Wall -Wpointer-arith -Wmissing-prototypes -Wmissing-declarations -Wwrite-strings -std=c99"
  9.     CXXFLAGS="-Wall -Wpointer-arith"
  10. fi  

复制代码
4、执行 ./scripts/feeds update -a
5、执行./scripts/feeds install -a
6、执行make menuconfig
7、在多媒体内选择gmediarender。以及声卡、alsa-utils3个选项,usb声卡的话最好在选择一个usbutils,看USB设备挂载情况。
8、执行 make V=99 -j4

现在主流机器的声卡都是HDA了,menuconfig里默认没有配置,虽然内核里有配置。这里转发一个论坛lean明月的HDA配置。
把下面的代码贴到package/kernel/linux/modules/sound.mk(此地址和内核版本有关系,这里是BB的地址,lean的地址不带红色部分)最后就可以了,无需更新,在menuconfig-kernel-sound里可以看到。
  1. define KernelPackage/snd-hda-intel
  2.   TITLE:=Intel HD Audio
  3.   KCONFIG:=CONFIG_SND_HDA_INTEL \
  4.            CONFIG_SND_HDA_INPUT_BEEP \
  5.            CONFIG_SND_HDA_INPUT_JACK
  6.   FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-intel.ko \
  7.           $(LINUX_DIR)/sound/pci/hda/snd-hda-codec.ko
  8.   AUTOLOAD:=$(call AutoLoad,65,snd-hda-codec snd-hda-intel)
  9.   #DEPENDS:=
  10.   $(call AddDepends/sound)
  11. endef

  12. define KernelPackage/snd-hda-intel/description
  13. Support for Intel "High Definition Audio" (Azalia) and its compatible devices.
  14. endef

  15. $(eval $(call KernelPackage,snd-hda-intel))

  16. define KernelPackage/snd-hda-codec-realtek
  17.   TITLE:=Build Realtek HD-audio codec support
  18.   KCONFIG:=CONFIG_SND_HDA_CODEC_REALTEK
  19.   FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-realtek.ko
  20.   AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-realtek)
  21.   DEPENDS:=+kmod-snd-hda-intel
  22.   $(call AddDepends/sound)
  23. endef

  24. $(eval $(call KernelPackage,snd-hda-codec-realtek))

  25. define KernelPackage/snd-hda-codec-analog
  26.   TITLE:=Build Analog Device HD-audio codec support
  27.   KCONFIG:=CONFIG_SND_HDA_CODEC_ANALOG
  28.   FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-analog.ko
  29.   AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-analog)
  30.   DEPENDS:=+kmod-snd-hda-intel
  31.   $(call AddDepends/sound)
  32. endef

  33. $(eval $(call KernelPackage,snd-hda-codec-analog))

  34. define KernelPackage/snd-hda-codec-idt
  35.   TITLE:=Build IDT/Sigmatel HD-audio codec support
  36.   KCONFIG:=CONFIG_SND_HDA_CODEC_SIGMATEL
  37.   FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-idt.ko
  38.   AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-idt)
  39.   DEPENDS:=+kmod-snd-hda-intel
  40.   $(call AddDepends/sound)
  41. endef

  42. $(eval $(call KernelPackage,snd-hda-codec-idt))

  43. define KernelPackage/snd-hda-codec-via
  44.   TITLE:=Build VIA HD-audio codec support
  45.   KCONFIG:=CONFIG_SND_HDA_CODEC_VIA
  46.   FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-via.ko
  47.   AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-via)
  48.   DEPENDS:=+kmod-snd-hda-intel
  49.   $(call AddDepends/sound)
  50. endef

  51. $(eval $(call KernelPackage,snd-hda-codec-via))

  52. define KernelPackage/snd-hda-codec-hdmi
  53.   TITLE:=Build HDMI/DisplayPort HD-audio codec support
  54.   KCONFIG:=CONFIG_SND_HDA_CODEC_HDMI
  55.   FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-hdmi.ko
  56.   AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-hdmi)
  57.   DEPENDS:=+kmod-snd-hda-intel
  58.   $(call AddDepends/sound)
  59. endef

  60. $(eval $(call KernelPackage,snd-hda-codec-hdmi))

  61. define KernelPackage/snd-hda-codec-cirrus
  62.   TITLE:=Build Cirrus Logic codec support
  63.   KCONFIG:=CONFIG_SND_HDA_CODEC_CIRRUS
  64.   FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-cirrus.ko
  65.   AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-cirrus)
  66.   DEPENDS:=+kmod-snd-hda-intel
  67.   $(call AddDepends/sound)
  68. endef

  69. $(eval $(call KernelPackage,snd-hda-codec-cirrus))

  70. define KernelPackage/snd-hda-codec-cirrus
  71.   TITLE:=Build Cirrus Logic codec support
  72.   KCONFIG:=CONFIG_SND_HDA_CODEC_CIRRUS
  73.   FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-cirrus.ko
  74.   AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-cirrus)
  75.   DEPENDS:=+kmod-snd-hda-intel
  76.   $(call AddDepends/sound)
  77. endef

  78. $(eval $(call KernelPackage,snd-hda-codec-cirrus))

  79. define KernelPackage/snd-hda-codec-conexant
  80.   TITLE:=Build Conexant HD-audio codec support
  81.   KCONFIG:=CONFIG_SND_HDA_CODEC_CONEXANT
  82.   FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-conexant.ko
  83.   AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-conexant)
  84.   DEPENDS:=+kmod-snd-hda-intel
  85.   $(call AddDepends/sound)
  86. endef

  87. $(eval $(call KernelPackage,snd-hda-codec-conexant))

  88. define KernelPackage/snd-hda-codec-ca0110
  89.   TITLE:=Build Creative CA0110-IBG HD-audio codec support
  90.   KCONFIG:=CONFIG_SND_HDA_CODEC_CA0110
  91.   FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-ca0110.ko
  92.   AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-ca0110)
  93.   DEPENDS:=+kmod-snd-hda-intel
  94.   $(call AddDepends/sound)
  95. endef

  96. $(eval $(call KernelPackage,snd-hda-codec-ca0110))

  97. define KernelPackage/snd-hda-codec-cmedia
  98.   TITLE:=Build C-Media HD-audio codec support
  99.   KCONFIG:=CONFIG_SND_HDA_CODEC_CMEDIA
  100.   FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-cmedia.ko
  101.   AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-cmedia)
  102.   DEPENDS:=+kmod-snd-hda-intel
  103.   $(call AddDepends/sound)
  104. endef

  105. $(eval $(call KernelPackage,snd-hda-codec-cmedia))

  106. define KernelPackage/snd-hda-codec-si3054
  107.   TITLE:=Build Silicon Labs 3054 HD-modem codec support
  108.   KCONFIG:=CONFIG_SND_HDA_CODEC_SI3054
  109.   FILES:= $(LINUX_DIR)/sound/pci/hda/snd-hda-codec-si3054.ko
  110.   AUTOLOAD:=$(call AutoLoad,70,snd-hda-codec-si3054)
  111.   DEPENDS:=+kmod-snd-hda-intel
  112.   $(call AddDepends/sound)
  113. endef

  114. $(eval $(call KernelPackage,snd-hda-codec-si3054))
复制代码


最后要说的是,这玩意怎么玩呀。。。。。。。。。谁写个教程,我提供程序。
 楼主| | 显示全部楼层
本帖最后由 mike22437120 于 2015-2-15 17:12 编辑

百度云 X86 BB VM虚拟机镜像 链接:http://pan.baidu.com/s/1gdiXHNt 密码:h1sq
VM的默认声卡是创新PCI的,menuconfig里没有只能在kernel menuconfig里添加。带vm声卡的镜像,因为声卡添加的多,启动要慢20秒。
链接:http://pan.baidu.com/s/1eQ5uxvO 密码:9mmh  用户名和密码都是root
回复

使用道具 举报

这个不错,,额可以玩玩。。。。
回复

使用道具 举报

 楼主| | 显示全部楼层
hades2014 发表于 2015-2-15 16:36
这个不错,,额可以玩玩。。。。

重新下载个VM 跟新了驱动
回复

使用道具 举报

参考https://www.right.com.cn/forum/f ... d=133226&page=1
劳烦编译一下CPU AR9331 WR740Nv4和WR720N固件,谢谢
回复

使用道具 举报

我擦。大神啊我一直想要X86版本的自己不会弄,谢谢你
回复

使用道具 举报

 楼主| | 显示全部楼层
1718922 发表于 2015-2-15 19:01
参考https://www.right.com.cn/forum/forum.php?mod=viewthread&tid=133226&page=1
劳烦编译一下CPU AR9331 ...

链接:http://pan.baidu.com/s/1bnzuSpD 密码:rzjx
回复

使用道具 举报

本帖最后由 1718922 于 2015-2-16 18:25 编辑

LZ如有时间的话还是将固件编译成bin格式方便刷入.我用MW155R刷的WR703N的固件用做音乐播放(目前用酷狗,BlubbleUpnp虽好但限制较多,QQ音乐使用Qplay协议无法使用),想多要个LAN口与其它设备链接,谢谢!
有兴趣参考一下:
https://www.right.com.cn/forum/thread-153165-1-1.html
http://my.oschina.net/osbin/blog/310308
回复

使用道具 举报

我在一个废旧但是还能用的安卓手机上装 UPnPlay, 感觉比Bubble、酷狗等好用。
回复

使用道具 举报

daniel062 发表于 2015-2-16 18:42
我在一个废旧但是还能用的安卓手机上装 UPnPlay, 感觉比Bubble、酷狗等好用。

我们需要的并不是简单的本地推送,还要能直接推送保存在网盘上的无损音乐,在这方面BubbleUpnp可以完成,但它需要授权,再则不知道是不是使用不当APE格式无法播放.
回复

使用道具 举报

楼主能编译一个mt7688上的版本吗?我是新手,刚接触openwrt,gmediarender编译了好久都没有编译过,还请您指导一下,在此感谢!
回复

使用道具 举报

请问,你移植的gmediarender可以在局域网内使用吗?就是手机不直连它,而是和它都连接同一个路由器。然后再通过手机推送,可以吗?
回复

使用道具 举报

楼主试过在 cc下面能用了没?
回复

使用道具 举报

本帖最后由 hb973 于 2017-5-9 01:43 编辑

CC上编译,DEPENDS:= +gstreamer +glib2 +libupnp修改为DEPENDS:= +gstreamer1 +glib2 +libupnp
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-5-9 01:51

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表