Skip to contentSkip to conversation

libamcodec: New Package

PATCH Superseded Dagg Stompler 3 participants 5 messages Jun 10, 2016 – Jun 25, 2016

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 libamcodec: New Package

v1 -> v2:
- add licesne type.
- patch is snow in git form.
- fix comment.
- removed #.

---
 package/Config.in                                  |  1 +
 ...-fix-makefiles-to-allow-cross-compilation.patch | 96 ++++++++++++++++++++++
 package/libamcodec/Config.in                       | 13 +++
 package/libamcodec/libamcodec.hash                 |  2 +
 package/libamcodec/libamcodec.mk                   | 34 ++++++++
 5 files changed, 146 insertions(+)
 create mode 100644 package/libamcodec/0001-libamcodec-fix-makefiles-to-allow-cross-compilation.patch
 create mode 100644 package/libamcodec/Config.in
 create mode 100644 package/libamcodec/libamcodec.hash
 create mode 100644 package/libamcodec/libamcodec.mk
package/Config.in +1 -0
index 6c6a562..0a56070 100644
@@ -1074,6 +1074,7 @@ endmenu
 
 menu "Multimedia"
 	source "package/bitstream/Config.in"
+	source "package/libamcodec/Config.in"
 	source "package/libass/Config.in"
 	source "package/libbluray/Config.in"
 	source "package/libdcadec/Config.in"
package/libamcodec/0001-libamcodec-fix-makefiles-to-allow-cross-compilation.patch new file +96 -0

96 lines not on this page · raw message

package/libamcodec/Config.in new file +13 -0
new file mode 100644
index 0000000..52778ba
@@ -0,0 +1,13 @@
+comment "libamcodec needs a toolchain w/ threads"
+	depends on BR2_arm || BR2_aarch64
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
+config BR2_PACKAGE_LIBAMCODEC
+	bool "libamcodec"
+	depends on BR2_arm || BR2_aarch64
+	depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
+	select BR2_PACKAGE_ALSA_LIB
+	help
+	    Interface library for Amlogic media codecs
+
+	    https://github.com/mdrjr/c2_aml_libs.git
package/libamcodec/libamcodec.hash new file +2 -0
new file mode 100644
index 0000000..f199c17
@@ -0,0 +1,2 @@
+# Locally computed hash
+sha256 44580255c63bde1544b1376bc8d33f73ef0c634afda5065455a01b77f6e2729b  libamcodec-ed1d8b8c54b05c1a02a8ee44c59744e4cbed3d8d.tar.gz
package/libamcodec/libamcodec.mk new file +34 -0
new file mode 100644
index 0000000..065ef28
@@ -0,0 +1,34 @@
+################################################################################
+#
+# libamcodec
+#
+################################################################################
+
+LIBAMCODEC_VERSION = ed1d8b8c54b05c1a02a8ee44c59744e4cbed3d8d
+LIBAMCODEC_SITE = $(call github,mdrjr,c2_aml_libs,$(LIBAMCODEC_VERSION))
+LIBAMCODEC_DEPENDENCIES = alsa-lib
+LIBAMCODEC_LICENSE = Unclear
+
+# This package uses the M_PREFIX or PREFIX variables to construct the header and
+# library paths used when compiling
+define LIBAMCODEC_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/amavutils M_PREFIX="$(STAGING_DIR)/usr"
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/amadec M_PREFIX="$(STAGING_DIR)/usr"
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/amcodec PREFIX="$(STAGING_DIR)"
+endef
+
+define LIBAMCODEC_INSTALL_STAGING_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/amavutils/libamavutils.so $(STAGING_DIR)/usr/lib/libamavutils.so
+	$(INSTALL) -D -m 0555 $(@D)/amadec/libamadec.so $(STAGING_DIR)/usr/lib/libamadec.so
+	$(INSTALL) -D -m 0555 $(@D)/amcodec/libamcodec.so $(STAGING_DIR)/usr/lib/libamcodec.so
+	mkdir -p $(STAGING_DIR)/usr/include/amcodec
+	cp -rf $(@D)/amcodec/include/* $(STAGING_DIR)/usr/include/amcodec
+endef
+
+define LIBAMCODEC_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/amavutils/libamavutils.so $(TARGET_DIR)/usr/lib/libamavutils.so
+	$(INSTALL) -D -m 0555 $(@D)/amadec/libamadec.so $(TARGET_DIR)/usr/lib/libamadec.so
+	$(INSTALL) -D -m 0555 $(@D)/amcodec/libamcodec.so $(TARGET_DIR)/usr/lib/libamcodec.so
+endef
+									    
+$(eval $(generic-package))
Signature · 1 line
2.8.4
#1 lore raw

PATCH v2 2/2 kodi: enable optional dependency on libamcodec

This is based on what LibreELEC is doing.

v1 -> v2:
- fixed mail title and comment

---
 package/kodi/kodi.mk | 3 +++
 1 file changed, 3 insertions(+)
package/kodi/kodi.mk +3 -0
index e163c24..d0b2c22 100644
@@ -56,6 +56,9 @@ endif
 ifeq ($(BR2_PACKAGE_LIBFSLVPUWRAP),y)
 KODI_DEPENDENCIES += libfslvpuwrap
 KODI_CONF_OPTS += --enable-codec=imxvpu
+else ifeq ($(BR2_PACKAGE_LIBAMCODEC),y)
+KODI_DEPENDENCIES += libamcodec
+KODI_CONF_OPTS += --enable-codec=amcodec
 endif
 
 ifeq ($(BR2_PACKAGE_LIBCAP),y)
Signature · 1 line
2.8.4
#2 lore raw

PATCH v2 2/2 kodi: enable optional dependency on libamcodec

Am Fri, 10 Jun 2016 14:51:51 +0300 schrieb Dagg Stompler:

package/kodi/kodi.mk endif · line 61

Quoted 3 lines
package/kodi/kodi.mk +3 -0
+else ifeq ($(BR2_PACKAGE_LIBAMCODEC),y)
+KODI_DEPENDENCIES += libamcodec
+KODI_CONF_OPTS += --enable-codec=amcodec

Hi,

did you find out whether this option is necessary in the future?
http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/150321

Regards, Bernd

author
#3 lore raw

PATCH v2 2/2 kodi: enable optional dependency on libamcodec

Greetings,

Quoted 8 lines

Am Fri, 10 Jun 2016 14:51:51 +0300 schrieb Dagg Stompler:

package/kodi/kodi.mk endif · line 61

Quoted 3 lines
package/kodi/kodi.mk +3 -0
+else ifeq ($(BR2_PACKAGE_LIBAMCODEC),y)
+KODI_DEPENDENCIES += libamcodec
+KODI_CONF_OPTS += --enable-codec=amcodec

Hi,

Quoted 5 lines

did you find out whether this option is necessary in the future?
http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/150321

Regards, Bernd

not sure I follow, the change described here is regarding andorid. unless I'm mistaken, my change only affects linux.
am I wrong?

Dagg.

#4 lore raw

PATCH v2 2/2 kodi: enable optional dependency on libamcodec

Daggs, Bernd;

Quoted 2 lines · daggs

the change described here is regarding andorid.
unless I'm mistaken

I believe you are correct. Examining the commit [1] shows that the change is really Android specific (whether or not the merge's description [2] doesn't indicate so).

[1]: https://github.com/xbmc/xbmc/pull/9688/commits/1015c480966d786eb050ce3d3701cdbf5231d1f5
[2]: https://github.com/xbmc/xbmc/pull/9688