Permalink
Browse files

Merge remote-tracking branch 'origin/adddroidlibstagefright' into Got…

…ham_alpha2_stagefright
  • Loading branch information...
2 parents 194c408 + b5bc8f1 commit 6200f76b32ce1b13055d751272f2d4326d23a784 @koying committed Apr 3, 2013
Showing with 3,110 additions and 14 deletions.
  1. +22 −0 configure.in
  2. +5 −1 language/English/strings.po
  3. +4 −0 tools/depends/target/Makefile
  4. +62 −0 tools/depends/target/android-sources-ics/Makefile
  5. +43 −0 tools/depends/target/android-sources-ics/libbinder.cpp
  6. +25 −0 tools/depends/target/android-sources-ics/libcutils.c
  7. +32 −0 tools/depends/target/android-sources-ics/libgui.cpp
  8. +381 −0 tools/depends/target/android-sources-ics/libstagefright.cpp
  9. +37 −0 tools/depends/target/android-sources-ics/libui.cpp
  10. +333 −0 tools/depends/target/android-sources-ics/libutils.cpp
  11. +108 −3 xbmc/android/activity/XBMCApp.cpp
  12. +36 −1 xbmc/android/activity/XBMCApp.h
  13. +3 −3 xbmc/android/activity/android_main.cpp
  14. +234 −1 xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
  15. +16 −3 xbmc/cores/VideoRenderers/LinuxRendererGLES.h
  16. +1 −0 xbmc/cores/VideoRenderers/RenderFormats.h
  17. +5 −0 xbmc/cores/VideoRenderers/RenderManager.cpp
  18. +36 −2 xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp
  19. +7 −0 xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h
  20. +201 −0 xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecStageFright.cpp
  21. +55 −0 xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecStageFright.h
  22. +14 −0 xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in
  23. +1,337 −0 xbmc/cores/dvdplayer/DVDCodecs/Video/StageFrightVideo.cpp
  24. +54 −0 xbmc/cores/dvdplayer/DVDCodecs/Video/StageFrightVideo.h
  25. +3 −0 xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
  26. +20 −0 xbmc/settings/AdvancedSettings.cpp
  27. +12 −0 xbmc/settings/AdvancedSettings.h
  28. +3 −0 xbmc/settings/GUISettings.cpp
  29. +12 −0 xbmc/windowing/egl/EGLWrapper.cpp
  30. +2 −0 xbmc/windowing/egl/EGLWrapper.h
  31. +5 −0 xbmc/windowing/egl/WinSystemEGL.cpp
  32. +2 −0 xbmc/windowing/egl/WinSystemEGL.h
