kodi: allow enablement of libamcodec as codec if selected
PATCH v5 1/1 kodi: allow enablement of libamcodec as codec if selected
allow usage of amcodec if kodi is built and libamcodec is selected
---
v4 -> v5:
- add description and signed off to the kodi patch. (Thomas Petazzoni).
v3 -> v4:
- properly define the includes for amcodec when cross compiling.
v2 -> v3:
- fix change after kodi.mk was changed.
v1 -> v2:
- fixed mail title and comment
.../0012-support_libamcodec_cross_compile.patch | 24 ++++++++++++++++++++++ package/kodi/kodi.mk | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 package/kodi/0012-support_libamcodec_cross_compile.patch
package/kodi/0012-support_libamcodec_cross_compile.patch new file +24 -0
@@ -0,0 +1,24 @@ +kodi: fix amcodec includes for cross compilation. + +when building kodi over buildroot with amcodec set, the include paths differs from +native installation. this occurs because the prefix is not set. +so by supplying the LIBAMCODEC_INCLUDE_PATH upon compilation, this issue is resolved. + +Signed-off-by: Dagg Stompler <[email protected]> + +--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in 2016-11-04 11:46:19.000000000 +0200 ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in 2016-11-04 11:47:13.000000000 +0200 +@@ -26,8 +26,11 @@ endif + ifeq (@USE_LIBAMCODEC@,1) + SRCS += AMLCodec.cpp + SRCS += DVDVideoCodecAmlogic.cpp +-INCLUDES += -I$(prefix)/include/amcodec +-INCLUDES += -I$(prefix)/include/amplayer ++ifeq (${LIBAMCODEC_INCLUDE_PATH},) ++LIBAMCODEC_INCLUDE_PATH=$(prefix) ++endif ++INCLUDES += -I${LIBAMCODEC_INCLUDE_PATH}/include/amcodec ++INCLUDES += -I${LIBAMCODEC_INCLUDE_PATH}/include/amplayer + endif + + ifeq (@USE_ANDROID@,1)
package/kodi/kodi.mk +4 -0
@@ -111,6 +111,10 @@ endif ifeq ($(BR2_PACKAGE_IMX_VPUWRAP),y) KODI_DEPENDENCIES += imx-vpuwrap KODI_CONF_OPTS += --enable-codec=imxvpu +else ifeq ($(BR2_PACKAGE_LIBAMCODEC),y) +KODI_DEPENDENCIES += libamcodec +KODI_CONF_OPTS += --enable-codec=amcodec +KODI_MAKE_OPTS += LIBAMCODEC_INCLUDE_PATH=${STAGING_DIR}/usr endif ifeq ($(BR2_PACKAGE_LIBCAP),y)
Signature · 1 line
2.10.2
PATCH v5 1/1 kodi: allow enablement of libamcodec as codec if selected
Hello,
Quoted 3 lines · Dagg Stompler
allow usage of amcodec if kodi is built and libamcodec is selected
Signed-off-by Dagg Stompler <[email protected]>
Thanks for the new iteration. However, I believe there's a better/simpler way to achieve this.
Quoted 18 lines
package/kodi/0012-support_libamcodec_cross_compile.patch new file +12
-0@@ -0,0 +1,24 @@ +kodi: fix amcodec includes for cross compilation. + +when building kodi over buildroot with amcodec set, the include paths differs from +native installation. this occurs because the prefix is not set. +so by supplying the LIBAMCODEC_INCLUDE_PATH upon compilation, this issue is resolved. + +Signed-off-by: Dagg Stompler <[email protected]> + +--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in 2016-11-04 11:46:19.000000000 +0200 ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in 2016-11-04 11:47:13.000000000 +0200 +@@ -26,8 +26,11 @@ endif + ifeq (@USE_LIBAMCODEC@,1)
package/kodi/0012-support_libamcodec_cross_compile.patch line 22
Quoted 10 lines
package/kodi/0012-support_libamcodec_cross_compile.patch new file +10
-0+ SRCS += AMLCodec.cpp + SRCS += DVDVideoCodecAmlogic.cpp +-INCLUDES += -I$(prefix)/include/amcodec +-INCLUDES += -I$(prefix)/include/amplayer ++ifeq (${LIBAMCODEC_INCLUDE_PATH},) ++LIBAMCODEC_INCLUDE_PATH=$(prefix) ++endif ++INCLUDES += -I${LIBAMCODEC_INCLUDE_PATH}/include/amcodec ++INCLUDES += -I${LIBAMCODEC_INCLUDE_PATH}/include/amplayer + endif
Just have a patch that deletes those two lines:
package/kodi/0012-support_libamcodec_cross_compile.patch
Quoted 7 lines
package/kodi/0012-support_libamcodec_cross_compile.patch new file +6
-0+-INCLUDES += -I$(prefix)/include/amcodec +-INCLUDES += -I$(prefix)/include/amplayer +else ifeq ($(BR2_PACKAGE_LIBAMCODEC),y) +KODI_DEPENDENCIES += libamcodec +KODI_CONF_OPTS += --enable-codec=amcodec +KODI_MAKE_OPTS += LIBAMCODEC_INCLUDE_PATH=${STAGING_DIR}/usr
And, then, something like this (it includes reworking existing RPi related code):
ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)KODI_DEPENDENCIES += rpi-userlandKODI_CONF_OPTS += --with-platform=raspberry-pi --enable-player=omxplayer
KODI_INCLUDES += \ -I$(STAGING_DIR)/usr/include/interface/vcos/pthreads \ -I$(STAGING_DIR)/usr/include/interface/vmcs_host/linux
KODI_LIBS += -lvcos -lvchostif
endif
...
else ifeq ($(BR2_PACKAGE_LIBAMCODEC),y)KODI_DEPENDENCIES += libamcodecKODI_CONF_OPTS += --enable-codec=amcodec
KODI_INCLUDES += \ $(STAGING_DIR)/usr/include/amcodec \ $(STAGING_DIR)/usr/include/amplayer
endif
KODI_CONF_ENV += \ INCLUDES="$(KODI_INCLUDES)" \ LIBS="$(KODI_LIBS)"
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v5 1/1 kodi: allow enablement of libamcodec as codec if selected
Greetings Thomas,
Quoted 71 lines
Sent: Saturday, November 05, 2016 at 2:16 PM
From: "Thomas Petazzoni" <[email protected]>
To: "Dagg Stompler" <[email protected]>
Cc: buildroot at buildroot.org
Subject: Re: [Buildroot] [PATCH v5] kodi: allow enablement of libamcodec as codec if selectedHello,
Quoted 3 lines · Dagg Stompler
allow usage of amcodec if kodi is built and libamcodec is selected
Signed-off-by Dagg Stompler <[email protected]>Thanks for the new iteration. However, I believe there's a better/simpler way to achieve this.
Quoted 18 lines
package/kodi/0012-support_libamcodec_cross_compile.patch new file +12
-0@@ -0,0 +1,24 @@ +kodi: fix amcodec includes for cross compilation. + +when building kodi over buildroot with amcodec set, the include paths differs from +native installation. this occurs because the prefix is not set. +so by supplying the LIBAMCODEC_INCLUDE_PATH upon compilation, this issue is resolved. + +Signed-off-by: Dagg Stompler <[email protected]> + +--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in 2016-11-04 11:46:19.000000000 +0200 ++++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in 2016-11-04 11:47:13.000000000 +0200 +@@ -26,8 +26,11 @@ endif + ifeq (@USE_LIBAMCODEC@,1)package/kodi/0012-support_libamcodec_cross_compile.patch line 22
Quoted 10 lines
package/kodi/0012-support_libamcodec_cross_compile.patch new file +10
-0+ SRCS += AMLCodec.cpp + SRCS += DVDVideoCodecAmlogic.cpp +-INCLUDES += -I$(prefix)/include/amcodec +-INCLUDES += -I$(prefix)/include/amplayer ++ifeq (${LIBAMCODEC_INCLUDE_PATH},) ++LIBAMCODEC_INCLUDE_PATH=$(prefix) ++endif ++INCLUDES += -I${LIBAMCODEC_INCLUDE_PATH}/include/amcodec ++INCLUDES += -I${LIBAMCODEC_INCLUDE_PATH}/include/amplayer + endifJust have a patch that deletes those two lines:
package/kodi/0012-support_libamcodec_cross_compile.patch
Quoted 7 lines
package/kodi/0012-support_libamcodec_cross_compile.patch new file +6
-0+-INCLUDES += -I$(prefix)/include/amcodec +-INCLUDES += -I$(prefix)/include/amplayer +else ifeq ($(BR2_PACKAGE_LIBAMCODEC),y) +KODI_DEPENDENCIES += libamcodec +KODI_CONF_OPTS += --enable-codec=amcodec +KODI_MAKE_OPTS += LIBAMCODEC_INCLUDE_PATH=${STAGING_DIR}/usrAnd, then, something like this (it includes reworking existing RPi related code):
ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
KODI_DEPENDENCIES+= rpi-userlandKODI_CONF_OPTS+= --with-platform=raspberry-pi --enable-player=omxplayerKODI_INCLUDES += \ -I$(STAGING_DIR)/usr/include/interface/vcos/pthreads \ -I$(STAGING_DIR)/usr/include/interface/vmcs_host/linux
KODI_LIBS+= -lvcos -lvchostif
endif...
else ifeq ($(BR2_PACKAGE_LIBAMCODEC),y)KODI_DEPENDENCIES+= libamcodecKODI_CONF_OPTS+= --enable-codec=amcodec
Quoted 9 lines
KODI_INCLUDES += \ $(STAGING_DIR)/usr/include/amcodec \ $(STAGING_DIR)/usr/include/amplayerendif
KODI_CONF_ENV += \ INCLUDES="$(KODI_INCLUDES)" \ LIBS="$(KODI_LIBS)"
imho, this might be the simpler way but isn't the right way for kodi 16 as there is an existing code for it. that said, in kodi 17 the code has changed and the submitted patch isn't relevant anymore. I'll try the kodi 17 fix on the current latest git, if it works I'll submit it to the list.
Dagg.
Quoted 8 lines
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com