Merge pull request #303 from lrusak/aarch64-odroid-c2

kodi: update Odroid_C2 patch
This commit is contained in:
Christian Hewitt 2016-05-05 12:51:58 +04:00
commit 0576e6e0e3

View File

@ -1,23 +1,46 @@
commit a1dae5b39eb3d5366d2da49e0b56c5bbeb51c8e1
Author: Owersun <owersun@gmail.com>
Date: Sat Apr 23 22:34:30 2016 +0200
From 3f3636350015d680deecb82e9793edd1b0f9cd5f Mon Sep 17 00:00:00 2001
From: Owersun <owersun@gmail.com>
Date: Sat, 23 Apr 2016 22:34:30 +0200
Subject: [PATCH] Odroids: All the codecs and display drivers
Odroids: All the codecs and display drivers
---
configure.ac | 49 +-
m4/xbmc_arch.m4 | 6 +
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp | 39 +-
.../VideoPlayer/DVDCodecs/DVDFactoryCodec.cpp | 5 +
.../cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp | 18 +-
.../DVDCodecs/Video/DVDVideoCodecMFC.cpp | 585 +++++++++++++++++++++
.../VideoPlayer/DVDCodecs/Video/DVDVideoCodecMFC.h | 64 +++
xbmc/cores/VideoPlayer/DVDCodecs/Video/Makefile.in | 5 +-
xbmc/linux/LinuxV4l2Sink.cpp | 311 +++++++++++
xbmc/linux/LinuxV4l2Sink.h | 71 +++
xbmc/linux/Makefile.in | 1 +
xbmc/utils/AMLUtils.cpp | 93 +++-
xbmc/utils/CPUInfo.cpp | 25 +-
xbmc/windowing/X11/WinSystemX11.cpp | 2 +-
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 97 +++-
xbmc/windowing/egl/EGLNativeTypeAmlogic.h | 19 +-
xbmc/windowing/egl/EGLNativeTypeFbdev.cpp | 183 +++++++
xbmc/windowing/egl/EGLNativeTypeFbdev.h | 68 +++
xbmc/windowing/egl/EGLNativeTypeHybris.cpp | 279 ++++++++++
xbmc/windowing/egl/EGLNativeTypeHybris.h | 77 +++
xbmc/windowing/egl/EGLWrapper.cpp | 14 +-
xbmc/windowing/egl/Makefile.in | 4 +
22 files changed, 1940 insertions(+), 75 deletions(-)
create mode 100644 xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecMFC.cpp
create mode 100644 xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecMFC.h
create mode 100644 xbmc/linux/LinuxV4l2Sink.cpp
create mode 100644 xbmc/linux/LinuxV4l2Sink.h
create mode 100644 xbmc/windowing/egl/EGLNativeTypeFbdev.cpp
create mode 100644 xbmc/windowing/egl/EGLNativeTypeFbdev.h
create mode 100644 xbmc/windowing/egl/EGLNativeTypeHybris.cpp
create mode 100644 xbmc/windowing/egl/EGLNativeTypeHybris.h
diff --git a/configure.ac b/configure.ac
index c4e83a2..48bfa43 100644
index 75cfc57..b3f2097 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,7 +84,7 @@ AC_DEFUN([XB_FIND_SONAME],
for path in $gcc_lib_path $env_lib_path $host_lib_path; do
lib=[`ls -- $path/lib$2.dylib 2>/dev/null`]
if test x$lib != x; then
- # we want the path/name that is embedded in the dylib
+ # we want the path/name that is embedded in the dylib
$1_FILENAME=[`otool -L $lib | grep -v lib$2.dylib | grep lib$2 | awk '{V=1; print $V}'`]
$1_SONAME=[`basename $$1_FILENAME`]
fi
@@ -218,6 +218,10 @@ libbluetooth_enabled="== libbluetooth enabled. =="
@@ -215,6 +215,10 @@ libbluetooth_enabled="== libbluetooth enabled. =="
libbluetooth_disabled="== libbluetooth disabled. Bluetooth support will not be available. =="
@ -28,16 +51,7 @@ index c4e83a2..48bfa43 100644
AC_ARG_WITH([ffmpeg],
[AS_HELP_STRING([--with-ffmpeg],
[ffmpeg options: auto (search pkg-config or auto build), force (always build ffmpeg), shared (link dynamically), path_to_ffmpeg [default=force]])],
@@ -379,7 +383,7 @@ AC_ARG_ENABLE([avahi],
[disable Avahi support (default is enabled if libavahi-common and libavahi-client is found)])],
[use_avahi=$enableval],
[use_avahi=yes])
-
+
AC_ARG_ENABLE([mdnsembedded],
[AS_HELP_STRING([--disable-mdnsembedded],
[disable mDNSEmbedded support (default is auto)])],
@@ -485,7 +489,7 @@ AC_ARG_ENABLE([breakpad],
@@ -476,7 +480,7 @@ AC_ARG_ENABLE([breakpad],
AC_ARG_ENABLE([codec],
[AS_HELP_STRING([--enable-codec],
@ -46,7 +60,7 @@ index c4e83a2..48bfa43 100644
[add_codecs=$enableval],
[add_codecs=no])
@@ -496,6 +500,13 @@ AC_ARG_ENABLE([libav-compat],
@@ -487,6 +491,13 @@ AC_ARG_ENABLE([libav-compat],
[use_libav_hacks=$enableval],
[use_libav_hacks=no])
@ -60,38 +74,22 @@ index c4e83a2..48bfa43 100644
### End of external library options
if test "x$host_vendor" != "xapple"; then
@@ -534,7 +545,7 @@ case $host in
use_gles=yes
use_optical_drive=no
use_x11=no
- build_shared_lib=yes
+ build_shared_lib=yes
@@ -622,6 +633,14 @@ case $host in
use_gl=no
USE_STATIC_FFMPEG=1
;;
i*86*-linux-gnu*|i*86*-*-linux-uclibc*)
target_platform=target_linux
@@ -794,7 +813,7 @@ elif test "$use_arch" = "arm"; then
CFLAGS="$CFLAGS -mno-apcs-stack-check"
CXXFLAGS="$CXXFLAGS -mno-apcs-stack-check"
if test "$use_tegra" = "yes"; then
- # Compile for ARMv7a architecture, need to test gcc for vfpv3-d16 support
+ # Compile for ARMv7a architecture, need to test gcc for vfpv3-d16 support
SAVE_CFLAGS="$CFLAGS"
CFLAGS="-mfpu=vfpv3-d16"
AC_COMPILE_IFELSE(
@@ -803,10 +822,10 @@ elif test "$use_arch" = "arm"; then
CXXFLAGS="$CXXFLAGS -Wno-psabi -Wa,-march=armv7a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mthumb-interwork"
use_cpu=cortex-a9],
[ CFLAGS="$SAVE_CFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork"
- CXXFLAGS="$CXXFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork"
+ CXXFLAGS="$CXXFLAGS -Wa,-march=armv6 -mtune=cortex-a8 -mthumb-interwork"
use_cpu=cortex-a8])
else
- if test "$use_neon" = "yes"; then
+ if test "$use_neon" = "yes"; then
CFLAGS="$CFLAGS -mfpu=neon -mvectorize-with-neon-quad"
CXXFLAGS="$CXXFLAGS -mfpu=neon -mvectorize-with-neon-quad"
fi
@@ -1496,6 +1515,23 @@ else
+ aarch64-*-linux-gnu*)
+ target_platform=target_linux
+ ARCH="arm64"
+ use_arch="aarch64"
+ use_joystick=no
+ use_gles=yes
+ use_gl=no
+ ;;
arm*-*linux-android*)
target_platform=target_android
CORE_SYSTEM_NAME=android
@@ -1485,6 +1504,23 @@ else
AC_MSG_NOTICE($libcap_disabled)
fi
@ -115,16 +113,7 @@ index c4e83a2..48bfa43 100644
# FFmpeg
FFMPEG_LIBNAMES="libavcodec >= 56.26.100
libavfilter >= 5.11.102
@@ -1581,7 +1617,7 @@ fi
if test "$FFMPEG_FOUND" != "true"; then
PKG_CHECK_MODULES([FFMPEG], [$FFMPEG_LIBNAMES],
- [INCLUDES="$INCLUDES $FFMPEG_CFLAGS"; LIBS="$LIBS $FFMPEG_LIBS"; FFMPEG_FOUND="true"],
+ [INCLUDES="$INCLUDES $FFMPEG_CFLAGS"; LIBS="$LIBS $FFMPEG_LIBS"; FFMPEG_FOUND="true"],
[AC_MSG_ERROR("ffmpeg not found")])
fi
@@ -1736,6 +1772,9 @@ esac
@@ -1707,6 +1743,9 @@ esac
# remember to convert commas to spaces
for codecs in `echo $add_codecs | sed 's/,/ /g'`; do
case $codecs in
@ -134,16 +123,7 @@ index c4e83a2..48bfa43 100644
*amcodec*)
AC_CHECK_HEADER([amcodec/codec_error.h],, AC_MSG_ERROR($missing_headers))
XB_ADD_CODEC([LIBAMCODEC], [amcodec], [$codecs])
@@ -2076,7 +2115,7 @@ else
fi
if test "x$use_airtunes" != "xno"; then
- final_message="$final_message\n AirTunes support (libshairplay):\tYes"
+ final_message="$final_message\n AirTunes support (libshairplay):\tYes"
else
final_message="$final_message\n AirTunes support:\tNo"
fi
@@ -2139,6 +2178,13 @@ else
@@ -2104,6 +2143,13 @@ else
final_message="$final_message\n additional codecs:\tNo"
fi
@ -157,23 +137,38 @@ index c4e83a2..48bfa43 100644
### External libraries messages
if test "$host_vendor" = "apple" ; then
@@ -2335,6 +2381,7 @@ AC_SUBST(USE_SSE4)
AC_SUBST(USE_MMAL)
@@ -2298,6 +2344,7 @@ AC_SUBST(USE_MMAL)
AC_SUBST(USE_X11)
AC_SUBST(USE_OPTICAL_DRIVE)
AC_SUBST(USE_BREAKPAD)
+AC_SUBST(USE_HYBRIS)
AC_SUBST(CROSS_COMPILING)
# pushd and popd are not available in other shells besides bash, so implement
@@ -2393,7 +2440,7 @@ XB_CONFIG_MODULE([lib/cpluff], [
--host=$host_alias \
--build=$build_alias \
--target=$target_alias CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX" LDFLAGS="$LDFLAGS" LIBS=""
- #LDFLAGS="$LDFLAGS -Wl,-read_only_relocs,suppress"
+ #LDFLAGS="$LDFLAGS -Wl,-read_only_relocs,suppress"
], [0])
XB_CONFIG_MODULE([lib/gtest], [
diff --git a/m4/xbmc_arch.m4 b/m4/xbmc_arch.m4
index fddae99..9456f9d 100644
--- a/m4/xbmc_arch.m4
+++ b/m4/xbmc_arch.m4
@@ -26,6 +26,9 @@ case $build in
arm*-*-linux-gnu*|arm*-*-linux-uclibc*)
AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
;;
+ aarch64-*-linux-gnu*)
+ AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
+ ;;
*)
AC_MSG_ERROR(unsupported native build platform: $build)
esac
@@ -63,6 +66,9 @@ case $host in
arm*-*-linux-gnu*|arm*-*-linux-uclibc*)
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
;;
+ aarch64-*-linux-gnu*)
+ AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
+ ;;
mips*-*-linux-gnu*|mips*-*-linux-uclibc*)
AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX")
;;
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index 95db8cf..420a6d3 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@ -292,10 +287,10 @@ index 95db8cf..420a6d3 100644
* handles
*/
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/DVDFactoryCodec.cpp b/xbmc/cores/VideoPlayer/DVDCodecs/DVDFactoryCodec.cpp
index 355257c..c6eccca 100644
index 5206cfa..c73457b 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/DVDFactoryCodec.cpp
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/DVDFactoryCodec.cpp
@@ -45,6 +45,9 @@
@@ -41,6 +41,9 @@
#include "Video/DVDVideoCodecAndroidMediaCodec.h"
#include "platform/android/activity/AndroidFeatures.h"
#endif
@ -305,7 +300,7 @@ index 355257c..c6eccca 100644
#include "Audio/DVDAudioCodecFFmpeg.h"
#include "Audio/DVDAudioCodecPassthrough.h"
#include "Overlay/DVDOverlayCodecSSA.h"
@@ -158,6 +161,8 @@ CDVDVideoCodec* CDVDFactoryCodec::CreateVideoCodec(CDVDStreamInfo &hint, CProces
@@ -152,6 +155,8 @@ CDVDVideoCodec* CDVDFactoryCodec::CreateVideoCodec(CDVDStreamInfo &hint, CProces
pCodec = OpenCodec(new CDVDVideoCodecOpenMax(processInfo), hint, options);
#elif defined(HAS_MMAL)
pCodec = OpenCodec(new CMMALVideo(processInfo), hint, options);
@ -1058,10 +1053,10 @@ index 0000000..679cf8c
+ bool OpenDevices();
+};
diff --git a/xbmc/cores/VideoPlayer/DVDCodecs/Video/Makefile.in b/xbmc/cores/VideoPlayer/DVDCodecs/Video/Makefile.in
index a1a3447..600f7d0 100644
index 1bf5a89..46f7cc9 100644
--- a/xbmc/cores/VideoPlayer/DVDCodecs/Video/Makefile.in
+++ b/xbmc/cores/VideoPlayer/DVDCodecs/Video/Makefile.in
@@ -36,8 +36,11 @@ ifeq (@USE_MMAL@,1)
@@ -34,8 +34,11 @@ ifeq (@USE_MMAL@,1)
SRCS += MMALCodec.cpp MMALFFmpeg.cpp
endif
@ -1469,7 +1464,7 @@ index 0000000..d04d52d
+ bool DequeueBuffer(v4l2_buffer *buffer);
+};
diff --git a/xbmc/linux/Makefile.in b/xbmc/linux/Makefile.in
index 744fd06..94ee9eb 100644
index 0cf90d1..ff2c2dc 100644
--- a/xbmc/linux/Makefile.in
+++ b/xbmc/linux/Makefile.in
@@ -12,6 +12,7 @@ SRCS += XFileUtils.cpp