View
@@ -392,6 +392,12 @@ AC_ARG_ENABLE([ffmpeg_libvorbis],
[use_ffmpeg_libvorbis=$enableval],
[use_ffmpeg_libvorbis=no])
+AC_ARG_ENABLE([libstagefright],
+ [AS_HELP_STRING([--enable-libstagefright],
+ [enable libstagefright-based HW accelerated decoding 'Android only' (default is no)])],
+ [use_libstagefright=$enableval],
+ [use_libstagefright=no])
+
AC_ARG_ENABLE([dvdcss],
[AS_HELP_STRING([--enable-dvdcss],
[enable DVDCSS support (default is yes)])],
@@ -651,6 +657,7 @@ case $host in
use_optical_drive=no
use_sdl=no
use_x11=no
+ use_libstagefright=yes
build_shared_lib=yes
;;
*)
@@ -1841,6 +1848,14 @@ else
fi
fi
+# libStageFright
+if test "$target_platform" = "target_android" ; then
+ if test "$use_libstagefright" = "yes"; then
+ USE_LIBSTAGEFRIGHT=1; AC_DEFINE([HAVE_LIBSTAGEFRIGHT],[1],["Define to 1 if libstagefright is enabled"])
+ LIBS+="-L${prefix}/opt/android-libs -lstdc++ -lutils -lcutils -lstagefright -lbinder -lui -lgui"
+ fi
+fi
+
# yajl version check (yajl_version.h was added in yajl 2.0)
AC_CHECK_HEADERS([yajl/yajl_version.h], [], [
AC_DEFINE(YAJL_MAJOR, 1, [yajl version 1])
@@ -2005,6 +2020,12 @@ else
final_message="$final_message\n OpenMax:\tNo"
fi
+if test "$use_libstagefright" != "no"; then
+ final_message="$final_message\n libstagefright:\tYes"
+else
+ final_message="$final_message\n libstagefright:\tNo"
+fi
+
if test "$use_joystick" = "yes"; then
final_message="$final_message\n Joystick:\tYes"
SDL_DEFINES="$SDL_DEFINES -DHAS_SDL_JOYSTICK"
@@ -2456,6 +2477,7 @@ AC_SUBST(USE_LIBAFPCLIENT)
AC_SUBST(USE_AIRPLAY)
AC_SUBST(USE_VDA)
AC_SUBST(USE_OPENMAX)
+AC_SUBST(USE_LIBSTAGEFRIGHT)
AC_SUBST(USE_PULSE)
AC_SUBST(USE_XRANDR)
AC_SUBST(USE_ALSA)
@@ -5348,7 +5348,11 @@ msgctxt "#13434"
msgid "Play only this"
msgstr ""
-#empty strings from id 13435 to 13499
+msgctxt "#13435"
+msgid "Allow hardware acceleration (libstagefright)"
+msgstr ""
+
+#empty strings from id 13436 to 13499
#: xbmc/settings/GUISettings.cpp
msgctxt "#13500"
@@ -33,6 +33,10 @@ ifeq ($(OS),osx)
EXCLUDED_DEPENDS = libusb
endif
+ifeq ($(OS),android)
+ DEPENDS += android-sources-ics
+endif
+
DEPENDS := $(filter-out $(EXCLUDED_DEPENDS),$(DEPENDS))
ZLIB=
@@ -0,0 +1,62 @@
+include ../../Makefile.include
+DEPS= ../../Makefile.include Makefile
+INCLUDES += -I$(PREFIX)/opt/android-source/frameworks/base/include
+INCLUDES += -I$(PREFIX)/opt/android-source/frameworks/base/native/include
+INCLUDES += -I$(PREFIX)/opt/android-source/frameworks/base/include/media/stagefright
+INCLUDES += -I$(PREFIX)/opt/android-source/frameworks/base/include/media/stagefright/openmax
+INCLUDES += -I$(PREFIX)/opt/android-source/system/core/include
+INCLUDES += -I$(PREFIX)/opt/android-source/libhardware/include
+
+ANDROID_VERSION=ics-mr0
+ANDROID_SOURCE=android-source
+ANDROID_LIBS=android-libs
+
+all: .installed-$(PLATFORM)
+
+.installed-$(PLATFORM): install-sources $(ANDROID_LIBS)
+ rm -rf $(PREFIX)/opt/$(ANDROID_LIBS)
+ mkdir -p $(PREFIX)/opt/$(ANDROID_LIBS)
+ cp $(PLATFORM)/libstagefright.so $(PLATFORM)/libutils.so $(PLATFORM)/libbinder.so $(PLATFORM)/libcutils.so $(PLATFORM)/libui.so $(PLATFORM)/libgui.so $(PREFIX)/opt/$(ANDROID_LIBS)
+ touch $@
+
+$(ANDROID_SOURCE):
+ echo "Fetching Android system headers"
+ git clone --depth=1 --branch $(ANDROID_VERSION) https://android.googlesource.com/platform/frameworks/base $(ANDROID_SOURCE)/frameworks/base
+ git clone --depth=1 --branch $(ANDROID_VERSION) https://android.googlesource.com/platform/system/core $(ANDROID_SOURCE)/system/core
+ git clone --depth=1 --branch $(ANDROID_VERSION) https://android.googlesource.com/platform/hardware/libhardware $(ANDROID_SOURCE)/libhardware
+
+install-sources: $(ANDROID_SOURCE)
+ mkdir -p $(PREFIX)/opt
+ rm -f $(PREFIX)/opt/$(ANDROID_SOURCE)
+ ln -s $(CURDIR)/$(ANDROID_SOURCE) $(PREFIX)/opt/$(ANDROID_SOURCE)
+
+$(ANDROID_LIBS): $(PLATFORM)/libstagefright.so $(PLATFORM)/libutils.so $(PLATFORM)/libbinder.so $(PLATFORM)/libcutils.so $(PLATFORM)/libui.so $(PLATFORM)/libgui.so
+ mkdir -p $(PREFIX)/opt/$(ANDROID_LIBS)
+ cp $(PLATFORM)/libstagefright.so $(PLATFORM)/libutils.so $(PLATFORM)/libbinder.so $(PLATFORM)/libcutils.so $(PLATFORM)/libui.so $(PLATFORM)/libgui.so $(PREFIX)/opt/$(ANDROID_LIBS)
+
+$(PLATFORM): install-sources
+ mkdir -p $(PLATFORM)
+
+$(PLATFORM)/libstagefright.so: $(PLATFORM) $(DEPS) libstagefright.cpp
+ $(CXX) -Wno-multichar -fno-exceptions -fno-rtti $(INCLUDES) -DHAVE_PTHREADS -shared -o $(PLATFORM)/libstagefright.so libstagefright.cpp
+
+$(PLATFORM)/libutils.so: $(PLATFORM) $(DEPS) libutils.cpp
+ $(CXX) -Wno-multichar -fno-exceptions -fno-rtti $(INCLUDES) -shared -o $(PLATFORM)/libutils.so libutils.cpp
+
+$(PLATFORM)/libbinder.so: $(PLATFORM) $(DEPS) libbinder.cpp
+ $(CXX) -Wno-multichar -fno-exceptions -fno-rtti $(INCLUDES) -shared -o $(PLATFORM)/libbinder.so libbinder.cpp
+
+$(PLATFORM)/libcutils.so: $(PLATFORM) $(DEPS) libcutils.c
+ $(CXX) -Wno-multichar -fno-exceptions -fno-rtti $(INCLUDES) -shared -o $(PLATFORM)/libcutils.so libcutils.c
+
+$(PLATFORM)/libui.so: $(PLATFORM) $(DEPS) libui.cpp
+ $(CXX) -Wno-multichar -fno-exceptions -fno-rtti $(INCLUDES) -shared -o $(PLATFORM)/libui.so libui.cpp
+
+$(PLATFORM)/libgui.so: $(PLATFORM) $(DEPS) libgui.cpp
+ $(CXX) -Wno-multichar -fno-exceptions -fno-rtti $(INCLUDES) -shared -o $(PLATFORM)/libgui.so libgui.cpp
+
+clean:
+ rm -f $(PREFIX)/opt/$(ANDROID_SOURCE)
+ rm -rf .installed-$(PLATFORM) $(ANDROID_SOURCE) $(PLATFORM) $(ANDROID_LIBS_ARCHIVE) $(ANDROID_LIBS)
+
+distclean: clean
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2010-2012 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+// ---------------------------------------------------------------------------
+
+#include <binder/ProcessState.h>
+
+namespace android {
+
+sp<ProcessState> ProcessState::self()
+{
+}
+
+void ProcessState::startThreadPool()
+{
+}
+
+ProcessState::ProcessState()
+{
+}
+
+ProcessState::~ProcessState()
+{
+}
+
+}; // namespace android
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2010-2012 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <cutils/atomic.h>
+
+int32_t android_atomic_dec(volatile int32_t* addr) {
+ return 0;
+}
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2010-2012 Team XBMC
+ * http://www.xbmc.org
+ *
+ * This Program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This Program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with XBMC; see the file COPYING. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ */
+#include <gui/SurfaceTexture.h>
+
+namespace android {
+
+status_t SurfaceTexture::updateTexImage()
+{
+ return 0;
+}
+
+void SurfaceTexture::getTransformMatrix(float mtx[16]) {}
+
+}
+
Oops, something went wrong.

0 comments on commit 6200f76

Please sign in to comment.