kodi: update to 15.0-beta1-56af059

This commit is contained in:
Stefan Saraev 2015-04-03 11:57:03 +03:00
parent 228594fcfc
commit 09eab6a10c
41 changed files with 180 additions and 21326 deletions

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="kodi-theme-Confluence" PKG_NAME="kodi-theme-Confluence"
PKG_VERSION="14-7cc53a9" PKG_VERSION="15.0-beta1-56af059"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,14 +17,14 @@
################################################################################ ################################################################################
PKG_NAME="kodi" PKG_NAME="kodi"
PKG_VERSION="14-7cc53a9" PKG_VERSION="15.0-beta1-56af059"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.kodi.tv" PKG_SITE="http://www.kodi.tv"
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain boost Python zlib bzip2 systemd pciutils lzo pcre swig:host libass enca curl rtmpdump fontconfig fribidi tinyxml libjpeg-turbo libpng tiff freetype jasper libogg libcdio libmodplug libmpeg2 taglib libxml2 libxslt yajl sqlite libvorbis ffmpeg kodi:host" PKG_DEPENDS_TARGET="toolchain kodi:host libsquish boost Python zlib bzip2 systemd pciutils lzo pcre swig:host libass curl rtmpdump fontconfig fribidi tinyxml libjpeg-turbo libpng tiff freetype jasper libogg libcdio libmpeg2 taglib libxml2 libxslt yajl sqlite libvorbis ffmpeg"
PKG_DEPENDS_HOST="toolchain" PKG_DEPENDS_HOST="lzo:host libpng:host libjpeg-turbo:host giflib:host"
PKG_PRIORITY="optional" PKG_PRIORITY="optional"
PKG_SECTION="mediacenter" PKG_SECTION="mediacenter"
PKG_SHORTDESC="kodi: Kodi Mediacenter" PKG_SHORTDESC="kodi: Kodi Mediacenter"
@ -33,15 +33,14 @@ PKG_LONGDESC="Kodi Media Center (which was formerly named Xbox Media Center or X
PKG_IS_ADDON="no" PKG_IS_ADDON="no"
PKG_AUTORECONF="no" PKG_AUTORECONF="no"
DEBUG="yes"
# configure GPU drivers and dependencies: # configure GPU drivers and dependencies:
get_graphicdrivers get_graphicdrivers
# for dbus support # for dbus support
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET dbus" PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET dbus"
# needed for hosttools (Texturepacker)
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET lzo:host SDL:host SDL_image:host"
if [ "$DISPLAYSERVER" = "x11" ]; then if [ "$DISPLAYSERVER" = "x11" ]; then
# for libX11 support # for libX11 support
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libX11 libXext libdrm" PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libX11 libXext libdrm"
@ -68,14 +67,6 @@ else
KODI_OPENGLES="--disable-gles" KODI_OPENGLES="--disable-gles"
fi fi
if [ "$SDL_SUPPORT" = yes ]; then
# for SDL support
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET SDL2"
KODI_SDL="--enable-sdl"
else
KODI_SDL="--disable-sdl"
fi
if [ "$ALSA_SUPPORT" = yes ]; then if [ "$ALSA_SUPPORT" = yes ]; then
# for ALSA support # for ALSA support
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET alsa-lib" PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET alsa-lib"
@ -97,53 +88,17 @@ else
KODI_CEC="--disable-libcec" KODI_CEC="--disable-libcec"
fi fi
if [ "$KODI_SCR_RSXS" = yes ]; then # TODO remove
# for RSXS Screensaver support KODI_RSXS="--disable-rsxs"
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libXt libXmu" KODI_PROJECTM="--disable-projectm"
KODI_RSXS="--enable-rsxs" KODI_GOOM="--disable-goom"
# fix build of RSXS Screensaver support if not using libiconv KODI_WAVEFORM="--disable-waveform"
export jm_cv_func_gettimeofday_clobber=no KODI_SPECTRUM="--disable-spectrum"
else KODI_FISHBMC="--disable-fishbmc"
KODI_RSXS="--disable-rsxs"
fi
if [ "$KODI_VIS_PROJECTM" = yes ]; then
# for ProjectM Visualisation support
KODI_PROJECTM="--enable-projectm"
else
KODI_PROJECTM="--disable-projectm"
fi
if [ "$KODI_VIS_GOOM" = yes ]; then
# for GOOM Visualisation support
KODI_GOOM="--enable-goom"
else
KODI_GOOM="--disable-goom"
fi
if [ "$KODI_VIS_WAVEFORM" = yes ]; then
# for Waveform Visualisation support
KODI_WAVEFORM="--enable-waveform"
else
KODI_WAVEFORM="--disable-waveform"
fi
if [ "$KODI_VIS_SPECTRUM" = yes ]; then
# for Spectrum Visualisation support
KODI_SPECTRUM="--enable-spectrum"
else
KODI_SPECTRUM="--disable-spectrum"
fi
if [ "$KODI_VIS_FISHBMC" = yes ]; then
# for FishBMC Visualisation support
KODI_FISHBMC="--enable-fishbmc"
else
KODI_FISHBMC="--disable-fishbmc"
fi
if [ "$JOYSTICK_SUPPORT" = yes ]; then if [ "$JOYSTICK_SUPPORT" = yes ]; then
# for Joystick support # for Joystick support
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET SDL2"
KODI_JOYSTICK="--enable-joystick" KODI_JOYSTICK="--enable-joystick"
else else
KODI_JOYSTICK="--disable-joystick" KODI_JOYSTICK="--disable-joystick"
@ -168,10 +123,6 @@ else
KODI_DVDCSS="--disable-dvdcss" KODI_DVDCSS="--disable-dvdcss"
fi fi
if [ "$FAAC_SUPPORT" = yes ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET faac"
fi
if [ "$KODI_BLURAY_SUPPORT" = yes ]; then if [ "$KODI_BLURAY_SUPPORT" = yes ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libbluray" PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libbluray"
KODI_BLURAY="--enable-libbluray" KODI_BLURAY="--enable-libbluray"
@ -294,7 +245,6 @@ PKG_CONFIGURE_OPTS_TARGET="gl_cv_func_gettimeofday_clobber=no \
--disable-optimizations \ --disable-optimizations \
$KODI_OPENGL \ $KODI_OPENGL \
$KODI_OPENGLES \ $KODI_OPENGLES \
$KODI_SDL \
$KODI_OPENMAX \ $KODI_OPENMAX \
$KODI_VDPAU \ $KODI_VDPAU \
$KODI_VAAPI \ $KODI_VAAPI \
@ -318,8 +268,6 @@ PKG_CONFIGURE_OPTS_TARGET="gl_cv_func_gettimeofday_clobber=no \
--enable-rtmp \ --enable-rtmp \
$KODI_SAMBA \ $KODI_SAMBA \
$KODI_NFS \ $KODI_NFS \
--disable-afpclient \
--enable-libvorbisenc \
--disable-libcap \ --disable-libcap \
$KODI_DVDCSS \ $KODI_DVDCSS \
--disable-mid \ --disable-mid \
@ -347,10 +295,13 @@ pre_configure_host() {
make_host() { make_host() {
make -C tools/depends/native/JsonSchemaBuilder make -C tools/depends/native/JsonSchemaBuilder
make -C tools/depends/native/TexturePacker
} }
makeinstall_host() { makeinstall_host() {
cp -PR tools/depends/native/JsonSchemaBuilder/native/JsonSchemaBuilder $ROOT/$TOOLCHAIN/bin cp -PR tools/depends/native/JsonSchemaBuilder/native/JsonSchemaBuilder $ROOT/$TOOLCHAIN/bin
rm -f $ROOT/$TOOLCHAIN/bin/TexturePacker
cp -PR tools/depends/native/TexturePacker/native/TexturePacker $ROOT/$TOOLCHAIN/bin
} }
pre_build_target() { pre_build_target() {
@ -394,9 +345,6 @@ make_target() {
if [ "$DISPLAYSERVER" = "x11" ]; then if [ "$DISPLAYSERVER" = "x11" ]; then
make kodi-xrandr make kodi-xrandr
fi fi
make -C tools/TexturePacker
cp -PR tools/TexturePacker/TexturePacker $ROOT/$TOOLCHAIN/bin
} }
post_makeinstall_target() { post_makeinstall_target() {
@ -423,14 +371,6 @@ post_makeinstall_target() {
rm -rf $INSTALL/usr/lib/kodi/kodi-xrandr rm -rf $INSTALL/usr/lib/kodi/kodi-xrandr
fi fi
if [ ! "$KODI_SCR_RSXS" = yes ]; then
rm -rf $INSTALL/usr/share/kodi/addons/screensaver.rsxs.*
fi
if [ ! "$KODI_VIS_PROJECTM" = yes ]; then
rm -rf $INSTALL/usr/share/kodi/addons/visualization.projectm
fi
rm -rf $INSTALL/usr/share/applications rm -rf $INSTALL/usr/share/applications
rm -rf $INSTALL/usr/share/icons rm -rf $INSTALL/usr/share/icons
rm -rf $INSTALL/usr/share/kodi/addons/service.xbmc.versioncheck rm -rf $INSTALL/usr/share/kodi/addons/service.xbmc.versioncheck

View File

@ -1,338 +0,0 @@
diff -Naur xbmc-14-5ec51aa.orig/system/keymaps/joystick.Ouya.Controller.xml xbmc-14-5ec51aa/system/keymaps/joystick.Ouya.Controller.xml
--- xbmc-14-5ec51aa.orig/system/keymaps/joystick.Ouya.Controller.xml 1969-12-31 16:00:00.000000000 -0800
+++ xbmc-14-5ec51aa/system/keymaps/joystick.Ouya.Controller.xml 2014-06-06 16:31:54.812044875 -0700
@@ -0,0 +1,334 @@
+<!-- Joystick Name: OUYA Game Controller -->
+<!-- created by: N3MIS15 on the xbmc forum -->
+<!-- http://forum.xbmc.org/showthread.php?tid=173516 -->
+
+<!-- Button Mappings in OpenELEC: -->
+<!-- -->
+<!-- ID Button -->
+<!-- -->
+<!-- 1 O -->
+<!-- 2 U -->
+<!-- 3 Y -->
+<!-- 4 A -->
+<!-- 5 Left Sholder -->
+<!-- 6 Right Sholder -->
+<!-- 7 Left Stick Button -->
+<!-- 8 Right Stick Button -->
+<!-- 9 D-Pad Up -->
+<!-- 10 D-Pad Down -->
+<!-- 11 D-Pad Left -->
+<!-- 12 D-Pad Right -->
+
+<!-- Axis Mappings: -->
+<!-- -->
+<!-- ID Button -->
+<!-- -->
+<!-- 1 Left Stick L/R -->
+<!-- 2 Left Stick U/D -->
+<!-- 3 limit +1 Left Trigger Pressed -->
+<!-- 3 limit -1 Left Trigger Depressed -->
+<!-- 4 Right Stick L/R -->
+<!-- 5 Right Stick U/D -->
+<!-- 6 limit +1 Right Trigger Pressed -->
+<!-- 6 limit -1 Right Trigger Depressed -->
+
+<keymap>
+
+ <global>
+ <joystick name="OUYA Game Controller">
+ <button id="1">Select</button>
+ <button id="2">ContextMenu</button>
+ <button id="3">FullScreen</button>
+ <button id="4">Back</button>
+ <button id="5">Queue</button>
+ <button id="6">Playlist</button>
+ <button id="7">PreviousMenu</button>
+ <button id="8">XBMC.ActivateWindow(Home)</button>
+ <button id="9">Up</button>
+ <button id="10">Down</button>
+ <button id="11">Left</button>
+ <button id="12">Right</button>
+ <axis id="4" limit="-1">AnalogSeekBack</axis>
+ <axis id="4" limit="+1">AnalogSeekForward</axis>
+ <axis id="2" limit="-1">ScrollUp</axis>
+ <axis id="2" limit="+1">ScrollDown</axis>
+ </joystick>
+ </global>
+
+ <Home>
+ </Home>
+
+ <MyFiles>
+ </MyFiles>
+
+ <MyMusicPlaylist>
+ <joystick name="OUYA Game Controller">
+ <button id="5">Delete</button>
+ </joystick>
+ </MyMusicPlaylist>
+
+ <MyMusicFiles>
+ </MyMusicFiles>
+
+ <MyMusicLibrary>
+ </MyMusicLibrary>
+
+ <FullscreenVideo>
+ <joystick name="OUYA Game Controller">
+ <button id="1">Pause</button>
+ <button id="2">OSD</button>
+ <button id="4">Stop</button>
+ <button id="5">AspectRatio</button>
+ <button id="6">ShowSubtitles</button>
+ <button id="7">SmallStepBack</button>
+ <button id="8">Info</button>
+ <button id="9">BigStepForward</button>
+ <button id="10">BigStepBack</button>
+ <button id="11">StepBack</button>
+ <button id="12">StepForward</button>
+ </joystick>
+ </FullscreenVideo>
+
+ <FullscreenLiveTV>
+ <joystick name="OUYA Game Controller">
+ <button id="9">ChannelUp</button>
+ <button id="10">ChannelDown</button>
+ <button id="11">PreviousChannelGroup</button>
+ <button id="12">NextChannelGroup</button>
+ </joystick>
+ </FullscreenLiveTV>
+
+ <FullscreenInfo>
+ <joystick name="OUYA Game Controller">
+ <button id="2">OSD</button>
+ <button id="4">Close</button>
+ <button id="8">Close</button>
+ <axis id="3" limit="+1">AnalogRewind</axis>
+ <axis id="3" limit="-1">AnalogFastForward</axis>
+ </joystick>
+ </FullscreenInfo>
+
+ <PlayerControls>
+ <joystick name="OUYA Game Controller">
+ <button id="2">Close</button>
+ <button id="7">Close</button>
+ <button id="8">Close</button>
+ </joystick>
+ </PlayerControls>
+
+ <Visualisation>
+ <joystick name="OUYA Game Controller">
+ <button id="1">Pause</button>
+ <button id="4">Stop</button>
+ <button id="2">XBMC.ActivateWindow(MusicOSD)</button>
+ <button id="5">XBMC.ActivateWindow(VisualisationPresetList)</button>
+ <button id="6">Info</button>
+ <button id="8">XBMC.ActivateWindow(MusicOSD)</button>
+ <button id="9">SkipNext</button>
+ <button id="10">SkipPrevious</button>
+ <button id="11">PreviousPreset</button>
+ <button id="12">NextPreset</button>
+ <axis id="3" limit="+1">AnalogRewind</axis>
+ <axis id="6" limit="+1">AnalogFastForward</axis>
+ </joystick>
+ </Visualisation>
+
+ <MusicOSD>
+ <joystick name="OUYA Game Controller">
+ <button id="4">Close</button>
+ <button id="6">Info</button>
+ </joystick>
+ </MusicOSD>
+
+ <VisualisationSettings>
+ <joystick name="OUYA Game Controller">
+ <button id="4">Close</button>
+ </joystick>
+ </VisualisationSettings>
+
+ <VisualisationPresetList>
+ <joystick name="OUYA Game Controller">
+ <button id="4">Close</button>
+ </joystick>
+ </VisualisationPresetList>
+
+ <SlideShow>
+ <joystick name="OUYA Game Controller">
+ <button id="1">Pause</button>
+ <button id="4">Stop</button>
+ <button id="3">ZoomNormal</button>
+ <button id="5">Rotate</button>
+ <button id="6">CodecInfo</button>
+ <button id="11">PreviousPicture</button>
+ <button id="12">NextPicture</button>
+ <axis id="1">AnalogMove</axis>
+ <axis id="2">AnalogMove</axis>
+ <axis id="3" limit="+1">ZoomOut</axis>
+ <axis id="6" limit="+1">ZoomIn</axis>
+ </joystick>
+ </SlideShow>
+
+ <ScreenCalibration>
+ <joystick name="OUYA Game Controller">
+ <button id="2">ResetCalibration</button>
+ <button id="5">NextResolution</button>
+ <button id="6">NextCalibration</button>
+ </joystick>
+ </ScreenCalibration>
+
+ <GUICalibration>
+ <joystick name="OUYA Game Controller">
+ <button id="2">ResetCalibration</button>
+ <button id="5">NextResolution</button>
+ <button id="6">NextCalibration</button>
+ </joystick>
+ </GUICalibration>
+
+ <VideoOSD>
+ <joystick name="OUYA Game Controller">
+ <button id="2">Close</button>
+ </joystick>
+ </VideoOSD>
+
+ <VideoMenu>
+ <joystick name="OUYA Game Controller">
+ <button id="4">Stop</button>
+ <button id="2">OSD</button>
+ <button id="5">AspectRatio</button>
+ <button id="8">Info</button>
+ </joystick>
+ </VideoMenu>
+
+ <OSDVideoSettings>
+ <joystick name="OUYA Game Controller">
+ <button id="5">AspectRatio</button>
+ <button id="2">Close</button>
+ </joystick>
+ </OSDVideoSettings>
+
+ <OSDAudioSettings>
+ <joystick name="OUYA Game Controller">
+ <button id="5">AspectRatio</button>
+ <button id="2">Close</button>
+ </joystick>
+ </OSDAudioSettings>
+
+ <VideoBookmarks>
+ <joystick name="OUYA Game Controller">
+ <button id="5">Delete</button>
+ </joystick>
+ </VideoBookmarks>
+
+ <MyVideoLibrary>
+ </MyVideoLibrary>
+
+ <MyVideoFiles>
+ </MyVideoFiles>
+
+ <MyVideoPlaylist>
+ <joystick name="OUYA Game Controller">
+ <button id="5">Delete</button>
+ </joystick>
+ </MyVideoPlaylist>
+
+ <VirtualKeyboard>
+ <joystick name="OUYA Game Controller">
+ <button id="4">BackSpace</button>
+ <button id="3">Symbols</button>
+ <button id="5">Shift</button>
+ <button id="7">Enter</button>
+ <axis id="3" limit="+1">CursorLeft</axis>
+ <axis id="6" limit="+1">CursorRight</axis>
+ </joystick>
+ </VirtualKeyboard>
+
+ <ContextMenu>
+ <joystick name="OUYA Game Controller">
+ <button id="2">Close</button>
+ <button id="4">Close</button>
+ </joystick>
+ </ContextMenu>
+
+ <Scripts>
+ <joystick name="OUYA Game Controller">
+ <button id="2">Info</button>
+ </joystick>
+ </Scripts>
+
+ <Settings>
+ <joystick name="OUYA Game Controller">
+ <button id="4">PreviousMenu</button>
+ </joystick>
+ </Settings>
+
+ <AddonInformation>
+ <joystick name="OUYA Game Controller">
+ <button id="4">Close</button>
+ </joystick>
+ </AddonInformation>
+
+ <AddonSettings>
+ <joystick name="OUYA Game Controller">
+ <button id="4">Close</button>
+ </joystick>
+ </AddonSettings>
+
+ <TextViewer>
+ <joystick name="OUYA Game Controller">
+ <button id="4">Close</button>
+ </joystick>
+ </TextViewer>
+
+ <shutdownmenu>
+ <joystick name="OUYA Game Controller">
+ <button id="4">PreviousMenu</button>
+ <button id="7">PreviousMenu</button>
+ </joystick>
+ </shutdownmenu>
+
+ <submenu>
+ <joystick name="OUYA Game Controller">
+ <button id="4">PreviousMenu</button>
+ </joystick>
+ </submenu>
+
+ <MusicInformation>
+ <joystick name="OUYA Game Controller">
+ <button id="4">Close</button>
+ </joystick>
+ </MusicInformation>
+
+ <MovieInformation>
+ <joystick name="OUYA Game Controller">
+ <button id="4">Close</button>
+ </joystick>
+ </MovieInformation>
+
+ <NumericInput>
+ <joystick name="OUYA Game Controller">
+ <button id="4">BackSpace</button>
+ <button id="7">Enter</button>
+ </joystick>
+ </NumericInput>
+
+ <GamepadInput>
+ <joystick name="OUYA Game Controller">
+ <button id="7">Stop</button>
+ </joystick>
+ </GamepadInput>
+
+ <LockSettings>
+ <joystick name="OUYA Game Controller">
+ <button id="4">PreviousMenu</button>
+ <button id="7">Close</button>
+ </joystick>
+ </LockSettings>
+
+ <ProfileSettings>
+ <joystick name="OUYA Game Controller">
+ <button id="4">PreviousMenu</button>
+ <button id="7">Close</button>
+ </joystick>
+ </ProfileSettings>
+
+</keymap>

View File

@ -1,328 +0,0 @@
diff -Naur xbmc-14-5ec51aa.orig/system/keymaps/joystick.PS4.Controller.xml xbmc-14-5ec51aa/system/keymaps/joystick.PS4.Controller.xml
--- xbmc-14-5ec51aa.orig/system/keymaps/joystick.PS4.Controller.xml 1969-12-31 16:00:00.000000000 -0800
+++ xbmc-14-5ec51aa/system/keymaps/joystick.PS4.Controller.xml 2014-06-06 16:53:33.786191904 -0700
@@ -0,0 +1,324 @@
+<!-- Joystick Name: Wireless Controller (PS4) -->
+
+<!-- Button Mappings: -->
+<!-- -->
+<!-- ID Button -->
+<!-- -->
+<!-- 1 Square -->
+<!-- 2 Cross -->
+<!-- 3 Circle -->
+<!-- 4 Triangle -->
+<!-- 5 L1 -->
+<!-- 6 R1 -->
+<!-- 7 L2 -->
+<!-- 8 R2 -->
+<!-- 9 Share (not used) -->
+<!-- 10 Options (not used) -->
+<!-- 11 L3 -->
+<!-- 12 R3 -->
+<!-- 13 PS Button (not used) -->
+
+<!-- Hat Mappings: -->
+<!-- -->
+<!-- ID Button -->
+<!-- -->
+<!-- 1 up D-Pad Up -->
+<!-- 1 down D-Pad Down -->
+<!-- 1 left D-Pad Left -->
+<!-- 1 right D-Pad Right -->
+
+<!-- Axis Mappings: -->
+<!-- -->
+<!-- ID Button -->
+<!-- -->
+<!-- 1 Left Stick L/R -->
+<!-- 2 Left Stick U/D -->
+<!-- 3 Right Stick L/R -->
+<!-- 4 Right Stick U/D -->
+
+<keymap>
+
+ <global>
+ <joystick name="Wireless Controller">
+ <button id="2">Select</button>
+ <button id="1">ContextMenu</button>
+ <button id="4">FullScreen</button>
+ <button id="3">Back</button>
+ <button id="5">Queue</button>
+ <button id="6">Playlist</button>
+ <button id="11">PreviousMenu</button>
+ <button id="12">XBMC.ActivateWindow(Home)</button>
+ <hat id="1" position="left">Left</hat>
+ <hat id="1" position="right">Right</hat>
+ <hat id="1" position="up">Up</hat>
+ <hat id="1" position="down">Down</hat>
+ <axis limit="+1" id="3">AnalogSeekForward</axis>
+ <axis limit="-1" id="3">AnalogSeekBack</axis>
+ <axis limit="-1" id="2">ScrollUp</axis>
+ <axis limit="+1" id="2">ScrollDown</axis>
+ </joystick>
+ </global>
+
+ <Home>
+ </Home>
+
+ <MyFiles>
+ </MyFiles>
+
+ <MyMusicPlaylist>
+ <joystick name="Wireless Controller">
+ <button id="5">Delete</button>
+ </joystick>
+ </MyMusicPlaylist>
+
+ <MyMusicFiles>
+ </MyMusicFiles>
+
+ <MyMusicLibrary>
+ </MyMusicLibrary>
+
+ <FullscreenVideo>
+ <joystick name="Wireless Controller">
+ <button id="2">Pause</button>
+ <button id="1">OSD</button>
+ <button id="3">Stop</button>
+ <button id="5">AspectRatio</button>
+ <button id="6">ShowSubtitles</button>
+ <button id="11">SmallStepBack</button>
+ <button id="12">Info</button>
+ <hat id="1" position="left">StepBack</hat>
+ <hat id="1" position="right">StepForward</hat>
+ <hat id="1" position="up">BigStepForward</hat>
+ <hat id="1" position="down">BigStepBack</hat>
+ </joystick>
+ </FullscreenVideo>
+
+ <FullscreenLiveTV>
+ <joystick name="Wireless Controller">
+ <hat id="1" position="up">ChannelUp</hat>
+ <hat id="1" position="down">ChannelDown</hat>
+ <hat id="1" position="left">PreviousChannelGroup</hat>
+ <hat id="1" position="right">NextChannelGroup</hat>
+ </joystick>
+ </FullscreenLiveTV>
+
+ <FullscreenInfo>
+ <joystick name="Wireless Controller">
+ <button id="1">OSD</button>
+ <button id="3">Close</button>
+ </joystick>
+ </FullscreenInfo>
+
+ <PlayerControls>
+ <joystick name="Wireless Controller">
+ <button id="3">Close</button>
+ </joystick>
+ </PlayerControls>
+
+ <Visualisation>
+ <joystick name="Wireless Controller">
+ <button id="2">Pause</button>
+ <button id="3">Stop</button>
+ <button id="1">XBMC.ActivateWindow(MusicOSD)</button>
+ <button id="12">Info</button>
+ <button id="6">SkipNext</button>
+ <button id="5">SkipPrevious</button>
+ <button id="7">PreviousPreset</button>
+ <button id="8">NextPreset</button>
+ </joystick>
+ </Visualisation>
+
+ <MusicOSD>
+ <joystick name="Wireless Controller">
+ <button id="3">Close</button>
+ <button id="12">Info</button>
+ </joystick>
+ </MusicOSD>
+
+ <VisualisationSettings>
+ <joystick name="Wireless Controller">
+ <button id="3">Close</button>
+ </joystick>
+ </VisualisationSettings>
+
+ <VisualisationPresetList>
+ <joystick name="Wireless Controller">
+ <button id="3">Close</button>
+ </joystick>
+ </VisualisationPresetList>
+
+ <SlideShow>
+ <joystick name="Wireless Controller">
+ <button id="2">Pause</button>
+ <button id="3">Stop</button>
+ <button id="4">ZoomNormal</button>
+ <button id="5">Rotate</button>
+ <button id="6">CodecInfo</button>
+ <hat id="1" position="left">PreviousPicture</hat>
+ <hat id="1" position="right">NextPicture</hat>
+ <axis id="1">AnalogMove</axis>
+ <axis id="2">AnalogMove</axis>
+ <button id="7">ZoomOut</button>
+ <button id="8">ZoomIn</button>
+ </joystick>
+ </SlideShow>
+
+ <ScreenCalibration>
+ <joystick name="Wireless Controller">
+ <button id="2">ResetCalibration</button>
+ <button id="5">NextResolution</button>
+ <button id="6">NextCalibration</button>
+ </joystick>
+ </ScreenCalibration>
+
+ <GUICalibration>
+ <joystick name="Wireless Controller">
+ <button id="2">ResetCalibration</button>
+ <button id="5">NextResolution</button>
+ <button id="6">NextCalibration</button>
+ </joystick>
+ </GUICalibration>
+
+ <VideoOSD>
+ <joystick name="Wireless Controller">
+ <button id="2">Close</button>
+ </joystick>
+ </VideoOSD>
+
+ <VideoMenu>
+ <joystick name="Wireless Controller">
+ <button id="3">Stop</button>
+ <button id="2">OSD</button>
+ <button id="5">AspectRatio</button>
+ <button id="12">Info</button>
+ </joystick>
+ </VideoMenu>
+
+ <OSDVideoSettings>
+ <joystick name="Wireless Controller">
+ <button id="5">AspectRatio</button>
+ <button id="2">Close</button>
+ </joystick>
+ </OSDVideoSettings>
+
+ <OSDAudioSettings>
+ <joystick name="Wireless Controller">
+ <button id="5">AspectRatio</button>
+ <button id="2">Close</button>
+ </joystick>
+ </OSDAudioSettings>
+
+ <VideoBookmarks>
+ <joystick name="Wireless Controller">
+ <button id="5">Delete</button>
+ </joystick>
+ </VideoBookmarks>
+
+ <MyVideoLibrary>
+ </MyVideoLibrary>
+
+ <MyVideoFiles>
+ </MyVideoFiles>
+
+ <MyVideoPlaylist>
+ <joystick name="Wireless Controller">
+ <button id="5">Delete</button>
+ </joystick>
+ </MyVideoPlaylist>
+
+ <VirtualKeyboard>
+ <joystick name="Wireless Controller">
+ <button id="3">BackSpace</button>
+ <button id="4">Symbols</button>
+ <button id="5">Shift</button>
+ <button id="11">Enter</button>
+ <button id="7">CursorLeft</button>
+ <button id="8">CursorRight</button>
+ </joystick>
+ </VirtualKeyboard>
+
+ <ContextMenu>
+ <joystick name="Wireless Controller">
+ <button id="3">Close</button>
+ </joystick>
+ </ContextMenu>
+
+ <Scripts>
+ </Scripts>
+
+ <Settings>
+ <joystick name="Wireless Controller">
+ <button id="3">PreviousMenu</button>
+ </joystick>
+ </Settings>
+
+ <AddonInformation>
+ <joystick name="Wireless Controller">
+ <button id="3">Close</button>
+ </joystick>
+ </AddonInformation>
+
+ <AddonSettings>
+ <joystick name="Wireless Controller">
+ <button id="3">Close</button>
+ </joystick>
+ </AddonSettings>
+
+ <TextViewer>
+ <joystick name="Wireless Controller">
+ <button id="3">Close</button>
+ </joystick>
+ </TextViewer>
+
+ <shutdownmenu>
+ <joystick name="Wireless Controller">
+ <button id="3">PreviousMenu</button>
+ </joystick>
+ </shutdownmenu>
+
+ <submenu>
+ <joystick name="Wireless Controller">
+ <button id="3">PreviousMenu</button>
+ </joystick>
+ </submenu>
+
+ <MusicInformation>
+ <joystick name="Wireless Controller">
+ <button id="3">Close</button>
+ </joystick>
+ </MusicInformation>
+
+ <MovieInformation>
+ <joystick name="Wireless Controller">
+ <button id="3">Close</button>
+ </joystick>
+ </MovieInformation>
+
+ <NumericInput>
+ <joystick name="Wireless Controller">
+ <button id="3">BackSpace</button>
+ <button id="11">Enter</button>
+ </joystick>
+ </NumericInput>
+
+ <GamepadInput>
+ <joystick name="Wireless Controller">
+ <button id="11">Stop</button>
+ </joystick>
+ </GamepadInput>
+
+ <LockSettings>
+ <joystick name="Wireless Controller">
+ <button id="3">PreviousMenu</button>
+ <button id="11">Close</button>
+ </joystick>
+ </LockSettings>
+
+ <ProfileSettings>
+ <joystick name="Wireless Controller">
+ <button id="3">PreviousMenu</button>
+ <button id="11">Close</button>
+ </joystick>
+ </ProfileSettings>
+
+</keymap>

View File

@ -1,12 +0,0 @@
diff -Naur kodi-14-b5dbdb5.orig/xbmc/input/linux/LinuxInputDevices.cpp kodi-14-b5dbdb5/xbmc/input/linux/LinuxInputDevices.cpp
--- kodi-14-b5dbdb5.orig/xbmc/input/linux/LinuxInputDevices.cpp 2015-02-20 22:00:07.688420179 -0800
+++ kodi-14-b5dbdb5/xbmc/input/linux/LinuxInputDevices.cpp 2015-02-20 22:01:36.495680879 -0800
@@ -255,6 +255,8 @@
{ 378 , XBMCK_RIGHT }, // Green
{ 381 , XBMCK_UP }, // Yellow
{ 366 , XBMCK_DOWN }, // Blue
+ // Rii i7 Home button
+ { 172 , XBMCK_HOME },
};
typedef enum

View File

@ -1,11 +0,0 @@
diff -Naur kodi-14-af6d342/configure.in kodi-14-af6d342.patch/configure.in
--- kodi-14-af6d342/configure.in 2014-10-27 11:34:57.000000000 +0100
+++ kodi-14-af6d342.patch/configure.in 2014-10-31 02:34:19.322700780 +0100
@@ -1230,7 +1230,6 @@
[AC_MSG_ERROR($missing_library)])
]
)
- AC_CHECK_LIB([SDL_image], [main],, AC_MSG_ERROR($missing_library))
AC_DEFINE([HAVE_SDL],[1],["Define to 1 if using sdl"])
fi
fi

View File

@ -1,7 +1,7 @@
From 855160db446fe0059f072b207d53c15ba18d952f Mon Sep 17 00:00:00 2001 From a3795cdc78a56b73875ce862227114bdf2871591 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca> From: Stefan Saraev <stefan@saraev.ca>
Date: Thu, 17 Apr 2014 12:12:50 +0300 Date: Thu, 17 Apr 2014 12:12:50 +0300
Subject: [PATCH] use udevil to umount Subject: [PATCH 1/6] use udevil to umount
--- ---
xbmc/linux/PosixMountProvider.cpp | 2 +- xbmc/linux/PosixMountProvider.cpp | 2 +-
@ -9,10 +9,10 @@ Subject: [PATCH] use udevil to umount
2 files changed, 2 insertions(+), 2 deletions(-) 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/xbmc/linux/PosixMountProvider.cpp b/xbmc/linux/PosixMountProvider.cpp diff --git a/xbmc/linux/PosixMountProvider.cpp b/xbmc/linux/PosixMountProvider.cpp
index 2339709..7001563 100644 index 218d10b..57e94ca 100644
--- a/xbmc/linux/PosixMountProvider.cpp --- a/xbmc/linux/PosixMountProvider.cpp
+++ b/xbmc/linux/PosixMountProvider.cpp +++ b/xbmc/linux/PosixMountProvider.cpp
@@ -131,7 +131,7 @@ bool CPosixMountProvider::Eject(CStdString mountpath) @@ -133,7 +133,7 @@ bool CPosixMountProvider::Eject(const std::string& mountpath)
{ {
// just go ahead and try to umount the disk // just go ahead and try to umount the disk
// if it does umount, life is good, if not, no loss. // if it does umount, life is good, if not, no loss.
@ -22,10 +22,10 @@ index 2339709..7001563 100644
if (status == 0) if (status == 0)
diff --git a/xbmc/storage/linux/UDevProvider.cpp b/xbmc/storage/linux/UDevProvider.cpp diff --git a/xbmc/storage/linux/UDevProvider.cpp b/xbmc/storage/linux/UDevProvider.cpp
index 73aa408..8bd02b6 100644 index 0ca370b..dffee34 100644
--- a/xbmc/storage/linux/UDevProvider.cpp --- a/xbmc/storage/linux/UDevProvider.cpp
+++ b/xbmc/storage/linux/UDevProvider.cpp +++ b/xbmc/storage/linux/UDevProvider.cpp
@@ -183,7 +183,7 @@ bool CUDevProvider::Eject(CStdString mountpath) @@ -207,7 +207,7 @@ bool CUDevProvider::Eject(const std::string& mountpath)
{ {
// just go ahead and try to umount the disk // just go ahead and try to umount the disk
// if it does umount, life is good, if not, no loss. // if it does umount, life is good, if not, no loss.
@ -35,5 +35,5 @@ index 73aa408..8bd02b6 100644
if (status == 0) if (status == 0)
-- --
1.9.1 2.1.4

View File

@ -1,28 +1,28 @@
From c572751d90ab26971d401819b146cf4daa64670c Mon Sep 17 00:00:00 2001 From 06ebc448041c43b8c13ac61b7bda20cb6120c588 Mon Sep 17 00:00:00 2001
From: vpeter4 <peter.vicman@gmail.com> From: Stefan Saraev <stefan@saraev.ca>
Date: Wed, 1 Oct 2014 10:12:11 +0200 Date: Mon, 2 Mar 2015 23:50:40 +0200
Subject: [PATCH] make binary addons executable Subject: [PATCH] make binary addons executable
add executable mode to all files in addon's bin folder add executable mode to all files in addon's bin folder
--- ---
xbmc/addons/AddonInstaller.cpp | 23 +++++++++++++++++++++++ xbmc/addons/AddonInstaller.cpp | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+) 1 file changed, 23 insertions(+)
diff --git a/xbmc/addons/AddonInstaller.cpp b/xbmc/addons/AddonInstaller.cpp diff --git a/xbmc/addons/AddonInstaller.cpp b/xbmc/addons/AddonInstaller.cpp
index d358a23..6b55c3a 100644 index f4a241c..f6d88f2 100644
--- a/xbmc/addons/AddonInstaller.cpp --- a/xbmc/addons/AddonInstaller.cpp
+++ b/xbmc/addons/AddonInstaller.cpp +++ b/xbmc/addons/AddonInstaller.cpp
@@ -39,6 +39,9 @@ @@ -40,6 +40,9 @@
#include "dialogs/GUIDialogKaiToast.h" #include "dialogs/GUIDialogOK.h"
#include "dialogs/GUIDialogProgress.h" #include "dialogs/GUIDialogProgress.h"
#include "URL.h" #include "URL.h"
+#include <iostream> +#include <iostream>
+#include <dirent.h> +#include <dirent.h>
+#include <sys/stat.h> +#include <sys/stat.h>
using namespace std; #include <functional>
using namespace XFILE;
@@ -715,6 +718,26 @@ bool CAddonInstallJob::Install(const std::string &installFrom, const AddonPtr& r @@ -869,6 +872,26 @@ bool CAddonInstallJob::Install(const std::string &installFrom, const AddonPtr& r
void CAddonInstallJob::OnPostInstall(bool reloadAddon) void CAddonInstallJob::OnPostInstall(bool reloadAddon)
{ {
@ -46,9 +46,9 @@ index d358a23..6b55c3a 100644
+ closedir(addonsDir); + closedir(addonsDir);
+ } + }
+ +
if (CSettings::Get().GetBool("general.addonnotifications")) if (!IsModal() && CSettings::Get().GetBool("general.addonnotifications"))
{ CGUIDialogKaiToast::QueueNotification(m_addon->Icon(), m_addon->Name(),
CGUIDialogKaiToast::QueueNotification(m_addon->Icon(), g_localizeStrings.Get(m_update ? 24065 : 24064),
-- --
1.8.1.2 1.7.10.4

View File

@ -1,18 +1,18 @@
diff --git a/xbmc/interfaces/python/XBPython.cpp b/xbmc/interfaces/python/XBPython.cpp diff --git a/xbmc/interfaces/python/XBPython.cpp b/xbmc/interfaces/python/XBPython.cpp
index 01a129e..07b4878 100644 index f179b12..4a4ddd1 100644
--- a/xbmc/interfaces/python/XBPython.cpp --- a/xbmc/interfaces/python/XBPython.cpp
+++ b/xbmc/interfaces/python/XBPython.cpp +++ b/xbmc/interfaces/python/XBPython.cpp
@@ -445,10 +445,9 @@ bool XBPython::InitializeEngine() @@ -571,10 +571,9 @@ bool XBPython::OnScriptInitialized(ILanguageInvoker *invoker)
// at http://docs.python.org/using/cmdline.html#environment-variables // at http://docs.python.org/using/cmdline.html#environment-variables
#if !defined(TARGET_WINDOWS) && !defined(TARGET_ANDROID) #if !defined(TARGET_WINDOWS) && !defined(TARGET_ANDROID)
- /* PYTHONOPTIMIZE is set off intentionally when using external Python. - /* PYTHONOPTIMIZE is set off intentionally when using external Python.
- Reason for this is because we cannot be sure what version of Python - Reason for this is because we cannot be sure what version of Python
- was used to compile the various Python object files (i.e. .pyo, - was used to compile the various Python object files (i.e. .pyo,
- .pyc, etc.). */ - .pyc, etc.). */
+ // Required for python to find optimized code (pyo) files + // Required for python to find optimized code (pyo) files
+ setenv("PYTHONOPTIMIZE", "1", 1); + setenv("PYTHONOPTIMIZE", "1", 1);
+ +
// check if we are running as real xbmc.app or just binary // check if we are running as real xbmc.app or just binary
if (!CUtil::GetFrameworksPath(true).empty()) if (!CUtil::GetFrameworksPath(true).empty())
{ {

File diff suppressed because it is too large Load Diff

View File

@ -1,29 +1,25 @@
From 4f6188bc2bcee52ab3a150fff336b58c11f8928a Mon Sep 17 00:00:00 2001 From cab997df6a39ec87dcfa04215715aa5bbd44d947 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca> From: Stefan Saraev <stefan@saraev.ca>
Date: Sat, 22 Mar 2014 22:18:28 +0200 Date: Wed, 11 Mar 2015 20:56:15 +0200
Subject: [PATCH] dont set _NET_WM_STATE_FULLSCREEN Subject: [PATCH] dont set _NET_WM_STATE_FULLSCREEN
--- ---
xbmc/windowing/X11/WinSystemX11.cpp | 6 ------ xbmc/windowing/X11/WinSystemX11.cpp | 2 --
1 files changed, 0 insertions(+), 6 deletions(-) 1 file changed, 2 deletions(-)
diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp diff --git a/xbmc/windowing/X11/WinSystemX11.cpp b/xbmc/windowing/X11/WinSystemX11.cpp
index c95f4ec..d12e050 100644 index 05f36ee..1714422 100644
--- a/xbmc/windowing/X11/WinSystemX11.cpp --- a/xbmc/windowing/X11/WinSystemX11.cpp
+++ b/xbmc/windowing/X11/WinSystemX11.cpp +++ b/xbmc/windowing/X11/WinSystemX11.cpp
@@ -903,12 +903,6 @@ bool CWinSystemX11::SetWindow(int width, int height, bool fullscreen, const std: @@ -1155,8 +1155,6 @@ bool CWinSystemX11::SetWindow(int width, int height, bool fullscreen, const std:
InputOutput, vi->visual,
mask, &swa);
- if (fullscreen && hasWM) if (fullscreen && hasWM)
- { {
- Atom fs = XInternAtom(m_dpy, "_NET_WM_STATE_FULLSCREEN", True); - Atom fs = XInternAtom(m_dpy, "_NET_WM_STATE_FULLSCREEN", True);
- XChangeProperty(m_dpy, m_mainWindow, XInternAtom(m_dpy, "_NET_WM_STATE", True), XA_ATOM, 32, PropModeReplace, (unsigned char *) &fs, 1); - XChangeProperty(m_dpy, m_mainWindow, XInternAtom(m_dpy, "_NET_WM_STATE", True), XA_ATOM, 32, PropModeReplace, (unsigned char *) &fs, 1);
- } // disable desktop compositing for KDE, when Kodi is in full-screen mode
- int one = 1;
// define invisible cursor XChangeProperty(m_dpy, m_mainWindow, XInternAtom(m_dpy, "_KDE_NET_WM_BLOCK_COMPOSITING", True), XA_CARDINAL, 32,
Pixmap bitmapNoData;
XColor black;
-- --
1.7.2.5 1.7.10.4

View File

@ -1,26 +1,29 @@
From c2717b64788fd05098f1d1f5499def9fbc4af957 Mon Sep 17 00:00:00 2001 From 3cfa580493f7a57109d19d99373a455852388e0d Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca> From: Stefan Saraev <stefan@saraev.ca>
Date: Mon, 18 Aug 2014 17:46:54 +0300 Date: Mon, 18 Aug 2014 17:46:54 +0300
Subject: [PATCH] openelec: setup timezone Subject: [PATCH 3/6] setup timezone
on TZ country setting change, store the value in format
TIMEZONE=Xx/Yyy to /storage/.cache/timezone to be used with
tz-data.service
--- ---
xbmc/linux/LinuxTimezone.cpp | 12 ++++++++++++ xbmc/linux/LinuxTimezone.cpp | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-) 1 file changed, 12 insertions(+)
diff --git a/xbmc/linux/LinuxTimezone.cpp b/xbmc/linux/LinuxTimezone.cpp diff --git a/xbmc/linux/LinuxTimezone.cpp b/xbmc/linux/LinuxTimezone.cpp
index b4ffd13..5bf41eb 100644 index 37130d8..3431638 100644
--- a/xbmc/linux/LinuxTimezone.cpp --- a/xbmc/linux/LinuxTimezone.cpp
+++ b/xbmc/linux/LinuxTimezone.cpp +++ b/xbmc/linux/LinuxTimezone.cpp
@@ -39,6 +39,8 @@ @@ -42,6 +42,8 @@
#include "settings/lib/Setting.h"
#include "settings/Settings.h" #include <algorithm>
+#include <fstream> +#include <fstream>
+ +
using namespace std; using namespace std;
CLinuxTimezone::CLinuxTimezone() : m_IsDST(0) CLinuxTimezone::CLinuxTimezone() : m_IsDST(0)
@@ -158,6 +160,16 @@ void CLinuxTimezone::OnSettingChanged(const CSetting *setting) @@ -161,6 +163,16 @@ void CLinuxTimezone::OnSettingChanged(const CSetting *setting)
const std::string &settingId = setting->GetId(); const std::string &settingId = setting->GetId();
if (settingId == "locale.timezone") if (settingId == "locale.timezone")
{ {
@ -38,5 +41,5 @@ index b4ffd13..5bf41eb 100644
CDateTime::ResetTimezoneBias(); CDateTime::ResetTimezoneBias();
-- --
1.7.2.5 2.1.4

View File

@ -1,7 +1,7 @@
From a58ead6a20bcfd6132c6f234c3108b5d16a6440c Mon Sep 17 00:00:00 2001 From 4672bee097751d04098b5989516ecdc2ee80391e Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca> From: Stefan Saraev <stefan@saraev.ca>
Date: Fri, 8 Aug 2014 18:22:44 +0300 Date: Fri, 8 Aug 2014 18:22:44 +0300
Subject: [PATCH] use a wrapper to setup systemd services Subject: [PATCH 2/6] use a wrapper to setup systemd services
--- ---
xbmc/addons/Service.cpp | 22 ++++++++++++++++++++++ xbmc/addons/Service.cpp | 22 ++++++++++++++++++++++
@ -9,7 +9,7 @@ Subject: [PATCH] use a wrapper to setup systemd services
2 files changed, 23 insertions(+) 2 files changed, 23 insertions(+)
diff --git a/xbmc/addons/Service.cpp b/xbmc/addons/Service.cpp diff --git a/xbmc/addons/Service.cpp b/xbmc/addons/Service.cpp
index c406b11..f6afbe8 100644 index 2f5c38c..4fc8d5f 100644
--- a/xbmc/addons/Service.cpp --- a/xbmc/addons/Service.cpp
+++ b/xbmc/addons/Service.cpp +++ b/xbmc/addons/Service.cpp
@@ -53,6 +53,10 @@ AddonPtr CService::Clone() const @@ -53,6 +53,10 @@ AddonPtr CService::Clone() const
@ -50,7 +50,7 @@ index c406b11..f6afbe8 100644
@@ -145,13 +160,20 @@ void CService::OnPostInstall(bool restart, bool update) @@ -145,13 +160,20 @@ void CService::OnPostInstall(bool restart, bool update)
{ {
boost::shared_ptr<CService> service = boost::dynamic_pointer_cast<CService>(localAddon); std::shared_ptr<CService> service = std::dynamic_pointer_cast<CService>(localAddon);
if (service) if (service)
+ { + {
+ // systemctl stop & disable / enable & start on addon upgrade + // systemctl stop & disable / enable & start on addon upgrade
@ -82,5 +82,5 @@ index 98ec8b6..683ae60 100644
virtual void OnEnabled(); virtual void OnEnabled();
virtual bool OnPreInstall(); virtual bool OnPreInstall();
-- --
2.1.0 2.1.4

View File

@ -1,35 +0,0 @@
From d4d83054ad9096c31d3c91bcbbf1919de1aa76f0 Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Sun, 29 Jun 2014 22:59:00 +0300
Subject: [PATCH] revert b6bec7a
this reverts upstream commit b6bec7a (part of xbmc/pull/4761):
> From b6bec7a44fec728c28aa0cedc96288539a71e324 Mon Sep 17 00:00:00 2001
> From: Trent Nelson <trent.nelson@pivosgroup.com>
> Date: Wed, 21 May 2014 17:16:54 +0800
> Subject: [PATCH] [PVR] Make sure client addons are disabled first time we see
> them.
pvr client addons should NOT be disabled after pvr database reset
---
xbmc/pvr/addons/PVRClients.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/xbmc/pvr/addons/PVRClients.cpp b/xbmc/pvr/addons/PVRClients.cpp
index b403fd6..809c244 100644
--- a/xbmc/pvr/addons/PVRClients.cpp
+++ b/xbmc/pvr/addons/PVRClients.cpp
@@ -1126,8 +1126,7 @@ bool CPVRClients::UpdateAddons(void)
for (unsigned iClientPtr = 0; iClientPtr < m_addons.size(); iClientPtr++)
{
const AddonPtr clientAddon = m_addons.at(iClientPtr);
- bool newRegistration = false;
- if (RegisterClient(clientAddon, &newRegistration) < 0 || newRegistration)
+ if (RegisterClient(clientAddon) < 0)
{
CAddonMgr::Get().DisableAddon(clientAddon->ID(), true);
usableClients--;
--
1.9.1

View File

@ -1,7 +1,7 @@
From eabb811c7f82695cb566b0aadf5d86cb7448368a Mon Sep 17 00:00:00 2001 From ec3a12fb4708e9319c18af1b851a7a324294bc6c Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca> From: Stefan Saraev <stefan@saraev.ca>
Date: Thu, 5 Jun 2014 18:50:04 +0300 Date: Mon, 15 Dec 2014 21:28:54 +0200
Subject: [PATCH] handle SIGTERM Subject: [PATCH 6/6] handle SIGTERM
In some situations, due to deadlocks or crashes, xbmc fails to exit properly in In some situations, due to deadlocks or crashes, xbmc fails to exit properly in
CApplication::Stop(), so g_powerManager.Reboot() / g_powerManager.Powerdown() never gets CApplication::Stop(), so g_powerManager.Reboot() / g_powerManager.Powerdown() never gets
@ -31,10 +31,10 @@ is requested externaly (ssh, 3rdparty script).
6 files changed, 30 insertions(+), 4 deletions(-) 6 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index 875ca39..9572b62 100644 index 69b1cd7..f1f60cd 100644
--- a/xbmc/Application.cpp --- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp +++ b/xbmc/Application.cpp
@@ -3477,12 +3477,19 @@ bool CApplication::Cleanup() @@ -2543,12 +2543,19 @@ bool CApplication::Cleanup()
} }
} }
@ -55,7 +55,7 @@ index 875ca39..9572b62 100644
CAnnouncementManager::Get().Announce(System, "xbmc", "OnQuit", vExitCode); CAnnouncementManager::Get().Announce(System, "xbmc", "OnQuit", vExitCode);
SaveFileState(true); SaveFileState(true);
@@ -3506,7 +3513,6 @@ void CApplication::Stop(int exitCode) @@ -2572,7 +2579,6 @@ void CApplication::Stop(int exitCode)
m_bStop = true; m_bStop = true;
m_AppFocused = false; m_AppFocused = false;
@ -64,10 +64,10 @@ index 875ca39..9572b62 100644
// cancel any jobs from the jobmanager // cancel any jobs from the jobmanager
diff --git a/xbmc/Application.h b/xbmc/Application.h diff --git a/xbmc/Application.h b/xbmc/Application.h
index 0a332ff..a4d6b58 100644 index ec5dfac..96cbf71 100644
--- a/xbmc/Application.h --- a/xbmc/Application.h
+++ b/xbmc/Application.h +++ b/xbmc/Application.h
@@ -153,6 +153,7 @@ class CApplication : public CXBApplicationEx, public IPlayerCallback, public IMs @@ -154,6 +154,7 @@ public:
bool StartPVRManager(); bool StartPVRManager();
void StopPVRManager(); void StopPVRManager();
bool IsCurrentThread() const; bool IsCurrentThread() const;
@ -76,7 +76,7 @@ index 0a332ff..a4d6b58 100644
void RestartApp(); void RestartApp();
void UnloadSkin(bool forReload = false); void UnloadSkin(bool forReload = false);
diff --git a/xbmc/ApplicationMessenger.cpp b/xbmc/ApplicationMessenger.cpp diff --git a/xbmc/ApplicationMessenger.cpp b/xbmc/ApplicationMessenger.cpp
index 2f4d651..0467893 100644 index a46c9be..9bb6804 100644
--- a/xbmc/ApplicationMessenger.cpp --- a/xbmc/ApplicationMessenger.cpp
+++ b/xbmc/ApplicationMessenger.cpp +++ b/xbmc/ApplicationMessenger.cpp
@@ -261,13 +261,14 @@ void CApplicationMessenger::ProcessMessage(ThreadMessage *pMsg) @@ -261,13 +261,14 @@ void CApplicationMessenger::ProcessMessage(ThreadMessage *pMsg)
@ -128,7 +128,7 @@ diff --git a/xbmc/XBApplicationEx.h b/xbmc/XBApplicationEx.h
index c46cba1..ed3f35f 100644 index c46cba1..ed3f35f 100644
--- a/xbmc/XBApplicationEx.h --- a/xbmc/XBApplicationEx.h
+++ b/xbmc/XBApplicationEx.h +++ b/xbmc/XBApplicationEx.h
@@ -40,6 +40,7 @@ class CXBApplicationEx : public IWindowManagerCallback @@ -40,6 +40,7 @@ public:
// Variables for timing // Variables for timing
bool m_bStop; bool m_bStop;
int m_ExitCode; int m_ExitCode;
@ -137,10 +137,10 @@ index c46cba1..ed3f35f 100644
bool m_renderGUI; bool m_renderGUI;
diff --git a/xbmc/main/main.cpp b/xbmc/main/main.cpp diff --git a/xbmc/main/main.cpp b/xbmc/main/main.cpp
index ec86426..ad8fe6e 100644 index 87fe2fd..3bfb338 100644
--- a/xbmc/main/main.cpp --- a/xbmc/main/main.cpp
+++ b/xbmc/main/main.cpp +++ b/xbmc/main/main.cpp
@@ -40,9 +40,24 @@ @@ -41,9 +41,24 @@
#include "input/linux/LIRC.h" #include "input/linux/LIRC.h"
#endif #endif
#include "XbmcContext.h" #include "XbmcContext.h"
@ -165,3 +165,6 @@ index ec86426..ad8fe6e 100644
// set up some xbmc specific relationships // set up some xbmc specific relationships
XBMC::Context context; XBMC::Context context;
--
2.1.4

View File

@ -1,12 +0,0 @@
diff -Naur xbmc-13.alpha-536cf62/system/settings/settings.xml xbmc-13.alpha-536cf62.patch/system/settings/settings.xml
--- xbmc-13.alpha-536cf62/system/settings/settings.xml 2014-01-29 18:31:46.000000000 +0100
+++ xbmc-13.alpha-536cf62.patch/system/settings/settings.xml 2014-01-31 13:12:46.789297639 +0100
@@ -91,7 +91,7 @@
</group>
<group id="2">
<setting id="lookandfeel.enablerssfeeds" type="boolean" label="13305" help="36111">
- <level>1</level>
+ <level>0</level>
<default>true</default>
<control type="toggle" />
</setting>

View File

@ -1,111 +0,0 @@
From 925a4e4d7e775cc246518d6ea934d1f93a069870 Mon Sep 17 00:00:00 2001
From: anaconda <anaconda@menakite.eu>
Date: Wed, 25 Feb 2015 18:22:21 +0100
Subject: [PATCH] Load OSD dialogs on startup.
Fixes skipped frames the first time they're loaded in memory on less powered
devices, like a Raspberry Pi, when using DVDPlayer.
See http://forum.kodi.tv/showthread.php?tid=211501&pid=1938811#pid1938811
---
xbmc/pvr/dialogs/GUIDialogPVRChannelsOSD.cpp | 1 +
xbmc/pvr/dialogs/GUIDialogPVRGuideOSD.cpp | 1 +
xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp | 4 +++-
xbmc/video/dialogs/GUIDialogSubtitles.cpp | 2 +-
xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp | 2 +-
xbmc/video/dialogs/GUIDialogVideoOSD.cpp | 2 +-
xbmc/video/dialogs/GUIDialogVideoSettings.cpp | 4 +++-
7 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/xbmc/pvr/dialogs/GUIDialogPVRChannelsOSD.cpp b/xbmc/pvr/dialogs/GUIDialogPVRChannelsOSD.cpp
index 5fb5c79..36f7273 100644
--- a/xbmc/pvr/dialogs/GUIDialogPVRChannelsOSD.cpp
+++ b/xbmc/pvr/dialogs/GUIDialogPVRChannelsOSD.cpp
@@ -50,6 +50,7 @@ CGUIDialogPVRChannelsOSD::CGUIDialogPVRChannelsOSD() :
CGUIDialog(WINDOW_DIALOG_PVR_OSD_CHANNELS, "DialogPVRChannelsOSD.xml"),
Observer()
{
+ m_loadType = LOAD_ON_GUI_INIT;
m_vecItems = new CFileItemList;
}
diff --git a/xbmc/pvr/dialogs/GUIDialogPVRGuideOSD.cpp b/xbmc/pvr/dialogs/GUIDialogPVRGuideOSD.cpp
index cf7e5d2..9e9ed32 100644
--- a/xbmc/pvr/dialogs/GUIDialogPVRGuideOSD.cpp
+++ b/xbmc/pvr/dialogs/GUIDialogPVRGuideOSD.cpp
@@ -35,6 +35,7 @@ using namespace PVR;
CGUIDialogPVRGuideOSD::CGUIDialogPVRGuideOSD()
: CGUIDialog(WINDOW_DIALOG_PVR_OSD_GUIDE, "DialogPVRGuideOSD.xml")
{
+ m_loadType = LOAD_ON_GUI_INIT;
m_vecItems = new CFileItemList;
}
diff --git a/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp b/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp
index 32a9ba4..9999bdf 100644
--- a/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp
+++ b/xbmc/video/dialogs/GUIDialogAudioSubtitleSettings.cpp
@@ -62,7 +62,9 @@ using namespace std;
CGUIDialogAudioSubtitleSettings::CGUIDialogAudioSubtitleSettings()
: CGUIDialogSettingsManualBase(WINDOW_DIALOG_AUDIO_OSD_SETTINGS, "VideoOSDSettings.xml"),
m_passthrough(false)
-{ }
+{
+ m_loadType = LOAD_ON_GUI_INIT;
+}
CGUIDialogAudioSubtitleSettings::~CGUIDialogAudioSubtitleSettings()
{ }
diff --git a/xbmc/video/dialogs/GUIDialogSubtitles.cpp b/xbmc/video/dialogs/GUIDialogSubtitles.cpp
index e3939f1..e184d53 100644
--- a/xbmc/video/dialogs/GUIDialogSubtitles.cpp
+++ b/xbmc/video/dialogs/GUIDialogSubtitles.cpp
@@ -99,7 +99,7 @@ class CSubtitlesJob: public CJob
CGUIDialogSubtitles::CGUIDialogSubtitles(void)
: CGUIDialog(WINDOW_DIALOG_SUBTITLES, "DialogSubtitles.xml")
{
- m_loadType = KEEP_IN_MEMORY;
+ m_loadType = LOAD_ON_GUI_INIT;
m_subtitles = new CFileItemList;
m_serviceItems = new CFileItemList;
m_pausedOnRun = false;
diff --git a/xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp b/xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp
index 1ccabc8..43691bf 100644
--- a/xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp
+++ b/xbmc/video/dialogs/GUIDialogVideoBookmarks.cpp
@@ -61,7 +61,7 @@ CGUIDialogVideoBookmarks::CGUIDialogVideoBookmarks()
: CGUIDialog(WINDOW_DIALOG_VIDEO_BOOKMARKS, "VideoOSDBookmarks.xml")
{
m_vecItems = new CFileItemList;
- m_loadType = KEEP_IN_MEMORY;
+ m_loadType = LOAD_ON_GUI_INIT;
}
CGUIDialogVideoBookmarks::~CGUIDialogVideoBookmarks()
diff --git a/xbmc/video/dialogs/GUIDialogVideoOSD.cpp b/xbmc/video/dialogs/GUIDialogVideoOSD.cpp
index 98c3c5a..ba1b5f4 100644
--- a/xbmc/video/dialogs/GUIDialogVideoOSD.cpp
+++ b/xbmc/video/dialogs/GUIDialogVideoOSD.cpp
@@ -35,7 +35,7 @@ using namespace PVR;
CGUIDialogVideoOSD::CGUIDialogVideoOSD(void)
: CGUIDialog(WINDOW_DIALOG_VIDEO_OSD, "VideoOSD.xml")
{
- m_loadType = KEEP_IN_MEMORY;
+ m_loadType = LOAD_ON_GUI_INIT;
}
CGUIDialogVideoOSD::~CGUIDialogVideoOSD(void)
diff --git a/xbmc/video/dialogs/GUIDialogVideoSettings.cpp b/xbmc/video/dialogs/GUIDialogVideoSettings.cpp
index ca65fdc..fbd2a52 100644
--- a/xbmc/video/dialogs/GUIDialogVideoSettings.cpp
+++ b/xbmc/video/dialogs/GUIDialogVideoSettings.cpp
@@ -65,7 +65,9 @@ using namespace std;
CGUIDialogVideoSettings::CGUIDialogVideoSettings()
: CGUIDialogSettingsManualBase(WINDOW_DIALOG_VIDEO_OSD_SETTINGS, "VideoOSDSettings.xml"),
m_viewModeChanged(false)
-{ }
+{
+ m_loadType = LOAD_ON_GUI_INIT;
+}
CGUIDialogVideoSettings::~CGUIDialogVideoSettings()
{ }

View File

@ -1,11 +0,0 @@
diff -Naur xbmc-14-f6a3308/system/Lircmap.xml xbmc-14-f6a3308.patch/system/Lircmap.xml
--- xbmc-14-f6a3308/system/Lircmap.xml 2014-09-18 11:39:57.000000000 +0200
+++ xbmc-14-f6a3308.patch/system/Lircmap.xml 2014-09-18 21:36:50.615305824 +0200
@@ -574,6 +574,7 @@
<mymusic>KEY_AUDIO</mymusic>
<mypictures>KEY_CAMERA</mypictures>
<mytv>KEY_TUNER</mytv>
+ <mytv>KEY_TV</mytv>
<teletext>KEY_TEXT</teletext>
<one>KEY_NUMERIC_1</one>
<two>KEY_NUMERIC_2</two>

View File

@ -1,259 +0,0 @@
From 7f928f9f341b4321c24c58cb513edbc9107dbde2 Mon Sep 17 00:00:00 2001
From: fritsch <Peter.Fruehberger@gmail.com>
Date: Thu, 29 Jan 2015 14:55:18 +0100
Subject: [PATCH 1/5] dvdplayer: fix calculation of level when data based
---
xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
index f030e37..3a96bbc 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
@@ -869,7 +869,7 @@ int CDVDPlayerVideo::GetLevel() const
int datasize = m_messageQueue.GetDataSize();
if (m_pVideoCodec)
datasize += m_pVideoCodec->GetDataSize();
- return min(100, (int)(100 * datasize / (m_messageQueue.GetMaxDataSize() * m_messageQueue.GetMaxTimeSize())));
+ return min(100, (int)((100.0 * datasize) / m_messageQueue.GetMaxDataSize()));
}
else
{
--
1.9.1
From 5e40b28269cf962f1585c44a2e0ff0f17d456877 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de>
Date: Sat, 31 Jan 2015 21:16:33 +0100
Subject: [PATCH 2/5] dvdplayer: drop dead code - IHardwareDecoder::Section
---
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 6 +-----
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h | 1 -
xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h | 1 -
3 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
index ae67480..e4b7c74 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
@@ -451,10 +451,6 @@ int CDVDVideoCodecFFmpeg::Decode(uint8_t* pData, int iSize, double dts, double p
shared_ptr<CSingleLock> lock;
if(m_pHardware)
{
- CCriticalSection* section = m_pHardware->Section();
- if(section)
- lock = shared_ptr<CSingleLock>(new CSingleLock(*section));
-
int result;
if(pData)
result = m_pHardware->Check(m_pCodecContext);
@@ -909,4 +905,4 @@ void CDVDVideoCodecFFmpeg::DisposeHWDecoders()
m_disposeDecoders.back()->Release();
m_disposeDecoders.pop_back();
}
-}
\ No newline at end of file
+}
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
index f18da12..ed806f8 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h
@@ -52,7 +52,6 @@ public:
virtual unsigned GetAllowedReferences() { return 0; }
virtual bool CanSkipDeint() {return false; }
virtual const std::string Name() = 0;
- virtual CCriticalSection* Section() { return NULL; }
};
CDVDVideoCodecFFmpeg();
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h
index 95adb94..5586259 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h
@@ -39,7 +39,6 @@ public:
virtual int Check (AVCodecContext* avctx);
virtual void Close();
virtual const std::string Name() { return "vda"; }
- virtual CCriticalSection* Section() { return NULL; }
virtual unsigned GetAllowedReferences();
int GetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags);
--
1.9.1
From 0949bda558b4dfa80bd81c828e779ef152197460 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de>
Date: Sat, 31 Jan 2015 22:29:11 +0100
Subject: [PATCH 3/5] dvdplayer: do not reset hw decoder if just ffmpeg
get_buffer failed
---
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h | 1 +
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h
index 1dd7590..909704e 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h
@@ -171,6 +171,7 @@ class CDVDCodecOptions;
#define VC_USERDATA 0x00000008 // the decoder found some userdata, call Decode(NULL, 0) again to parse the rest of the data
#define VC_FLUSHED 0x00000010 // the decoder lost it's state, we need to restart decoding again
#define VC_DROPPED 0x00000020 // needed to identify if a picture was dropped
+#define VC_NOBUFFER 0x00000040 // last FFmpeg GetBuffer failed
class CDVDVideoCodec
{
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
index e4b7c74..5ec0e9b 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
@@ -495,6 +495,15 @@ int CDVDVideoCodecFFmpeg::Decode(uint8_t* pData, int iSize, double dts, double p
if (len < 0)
{
+ if(m_pHardware)
+ {
+ int result = m_pHardware->Check(m_pCodecContext);
+ if (result & VC_NOBUFFER)
+ {
+ result = m_pHardware->Decode(m_pCodecContext, NULL);
+ return result;
+ }
+ }
CLog::Log(LOGERROR, "%s - avcodec_decode_video returned failure", __FUNCTION__);
return VC_ERROR;
}
--
1.9.1
From 6eb4d52bf0183078cc8cbeb3f235e867066ae998 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de>
Date: Sun, 1 Feb 2015 07:47:12 +0100
Subject: [PATCH 4/5] VAAPI: avoid reset when running out of surfaces
---
xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp | 15 ++++++++++++---
xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h | 1 +
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
index ed0b745..0f91b02 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp
@@ -468,6 +468,7 @@ CDecoder::CDecoder() : m_vaapiOutput(&m_inMsgEvent)
m_vaapiConfig.contextId = VA_INVALID_ID;
m_vaapiConfig.configId = VA_INVALID_ID;
m_avctx = NULL;
+ m_getBufferError = false;
}
CDecoder::~CDecoder()
@@ -695,9 +696,9 @@ int CDecoder::FFGetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags)
uint16_t decoded, processed, render;
bool vpp;
va->m_bufferStats.Get(decoded, processed, render, vpp);
- CLog::Log(LOGERROR, "VAAPI::FFGetBuffer - no surface available - dec: %d, render: %d",
+ CLog::Log(LOGWARNING, "VAAPI::FFGetBuffer - no surface available - dec: %d, render: %d",
decoded, render);
- va->m_DisplayState = VAAPI_ERROR;
+ va->m_getBufferError = true;
return -1;
}
@@ -732,6 +733,8 @@ void CDecoder::FFReleaseBuffer(uint8_t *data)
int CDecoder::Decode(AVCodecContext* avctx, AVFrame* pFrame)
{
+ m_getBufferError = false;
+
int result = Check(avctx);
if (result)
return result;
@@ -848,6 +851,7 @@ int CDecoder::Decode(AVCodecContext* avctx, AVFrame* pFrame)
int CDecoder::Check(AVCodecContext* avctx)
{
+ int ret = 0;
EDisplayState state;
{ CSingleLock lock(m_DecoderSection);
@@ -889,7 +893,12 @@ int CDecoder::Check(AVCodecContext* avctx)
else
return VC_ERROR;
}
- return 0;
+
+ if (m_getBufferError)
+ ret |= VC_NOBUFFER;
+
+ m_getBufferError = false;
+ return ret;
}
bool CDecoder::GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h
index 6b2b67a..f737edc 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h
@@ -449,6 +449,7 @@ protected:
CVideoSurfaces m_videoSurfaces;
vaapi_context m_hwContext;
AVCodecContext* m_avctx;
+ bool m_getBufferError;
COutput m_vaapiOutput;
CVaapiBufferStats m_bufferStats;
--
1.9.1
From fe1f52cf795348b0a6816647acf46343b83dec4e Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de>
Date: Sun, 1 Feb 2015 09:25:12 +0100
Subject: [PATCH 5/5] dvdplayer: avoid unwanted dropping in output stage of
video
Conflicts:
xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
---
xbmc/cores/dvdplayer/DVDPlayerVideo.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
index 3a96bbc..4556cc8 100644
--- a/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
+++ b/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp
@@ -1219,9 +1219,12 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts)
AutoCrop(pPicture);
- int buffer = g_renderManager.WaitForBuffer(m_bStop, std::max(DVD_TIME_TO_MSEC(iSleepTime) + 500, 1));
+ int buffer = g_renderManager.WaitForBuffer(m_bStop, std::max(DVD_TIME_TO_MSEC(iSleepTime) + 500, 50));
if (buffer < 0)
+ {
+ m_droppingStats.AddOutputDropGain(pts, 1/m_fFrameRate);
return EOS_DROPPED;
+ }
ProcessOverlays(pPicture, pts);
@@ -1236,7 +1239,10 @@ int CDVDPlayerVideo::OutputPicture(const DVDVideoPicture* src, double pts)
}
if (index < 0)
+ {
+ m_droppingStats.AddOutputDropGain(pts, 1/m_fFrameRate);
return EOS_DROPPED;
+ }
g_renderManager.FlipPage(CThread::m_bStop, (iCurrentClock + iSleepTime) / DVD_TIME_BASE, pts, -1, mDisplayField);
--
1.9.1

File diff suppressed because it is too large Load Diff

View File

@ -1,116 +0,0 @@
From 07a17ab720e13d56d8438aa460b0052aa9c02060 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de>
Date: Fri, 20 Mar 2015 10:25:48 +0100
Subject: [PATCH] fix frametime for active vsync
---
xbmc/Application.cpp | 11 ++++++++++-
xbmc/utils/TimeUtils.cpp | 23 +++++++++++++++++++----
xbmc/utils/TimeUtils.h | 2 +-
3 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index a79c7dd..eef7f02 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -2216,6 +2216,7 @@ void CApplication::Render()
bool hasRendered = false;
bool limitFrames = false;
unsigned int singleFrameTime = 10; // default limit 100 fps
+ bool vsync = true;
// Whether externalplayer is playing and we're unfocused
bool extPlayerActive = m_pPlayer->GetCurrentPlayer() == EPC_EXTPLAYER && m_pPlayer->IsPlaying() && !m_AppFocused;
@@ -2228,6 +2229,8 @@ void CApplication::Render()
if (!extPlayerActive && g_graphicsContext.IsFullScreenVideo() && !m_pPlayer->IsPausedPlayback())
{
m_bPresentFrame = g_renderManager.HasFrame();
+ if (vsync_mode == VSYNC_DISABLED)
+ vsync = false;
}
else
{
@@ -2236,9 +2239,15 @@ void CApplication::Render()
// DXMERGE - we checked for g_videoConfig.GetVSyncMode() before this
// perhaps allowing it to be set differently than the UI option??
if (vsync_mode == VSYNC_DISABLED || vsync_mode == VSYNC_VIDEO)
+ {
limitFrames = true; // not using vsync.
+ vsync = false;
+ }
else if ((g_infoManager.GetFPS() > g_graphicsContext.GetFPS() + 10) && g_infoManager.GetFPS() > 1000 / singleFrameTime)
+ {
limitFrames = true; // using vsync, but it isn't working.
+ vsync = false;
+ }
if (limitFrames)
{
@@ -2334,7 +2343,7 @@ void CApplication::Render()
}
m_lastFrameTime = XbmcThreads::SystemClockMillis();
- CTimeUtils::UpdateFrameTime(flip);
+ CTimeUtils::UpdateFrameTime(flip, vsync);
g_renderManager.UpdateResolution();
g_renderManager.ManageCaptures();
diff --git a/xbmc/utils/TimeUtils.cpp b/xbmc/utils/TimeUtils.cpp
index 9f2e135..57e5e90 100644
--- a/xbmc/utils/TimeUtils.cpp
+++ b/xbmc/utils/TimeUtils.cpp
@@ -21,6 +21,7 @@
#include "TimeUtils.h"
#include "XBDateTime.h"
#include "threads/SystemClock.h"
+#include "guilib/GraphicContext.h"
#if (defined HAVE_CONFIG_H) && (!defined TARGET_WINDOWS)
#include "config.h"
@@ -72,12 +73,26 @@ int64_t CurrentHostFrequency(void)
CTimeSmoother CTimeUtils::frameTimer;
unsigned int CTimeUtils::frameTime = 0;
-void CTimeUtils::UpdateFrameTime(bool flip)
+void CTimeUtils::UpdateFrameTime(bool flip, bool vsync)
{
unsigned int currentTime = XbmcThreads::SystemClockMillis();
- if (flip)
- frameTimer.AddTimeStamp(currentTime);
- frameTime = frameTimer.GetNextFrameTime(currentTime);
+ if (vsync)
+ {
+ unsigned int last = frameTime;
+ while (frameTime < currentTime)
+ {
+ frameTime += (unsigned int)(1000 / g_graphicsContext.GetFPS());
+ // observe wrap around
+ if (frameTime < last)
+ break;
+ }
+ }
+ else
+ {
+ if (flip)
+ frameTimer.AddTimeStamp(currentTime);
+ frameTime = frameTimer.GetNextFrameTime(currentTime);
+ }
}
unsigned int CTimeUtils::GetFrameTime()
diff --git a/xbmc/utils/TimeUtils.h b/xbmc/utils/TimeUtils.h
index f8796d5..e07540f 100644
--- a/xbmc/utils/TimeUtils.h
+++ b/xbmc/utils/TimeUtils.h
@@ -32,7 +32,7 @@ int64_t CurrentHostFrequency(void);
class CTimeUtils
{
public:
- static void UpdateFrameTime(bool flip); ///< update the frame time. Not threadsafe
+ static void UpdateFrameTime(bool flip, bool vsync); ///< update the frame time. Not threadsafe
static unsigned int GetFrameTime(); ///< returns the frame time in MS. Not threadsafe
static CDateTime GetLocalTime(time_t time);
--
1.9.1

View File

@ -1,26 +0,0 @@
From 68428562758adbcb597cadc05ba124a6bde97291 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de>
Date: Fri, 13 Mar 2015 20:57:17 +0100
Subject: [PATCH] guilib: only update scrollinfo if frametime did change
---
xbmc/guilib/GUIFont.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xbmc/guilib/GUIFont.cpp b/xbmc/guilib/GUIFont.cpp
index a7ee668..06232cb 100644
--- a/xbmc/guilib/GUIFont.cpp
+++ b/xbmc/guilib/GUIFont.cpp
@@ -52,7 +52,8 @@ float CScrollInfo::GetPixelsPerFrame()
delta = 100; // assume a minimum of 10 fps
m_lastFrameTime = currentTime;
// do an exponential moving average of the frame time
- m_averageFrameTime = m_averageFrameTime + (delta - m_averageFrameTime) * alphaEMA;
+ if (delta)
+ m_averageFrameTime = m_averageFrameTime + (delta - m_averageFrameTime) * alphaEMA;
// and multiply by pixel speed (per ms) to get number of pixels to move this frame
return pixelSpeed * m_averageFrameTime;
}
--
1.9.1

View File

@ -1,73 +0,0 @@
From d8fff72de0159160fb4ca1c249c8365e9e1b6785 Mon Sep 17 00:00:00 2001
From: wsnipex <wsnipex@a1.net>
Date: Wed, 11 Feb 2015 16:58:25 +0100
Subject: [PATCH] [curl] use better method to stat shoutcast and friends
---
xbmc/filesystem/CurlFile.cpp | 31 +++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/xbmc/filesystem/CurlFile.cpp b/xbmc/filesystem/CurlFile.cpp
index 7d68dab..ee63ff5 100644
--- a/xbmc/filesystem/CurlFile.cpp
+++ b/xbmc/filesystem/CurlFile.cpp
@@ -123,6 +123,19 @@ extern "C" size_t header_callback(void *ptr, size_t size, size_t nmemb, void *st
return state->HeaderCallback(ptr, size, nmemb);
}
+/* used only by CCurlFile::Stat to bail out of unwanted transfers */
+extern "C" int transfer_abort_callback(void *clientp,
+ curl_off_t dltotal,
+ curl_off_t dlnow,
+ curl_off_t ultotal,
+ curl_off_t ulnow)
+{
+ if(dlnow > 0)
+ return 1;
+ else
+ return 0;
+}
+
/* fix for silly behavior of realloc */
static inline void* realloc_simple(void *ptr, size_t size)
{
@@ -1285,7 +1298,6 @@ int CCurlFile::Stat(const CURL& url, struct __stat64* buffer)
SetRequestHeaders(m_state);
g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_TIMEOUT, g_advancedSettings.m_curlconnecttimeout);
g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_NOBODY, 1);
- g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_WRITEDATA, NULL); /* will cause write failure*/
g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_FILETIME , 1);
if(url2.IsProtocol("ftp"))
@@ -1311,25 +1323,20 @@ int CCurlFile::Stat(const CURL& url, struct __stat64* buffer)
|| result == CURLE_RECV_ERROR /* some silly shoutcast servers */ )
{
/* some http servers and shoutcast servers don't give us any data on a head request */
- /* request normal and just fail out, it's their loss */
+ /* request normal and just bail out via progress meter callback after we received data */
/* somehow curl doesn't reset CURLOPT_NOBODY properly so reset everything */
SetCommonOptions(m_state);
SetRequestHeaders(m_state);
g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_TIMEOUT, g_advancedSettings.m_curlconnecttimeout);
- g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_RANGE, "0-0");
- g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_WRITEDATA, NULL); /* will cause write failure*/
- g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_FILETIME, 1);
- result = g_curlInterface.easy_perform(m_state->m_easyHandle);
- }
+ g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_FILETIME, 1);
+ g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_XFERINFOFUNCTION, transfer_abort_callback);
+ g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_NOPROGRESS, 0);
- if( result == CURLE_HTTP_RANGE_ERROR )
- {
- /* crap can't use the range option, disable it and try again */
- g_curlInterface.easy_setopt(m_state->m_easyHandle, CURLOPT_RANGE, NULL);
result = g_curlInterface.easy_perform(m_state->m_easyHandle);
+
}
- if( result != CURLE_WRITE_ERROR && result != CURLE_OK )
+ if( result != CURLE_ABORTED_BY_CALLBACK && result != CURLE_OK )
{
g_curlInterface.easy_release(&m_state->m_easyHandle, NULL);
errno = ENOENT;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,19 @@
From 15445c00a63921fde8c22a9229186d7cb8117778 Mon Sep 17 00:00:00 2001 From 001de52ae30377edcd03ba050c454255da99cb07 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com> From: Alex Deryskyba <alex@codesnake.com>
Date: Wed, 16 Apr 2014 23:08:58 +0300 Date: Wed, 16 Apr 2014 23:08:58 +0300
Subject: [PATCH 03/17] Enable true 1920x1080 output without upscaling on Subject: [PATCH 03/17] Enable true 1920x1080 output without upscaling on
Amlogic-based devices. Amlogic-based devices.
--- ---
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 44 +++++++++++++++++++++++++-- xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 44 +++++++++++++++++++++++++++--
xbmc/windowing/egl/EGLNativeTypeAmlogic.h | 3 ++ xbmc/windowing/egl/EGLNativeTypeAmlogic.h | 3 ++
2 files changed, 44 insertions(+), 3 deletions(-) 2 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
index 7064836..362db6d 100644 index f2073cb..3c7a8e6 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp --- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp +++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
@@ -87,9 +87,12 @@ bool CEGLNativeTypeAmlogic::CreateNativeWindow() @@ -88,9 +88,12 @@ bool CEGLNativeTypeAmlogic::CreateNativeWindow()
if (!nativeWindow) if (!nativeWindow)
return false; return false;
@ -28,7 +28,7 @@ index 7064836..362db6d 100644
return true; return true;
#else #else
return false; return false;
@@ -134,6 +137,12 @@ bool CEGLNativeTypeAmlogic::GetNativeResolution(RESOLUTION_INFO *res) const @@ -135,6 +138,12 @@ bool CEGLNativeTypeAmlogic::GetNativeResolution(RESOLUTION_INFO *res) const
bool CEGLNativeTypeAmlogic::SetNativeResolution(const RESOLUTION_INFO &res) bool CEGLNativeTypeAmlogic::SetNativeResolution(const RESOLUTION_INFO &res)
{ {
@ -41,19 +41,19 @@ index 7064836..362db6d 100644
switch((int)(0.5 + res.fRefreshRate)) switch((int)(0.5 + res.fRefreshRate))
{ {
default: default:
@@ -219,7 +228,10 @@ bool CEGLNativeTypeAmlogic::SetDisplayResolution(const char *resolution) @@ -220,7 +229,10 @@ bool CEGLNativeTypeAmlogic::SetDisplayResolution(const char *resolution)
CStdString mode = resolution; std::string mode = resolution;
// switch display resolution // switch display resolution
aml_set_sysfs_str("/sys/class/display/mode", mode.c_str()); SysfsUtils::SetString("/sys/class/display/mode", mode.c_str());
- SetupVideoScaling(mode.c_str()); - SetupVideoScaling(mode.c_str());
+ +
+ RESOLUTION_INFO res; + RESOLUTION_INFO res;
+ aml_mode_to_resolution(mode, &res); + aml_mode_to_resolution(mode.c_str(), &res);
+ SetFramebufferResolution(res); + SetFramebufferResolution(res);
return true; return true;
} }
@@ -304,3 +316,29 @@ void CEGLNativeTypeAmlogic::DisableFreeScale() @@ -305,3 +317,29 @@ void CEGLNativeTypeAmlogic::DisableFreeScale()
close(fd0); close(fd0);
} }
} }
@ -97,5 +97,5 @@ index cc34ff7..781a153 100644
std::string m_framebuffer_name; std::string m_framebuffer_name;
}; };
-- --
1.7.10.4 2.1.4

View File

@ -1,26 +1,17 @@
From 904bd346a5b7ca168a1137768dae5c9c731d8127 Mon Sep 17 00:00:00 2001 From 41fa8f5e4ad5498417a8de12031003dc1c13ea19 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com> From: Alex Deryskyba <alex@codesnake.com>
Date: Tue, 22 Jul 2014 12:18:29 +0300 Date: Tue, 22 Jul 2014 12:18:29 +0300
Subject: [PATCH 04/17] Add support for retrieval of CPU temperature on Subject: [PATCH 04/17] Add support for retrieval of CPU temperature on Amlogic
Amlogic
--- ---
xbmc/utils/CPUInfo.cpp | 14 +++++++++++++- xbmc/utils/CPUInfo.cpp | 13 ++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-) 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/xbmc/utils/CPUInfo.cpp b/xbmc/utils/CPUInfo.cpp diff --git a/xbmc/utils/CPUInfo.cpp b/xbmc/utils/CPUInfo.cpp
index 71aa745..f80e7ba 100644 index 5f5bf80..c840ab6 100644
--- a/xbmc/utils/CPUInfo.cpp --- a/xbmc/utils/CPUInfo.cpp
+++ b/xbmc/utils/CPUInfo.cpp +++ b/xbmc/utils/CPUInfo.cpp
@@ -18,6 +18,7 @@ @@ -97,6 +97,10 @@
*
*/
+#include "system.h"
#include "CPUInfo.h"
#include "Temperature.h"
#include <string>
@@ -95,6 +96,10 @@
#include "settings/AdvancedSettings.h" #include "settings/AdvancedSettings.h"
#include "utils/StringUtils.h" #include "utils/StringUtils.h"
@ -31,7 +22,7 @@ index 71aa745..f80e7ba 100644
using namespace std; using namespace std;
// In milliseconds // In milliseconds
@@ -265,6 +270,10 @@ CCPUInfo::CCPUInfo(void) @@ -267,6 +271,10 @@ CCPUInfo::CCPUInfo(void)
m_fProcTemperature = fopen("/sys/class/hwmon/hwmon0/temp1_input", "r"); m_fProcTemperature = fopen("/sys/class/hwmon/hwmon0/temp1_input", "r");
if (m_fProcTemperature == NULL) if (m_fProcTemperature == NULL)
m_fProcTemperature = fopen("/sys/class/thermal/thermal_zone0/temp", "r"); // On Raspberry PIs m_fProcTemperature = fopen("/sys/class/thermal/thermal_zone0/temp", "r"); // On Raspberry PIs
@ -42,7 +33,7 @@ index 71aa745..f80e7ba 100644
m_fCPUFreq = fopen ("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", "r"); m_fCPUFreq = fopen ("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", "r");
if (!m_fCPUFreq) if (!m_fCPUFreq)
@@ -607,7 +616,10 @@ bool CCPUInfo::getTemperature(CTemperature& temperature) @@ -609,7 +617,10 @@ bool CCPUInfo::getTemperature(CTemperature& temperature)
if (!ret) if (!ret)
{ {
ret = fscanf(m_fProcTemperature, "%d", &value); ret = fscanf(m_fProcTemperature, "%d", &value);
@ -55,5 +46,5 @@ index 71aa745..f80e7ba 100644
ret++; ret++;
} }
-- --
1.7.10.4 2.1.4

View File

@ -1,19 +1,19 @@
From 56d4e85af28b0d65859fb84bb6b6582bf3c71a7b Mon Sep 17 00:00:00 2001 From 0fdd487aa04abdbf65402b720e363e4890d98ad1 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com> From: Alex Deryskyba <alex@codesnake.com>
Date: Tue, 29 Jul 2014 10:31:07 +0300 Date: Tue, 29 Jul 2014 10:31:07 +0300
Subject: [PATCH 06/17] Fix the issue when the video display is disabled after Subject: [PATCH 06/17] Fix the issue when the video display is disabled after
a resolution change a resolution change
--- ---
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 55 +-------------------------- xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 55 +----------------------------
xbmc/windowing/egl/EGLNativeTypeAmlogic.h | 1 - xbmc/windowing/egl/EGLNativeTypeAmlogic.h | 1 -
2 files changed, 1 insertion(+), 55 deletions(-) 2 files changed, 1 insertion(+), 55 deletions(-)
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
index 8e4bf37..2d5c4a1 100644 index c9a3bd8..6b38889 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp --- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp +++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
@@ -65,7 +65,7 @@ void CEGLNativeTypeAmlogic::Initialize() @@ -66,7 +66,7 @@ void CEGLNativeTypeAmlogic::Initialize()
aml_permissions(); aml_permissions();
aml_cpufreq_min(true); aml_cpufreq_min(true);
aml_cpufreq_max(true); aml_cpufreq_max(true);
@ -22,52 +22,52 @@ index 8e4bf37..2d5c4a1 100644
} }
void CEGLNativeTypeAmlogic::Destroy() void CEGLNativeTypeAmlogic::Destroy()
{ {
@@ -277,64 +277,11 @@ void CEGLNativeTypeAmlogic::SetupVideoScaling(const char *mode) @@ -278,64 +278,11 @@ void CEGLNativeTypeAmlogic::SetupVideoScaling(const char *mode)
aml_set_sysfs_int("/sys/class/graphics/fb0/blank", 0); SysfsUtils::SetInt("/sys/class/graphics/fb0/blank", 0);
} }
-void CEGLNativeTypeAmlogic::EnableFreeScale() -void CEGLNativeTypeAmlogic::EnableFreeScale()
-{ -{
- // enable OSD free scale using frame buffer size of 720p - // enable OSD free scale using frame buffer size of 720p
- aml_set_sysfs_int("/sys/class/graphics/fb0/free_scale", 0); - SysfsUtils::SetInt("/sys/class/graphics/fb0/free_scale", 0);
- aml_set_sysfs_int("/sys/class/graphics/fb1/free_scale", 0); - SysfsUtils::SetInt("/sys/class/graphics/fb1/free_scale", 0);
- aml_set_sysfs_int("/sys/class/graphics/fb0/scale_width", 1280); - SysfsUtils::SetInt("/sys/class/graphics/fb0/scale_width", 1280);
- aml_set_sysfs_int("/sys/class/graphics/fb0/scale_height", 720); - SysfsUtils::SetInt("/sys/class/graphics/fb0/scale_height", 720);
- aml_set_sysfs_int("/sys/class/graphics/fb1/scale_width", 1280); - SysfsUtils::SetInt("/sys/class/graphics/fb1/scale_width", 1280);
- aml_set_sysfs_int("/sys/class/graphics/fb1/scale_height", 720); - SysfsUtils::SetInt("/sys/class/graphics/fb1/scale_height", 720);
- -
- // enable video free scale (scaling to 1920x1080 with frame buffer size 1280x720) - // enable video free scale (scaling to 1920x1080 with frame buffer size 1280x720)
- aml_set_sysfs_int("/sys/class/ppmgr/ppscaler", 0); - SysfsUtils::SetInt("/sys/class/ppmgr/ppscaler", 0);
- aml_set_sysfs_int("/sys/class/video/disable_video", 1); - SysfsUtils::SetInt("/sys/class/video/disable_video", 1);
- aml_set_sysfs_int("/sys/class/ppmgr/ppscaler", 1); - SysfsUtils::SetInt("/sys/class/ppmgr/ppscaler", 1);
- aml_set_sysfs_str("/sys/class/ppmgr/ppscaler_rect", "0 0 1919 1079 0"); - SysfsUtils::SetString("/sys/class/ppmgr/ppscaler_rect", "0 0 1919 1079 0");
- aml_set_sysfs_str("/sys/class/ppmgr/disp", "1280 720"); - SysfsUtils::SetString("/sys/class/ppmgr/disp", "1280 720");
- // - //
- aml_set_sysfs_int("/sys/class/graphics/fb0/scale_width", 1280); - SysfsUtils::SetInt("/sys/class/graphics/fb0/scale_width", 1280);
- aml_set_sysfs_int("/sys/class/graphics/fb0/scale_height", 720); - SysfsUtils::SetInt("/sys/class/graphics/fb0/scale_height", 720);
- aml_set_sysfs_int("/sys/class/graphics/fb1/scale_width", 1280); - SysfsUtils::SetInt("/sys/class/graphics/fb1/scale_width", 1280);
- aml_set_sysfs_int("/sys/class/graphics/fb1/scale_height", 720); - SysfsUtils::SetInt("/sys/class/graphics/fb1/scale_height", 720);
- // - //
- aml_set_sysfs_int("/sys/class/video/disable_video", 2); - SysfsUtils::SetInt("/sys/class/video/disable_video", 2);
- aml_set_sysfs_str("/sys/class/display/axis", "0 0 1279 719 0 0 0 0"); - SysfsUtils::SetString("/sys/class/display/axis", "0 0 1279 719 0 0 0 0");
- aml_set_sysfs_str("/sys/class/ppmgr/ppscaler_rect", "0 0 1279 719 1"); - SysfsUtils::SetString("/sys/class/ppmgr/ppscaler_rect", "0 0 1279 719 1");
- // - //
- aml_set_sysfs_int("/sys/class/graphics/fb0/free_scale", 1); - SysfsUtils::SetInt("/sys/class/graphics/fb0/free_scale", 1);
- aml_set_sysfs_int("/sys/class/graphics/fb1/free_scale", 1); - SysfsUtils::SetInt("/sys/class/graphics/fb1/free_scale", 1);
- aml_set_sysfs_str("/sys/class/graphics/fb0/free_scale_axis", "0 0 1279 719"); - SysfsUtils::SetString("/sys/class/graphics/fb0/free_scale_axis", "0 0 1279 719");
-} -}
- -
void CEGLNativeTypeAmlogic::DisableFreeScale() void CEGLNativeTypeAmlogic::DisableFreeScale()
{ {
// turn off frame buffer freescale // turn off frame buffer freescale
aml_set_sysfs_int("/sys/class/graphics/fb0/free_scale", 0); SysfsUtils::SetInt("/sys/class/graphics/fb0/free_scale", 0);
aml_set_sysfs_int("/sys/class/graphics/fb1/free_scale", 0); SysfsUtils::SetInt("/sys/class/graphics/fb1/free_scale", 0);
- aml_set_sysfs_str("/sys/class/graphics/fb0/free_scale_axis", "0 0 1279 719"); - SysfsUtils::SetString("/sys/class/graphics/fb0/free_scale_axis", "0 0 1279 719");
- -
- aml_set_sysfs_int("/sys/class/ppmgr/ppscaler", 0); - SysfsUtils::SetInt("/sys/class/ppmgr/ppscaler", 0);
- aml_set_sysfs_int("/sys/class/video/disable_video", 0); - SysfsUtils::SetInt("/sys/class/video/disable_video", 0);
- // now default video display to off - // now default video display to off
- aml_set_sysfs_int("/sys/class/video/disable_video", 1); - SysfsUtils::SetInt("/sys/class/video/disable_video", 1);
- -
- // revert display axis - // revert display axis
- int fd0; - int fd0;
@ -78,9 +78,9 @@ index 8e4bf37..2d5c4a1 100644
- struct fb_var_screeninfo vinfo; - struct fb_var_screeninfo vinfo;
- if (ioctl(fd0, FBIOGET_VSCREENINFO, &vinfo) == 0) - if (ioctl(fd0, FBIOGET_VSCREENINFO, &vinfo) == 0)
- { - {
- char daxis_str[255] = {0}; - char daxis_str[256] = {0};
- sprintf(daxis_str, "%d %d %d %d 0 0 0 0", 0, 0, vinfo.xres-1, vinfo.yres-1); - sprintf(daxis_str, "%d %d %d %d 0 0 0 0", 0, 0, vinfo.xres-1, vinfo.yres-1);
- aml_set_sysfs_str("/sys/class/display/axis", daxis_str); - SysfsUtils::SetString("/sys/class/display/axis", daxis_str);
- } - }
- close(fd0); - close(fd0);
- } - }
@ -100,5 +100,5 @@ index 8042f36..2e52b7e 100644
private: private:
-- --
1.7.10.4 2.1.4

View File

@ -9,13 +9,13 @@ with libsmbclient if the libc that is currently used doesn't contain some functi
such as dn_expand (which are often included in libc), but are actually included in such as dn_expand (which are often included in libc), but are actually included in
libresolv. libresolv.
--- ---
configure.in | 2 +- configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.in b/configure.in diff --git a/configure.ac b/configure.ac
index ff4022f..079fa27 100644 index ff4022f..079fa27 100644
--- a/configure.in --- a/configure.ac
+++ b/configure.in +++ b/configure.ac
@@ -1475,7 +1475,7 @@ fi @@ -1475,7 +1475,7 @@ fi
# samba # samba
if test "x$use_samba" != "xno"; then if test "x$use_samba" != "xno"; then

View File

@ -1,4 +1,4 @@
From c1992302a958e8b98ce5b0181434b800bf61e78e Mon Sep 17 00:00:00 2001 From a9ff99a36f9e6cea70f7274312a127563af15dc5 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com> From: Alex Deryskyba <alex@codesnake.com>
Date: Sun, 21 Sep 2014 17:20:25 +0300 Date: Sun, 21 Sep 2014 17:20:25 +0300
Subject: [PATCH 12/17] Fix incorrect frame rate detection of some videos with Subject: [PATCH 12/17] Fix incorrect frame rate detection of some videos with
@ -8,17 +8,17 @@ Use FFMPEG's r_frame_rate, if it as valid, as a video stream frame rate, otherwi
Also remove CDVDStreamInfo.rfpsscale, CDVDStreamInfo.rfpsrate, CDemuxStreamVideo.irFpsScale and CDemuxStreamVideo.irFpsRate, Also remove CDVDStreamInfo.rfpsscale, CDVDStreamInfo.rfpsrate, CDemuxStreamVideo.irFpsScale and CDemuxStreamVideo.irFpsRate,
they are not needed anymore. they are not needed anymore.
--- ---
xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h | 4 --- xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h | 4 ---
.../cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 29 +++++++------------- .../cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp | 29 ++++++++--------------
xbmc/cores/dvdplayer/DVDStreamInfo.cpp | 8 ------ xbmc/cores/dvdplayer/DVDStreamInfo.cpp | 8 ------
xbmc/cores/dvdplayer/DVDStreamInfo.h | 2 -- xbmc/cores/dvdplayer/DVDStreamInfo.h | 2 --
4 files changed, 10 insertions(+), 33 deletions(-) 4 files changed, 10 insertions(+), 33 deletions(-)
diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
index 40c16c0..98c3513 100644 index d69991e..faf3c9b 100644
--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h --- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
+++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h +++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemux.h
@@ -148,8 +148,6 @@ public: @@ -151,8 +151,6 @@ public:
{ {
iFpsScale = 0; iFpsScale = 0;
iFpsRate = 0; iFpsRate = 0;
@ -27,7 +27,7 @@ index 40c16c0..98c3513 100644
iHeight = 0; iHeight = 0;
iWidth = 0; iWidth = 0;
fAspect = 0.0; fAspect = 0.0;
@@ -164,8 +162,6 @@ public: @@ -167,8 +165,6 @@ public:
virtual ~CDemuxStreamVideo() {} virtual ~CDemuxStreamVideo() {}
int iFpsScale; // scale of 1000 and a rate of 29970 will result in 29.97 fps int iFpsScale; // scale of 1000 and a rate of 29970 will result in 29.97 fps
int iFpsRate; int iFpsRate;
@ -37,10 +37,10 @@ index 40c16c0..98c3513 100644
int iWidth; // width of the stream reported by the demuxer int iWidth; // width of the stream reported by the demuxer
float fAspect; // display aspect of stream float fAspect; // display aspect of stream
diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp diff --git a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
index ac4bfdb..0025f3a6 100644 index 1315117..5367b28 100644
--- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp --- a/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
+++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp +++ b/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
@@ -1123,34 +1123,25 @@ CDemuxStream* CDVDDemuxFFmpeg::AddStream(int iId) @@ -1125,34 +1125,25 @@ CDemuxStream* CDVDDemuxFFmpeg::AddStream(int iId)
#else #else
AVRational r_frame_rate = pStream->r_frame_rate; AVRational r_frame_rate = pStream->r_frame_rate;
#endif #endif
@ -126,12 +126,12 @@ index c1dbd85..03facbe 100644
width = stream->iWidth; width = stream->iWidth;
aspect = stream->fAspect; aspect = stream->fAspect;
diff --git a/xbmc/cores/dvdplayer/DVDStreamInfo.h b/xbmc/cores/dvdplayer/DVDStreamInfo.h diff --git a/xbmc/cores/dvdplayer/DVDStreamInfo.h b/xbmc/cores/dvdplayer/DVDStreamInfo.h
index de66625..d775d78 100644 index c0e22a2..8953ff3 100644
--- a/xbmc/cores/dvdplayer/DVDStreamInfo.h --- a/xbmc/cores/dvdplayer/DVDStreamInfo.h
+++ b/xbmc/cores/dvdplayer/DVDStreamInfo.h +++ b/xbmc/cores/dvdplayer/DVDStreamInfo.h
@@ -58,8 +58,6 @@ public: @@ -58,8 +58,6 @@ public:
// VIDEO // VIDEO
int fpsscale; // scale of 1000 and a rate of 29970 will result in 29.97 fps int fpsscale; // scale of 1001 and a rate of 60000 will result in 59.94 fps
int fpsrate; int fpsrate;
- int rfpsscale; - int rfpsscale;
- int rfpsrate; - int rfpsrate;
@ -139,5 +139,5 @@ index de66625..d775d78 100644
int width; // width of the stream reported by the demuxer int width; // width of the stream reported by the demuxer
float aspect; // display aspect as reported by demuxer float aspect; // display aspect as reported by demuxer
-- --
1.7.10.4 2.1.4

View File

@ -1,30 +1,30 @@
From fbc3b79cb960d559aad3e0c125b1094cfee3142c Mon Sep 17 00:00:00 2001 From 6aa16d7fe7e6dbe95bdca8069a16d2aa415adf37 Mon Sep 17 00:00:00 2001
From: Alex Deryskyba <alex@codesnake.com> From: Alex Deryskyba <alex@codesnake.com>
Date: Tue, 3 Feb 2015 17:58:19 +0100 Date: Tue, 3 Feb 2015 17:58:19 +0100
Subject: [PATCH 16/17] [aml] Disable deinterlacing for HD content while video Subject: [PATCH 16/17] Disable deinterlacing for HD content while video is
is being played in a window to prevent screen being played in a window to prevent screen blinking in 1080p50/60hz display
blinking in 1080p50/60hz display modes modes
--- ---
xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp | 5 +++++ xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp | 5 +++++
1 file changed, 5 insertions(+) 1 file changed, 5 insertions(+)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
index f3c67ea..0410bfa 100644 index 2fad224..74804de 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
@@ -2226,6 +2226,11 @@ void CAMLCodec::SetVideoRect(const CRect &SrcRect, const CRect &DestRect) @@ -2261,6 +2261,11 @@ void CAMLCodec::SetVideoRect(const CRect &SrcRect, const CRect &DestRect)
CLog::Log(LOGDEBUG, "CAMLCodec::SetVideoRect:m_stereo_view(%d)", m_stereo_view); CLog::Log(LOGDEBUG, "CAMLCodec::SetVideoRect:m_stereo_view(%d)", m_stereo_view);
#endif #endif
+ if (dst_rect.Width() < display.Width() || dst_rect.Height() < display.Height()) + if (dst_rect.Width() < display.Width() || dst_rect.Height() < display.Height())
+ aml_set_sysfs_int("/sys/module/di/parameters/bypass_hd", 1); + SysfsUtils::SetInt("/sys/module/di/parameters/bypass_hd", 1);
+ else + else
+ aml_set_sysfs_int("/sys/module/di/parameters/bypass_hd", 0); + SysfsUtils::SetInt("/sys/module/di/parameters/bypass_hd", 0);
+ +
// goofy 0/1 based difference in aml axis coordinates. // goofy 0/1 based difference in aml axis coordinates.
// fix them. // fix them.
dst_rect.x2--; dst_rect.x2--;
-- --
1.7.10.4 2.1.4

View File

@ -1,28 +0,0 @@
From 5ea60323c4d6648943e774946010251e0f560a8d Mon Sep 17 00:00:00 2001
From: davilla <davilla@4pi.com>
Date: Wed, 3 Sep 2014 22:14:01 -0400
Subject: [PATCH 17/17] pivos: [amcodec-hack] pvr can reopen too fast, slow us
down a little
---
xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
index 0410bfa..66ec4f7 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
@@ -1632,6 +1632,10 @@ void CAMLCodec::CloseDecoder()
aml_set_sysfs_int("/sys/class/tsync/enable", 1);
ShowMainVideo(false);
+
+ // add a little delay after closing in case
+ // we are reopened too fast.
+ usleep(500 * 1000);
}
void CAMLCodec::Reset()
--
1.7.10.4

View File

@ -1,80 +0,0 @@
From 264be7a32fdb566ecf69933189553128c589c800 Mon Sep 17 00:00:00 2001
From: Stanislav Vlasic <svlasic@gmail.com>
Date: Mon, 13 Oct 2014 13:20:11 +0200
Subject: [PATCH 07/16] Add aml_support_hevc function and recognize S812 chip
---
xbmc/utils/AMLUtils.cpp | 26 ++++++++++++++++++++++++--
xbmc/utils/AMLUtils.h | 5 ++++-
2 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/xbmc/utils/AMLUtils.cpp b/xbmc/utils/AMLUtils.cpp
index 9553745..ac921db 100644
--- a/xbmc/utils/AMLUtils.cpp
+++ b/xbmc/utils/AMLUtils.cpp
@@ -159,6 +159,22 @@ void aml_permissions()
}
}
+bool aml_support_hevc()
+{
+ char valstr[1024];
+ if(aml_get_sysfs_str("/sys/class/amstream/vcodec_profile", valstr, 1024) != 0)
+ {
+ return false;
+ }
+ char* p = strstr(valstr, "hevc:");
+ if(p == NULL)
+ {
+ return false;
+ }
+
+ return true;
+}
+
enum AML_DEVICE_TYPE aml_get_device_type()
{
static enum AML_DEVICE_TYPE aml_device_type = AML_DEVICE_TYPE_UNINIT;
@@ -173,8 +189,14 @@ enum AML_DEVICE_TYPE aml_get_device_type()
aml_device_type = AML_DEVICE_TYPE_M3;
else if (cpu_hardware.find("Meson6") != std::string::npos)
aml_device_type = AML_DEVICE_TYPE_M6;
- else if (cpu_hardware.find("Meson8") != std::string::npos)
- aml_device_type = AML_DEVICE_TYPE_M8;
+ else if ((cpu_hardware.find("Meson8") != std::string::npos) && (cpu_hardware.find("Meson8B") == std::string::npos))
+ {
+ if (aml_support_hevc())
+ aml_device_type = AML_DEVICE_TYPE_M8M2;
+ else
+ aml_device_type = AML_DEVICE_TYPE_M8;
+ } else if (cpu_hardware.find("Meson8B") != std::string::npos)
+ aml_device_type = AML_DEVICE_TYPE_M8B;
else
aml_device_type = AML_DEVICE_TYPE_UNKNOWN;
}
diff --git a/xbmc/utils/AMLUtils.h b/xbmc/utils/AMLUtils.h
index 9778e9b..208f9d3 100644
--- a/xbmc/utils/AMLUtils.h
+++ b/xbmc/utils/AMLUtils.h
@@ -28,7 +28,9 @@ enum AML_DEVICE_TYPE
AML_DEVICE_TYPE_M1,
AML_DEVICE_TYPE_M3,
AML_DEVICE_TYPE_M6,
- AML_DEVICE_TYPE_M8
+ AML_DEVICE_TYPE_M8, // S802
+ AML_DEVICE_TYPE_M8B, // S805
+ AML_DEVICE_TYPE_M8M2 // S812
};
enum AML_DISPLAY_AXIS_PARAM
@@ -48,6 +50,7 @@ bool aml_present();
void aml_permissions();
bool aml_hw3d_present();
bool aml_wired_present();
+bool aml_support_hevc();
enum AML_DEVICE_TYPE aml_get_device_type();
void aml_cpufreq_min(bool limit);
void aml_cpufreq_max(bool limit);
--
1.9.3

View File

@ -1,814 +0,0 @@
From 22a9bc18b49eb5858b5c7511c9573a861fa81232 Mon Sep 17 00:00:00 2001
From: "Chris \"Koying\" Browet" <cbro@semperpax.com>
Date: Wed, 31 Dec 2014 15:08:12 +0100
Subject: [PATCH 08/16] CHG: Extract SysfsUtils from the AML utils
---
xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp | 46 +++++-----
xbmc/utils/AMLUtils.cpp | 95 ++++----------------
xbmc/utils/AMLUtils.h | 5 --
xbmc/utils/Makefile.in | 1 +
xbmc/utils/SysfsUtils.cpp | 104 ++++++++++++++++++++++
xbmc/utils/SysfsUtils.h | 32 +++++++
xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp | 100 ++++++++++-----------
xbmc/windowing/egl/EGLNativeTypeIMX.cpp | 44 ++-------
xbmc/windowing/egl/EGLNativeTypeIMX.h | 2 -
9 files changed, 234 insertions(+), 195 deletions(-)
create mode 100644 xbmc/utils/SysfsUtils.cpp
create mode 100644 xbmc/utils/SysfsUtils.h
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
index 26db4a1..b74d361 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/AMLCodec.cpp
@@ -33,6 +33,7 @@
#include "utils/AMLUtils.h"
#include "utils/log.h"
#include "utils/StringUtils.h"
+#include "utils/SysfsUtils.h"
#include "utils/TimeUtils.h"
#if defined(TARGET_ANDROID)
@@ -1643,7 +1644,7 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)
m_dll->codec_set_cntl_avthresh(&am_private->vcodec, AV_SYNC_THRESH);
m_dll->codec_set_cntl_syncthresh(&am_private->vcodec, 0);
// disable tsync, we are playing video disconnected from audio.
- aml_set_sysfs_int("/sys/class/tsync/enable", 0);
+ SysfsUtils::SetInt("/sys/class/tsync/enable", 0);
am_private->am_pkt.codec = &am_private->vcodec;
pre_header_feeding(am_private, &am_private->am_pkt);
@@ -1655,15 +1656,15 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)
m_display_rect = CRect(0, 0, CDisplaySettings::Get().GetCurrentResolutionInfo().iWidth, CDisplaySettings::Get().GetCurrentResolutionInfo().iHeight);
- char buffer[256] = {0};
- aml_get_sysfs_str("/sys/class/ppmgr/ppscaler", buffer, 255);
- if (!strstr(buffer, "enabled")) // Scaler not enabled, use screen size
+ std::string strScaler;
+ SysfsUtils::GetString("/sys/class/ppmgr/ppscaler", strScaler);
+ if (strScaler.find("enabled") != std::string::npos) // Scaler not enabled, use screen size
{
CLog::Log(LOGDEBUG, "ppscaler not enabled");
- memset(buffer, 0, 256);
- aml_get_sysfs_str("/sys/class/display/mode", buffer, 255);
+ std::string mode;
+ SysfsUtils::GetString("/sys/class/display/mode", mode);
RESOLUTION_INFO res;
- if (aml_mode_to_resolution(buffer, &res))
+ if (aml_mode_to_resolution(mode.c_str(), &res))
m_display_rect = CRect(0, 0, res.iScreenWidth, res.iScreenHeight);
}
@@ -1671,11 +1672,11 @@ bool CAMLCodec::OpenDecoder(CDVDStreamInfo &hints)
// if display is set to 1080xxx, then disable deinterlacer for HD content
// else bandwidth usage is too heavy and it will slow down video decoder.
char display_mode[256] = {0};
- aml_get_sysfs_str("/sys/class/display/mode", display_mode, 255);
+ SysfsUtils::GetString("/sys/class/display/mode", display_mode, 255);
if (strstr(display_mode,"1080"))
- aml_set_sysfs_int("/sys/module/di/parameters/bypass_all", 1);
+ SysfsUtils::SetInt("/sys/module/di/parameters/bypass_all", 1);
else
- aml_set_sysfs_int("/sys/module/di/parameters/bypass_all", 0);
+ SysfsUtils::SetInt("/sys/module/di/parameters/bypass_all", 0);
*/
m_opened = true;
@@ -1708,7 +1709,7 @@ void CAMLCodec::CloseDecoder()
free(am_private->extradata);
am_private->extradata = NULL;
// return tsync to default so external apps work
- aml_set_sysfs_int("/sys/class/tsync/enable", 1);
+ SysfsUtils::SetInt("/sys/class/tsync/enable", 1);
ShowMainVideo(false);
}
@@ -1721,8 +1722,9 @@ void CAMLCodec::Reset()
return;
// set the system blackout_policy to leave the last frame showing
- int blackout_policy = aml_get_sysfs_int("/sys/class/video/blackout_policy");
- aml_set_sysfs_int("/sys/class/video/blackout_policy", 0);
+ int blackout_policy;
+ SysfsUtils::GetInt("/sys/class/video/blackout_policy", blackout_policy);
+ SysfsUtils::SetInt("/sys/class/video/blackout_policy", 0);
// restore the speed (some amcodec versions require this)
if (m_speed != DVD_PLAYSPEED_NORMAL)
@@ -1742,7 +1744,7 @@ void CAMLCodec::Reset()
pre_header_feeding(am_private, &am_private->am_pkt);
// restore the saved system blackout_policy value
- aml_set_sysfs_int("/sys/class/video/blackout_policy", blackout_policy);
+ SysfsUtils::SetInt("/sys/class/video/blackout_policy", blackout_policy);
// reset some interal vars
m_1st_pts = 0;
@@ -2065,7 +2067,7 @@ void CAMLCodec::ShowMainVideo(const bool show)
if (saved_disable_video == disable_video)
return;
- aml_set_sysfs_int("/sys/class/video/disable_video", disable_video);
+ SysfsUtils::SetInt("/sys/class/video/disable_video", disable_video);
saved_disable_video = disable_video;
}
@@ -2074,7 +2076,7 @@ void CAMLCodec::SetVideoZoom(const float zoom)
// input zoom range is 0.5 to 2.0 with a default of 1.0.
// output zoom range is 2 to 300 with default of 100.
// we limit that to a range of 50 to 200 with default of 100.
- aml_set_sysfs_int("/sys/class/video/zoom", (int)(100 * zoom));
+ SysfsUtils::SetInt("/sys/class/video/zoom", (int)(100 * zoom));
}
void CAMLCodec::SetVideoContrast(const int contrast)
@@ -2082,19 +2084,19 @@ void CAMLCodec::SetVideoContrast(const int contrast)
// input contrast range is 0 to 100 with default of 50.
// output contrast range is -255 to 255 with default of 0.
int aml_contrast = (255 * (contrast - 50)) / 50;
- aml_set_sysfs_int("/sys/class/video/contrast", aml_contrast);
+ SysfsUtils::SetInt("/sys/class/video/contrast", aml_contrast);
}
void CAMLCodec::SetVideoBrightness(const int brightness)
{
// input brightness range is 0 to 100 with default of 50.
// output brightness range is -127 to 127 with default of 0.
int aml_brightness = (127 * (brightness - 50)) / 50;
- aml_set_sysfs_int("/sys/class/video/brightness", aml_brightness);
+ SysfsUtils::SetInt("/sys/class/video/brightness", aml_brightness);
}
void CAMLCodec::SetVideoSaturation(const int saturation)
{
// output saturation range is -127 to 127 with default of 127.
- aml_set_sysfs_int("/sys/class/video/saturation", saturation);
+ SysfsUtils::SetInt("/sys/class/video/saturation", saturation);
}
void CAMLCodec::GetRenderFeatures(Features &renderFeatures)
@@ -2110,7 +2112,7 @@ void CAMLCodec::GetRenderFeatures(Features &renderFeatures)
void CAMLCodec::SetVideo3dMode(const int mode3d)
{
CLog::Log(LOGDEBUG, "CAMLCodec::SetVideo3dMode:mode3d(0x%x)", mode3d);
- aml_set_sysfs_int("/sys/class/ppmgr/ppmgr_3d_mode", mode3d);
+ SysfsUtils::SetInt("/sys/class/ppmgr/ppmgr_3d_mode", mode3d);
}
std::string CAMLCodec::GetStereoMode()
@@ -2313,9 +2315,9 @@ void CAMLCodec::SetVideoRect(const CRect &SrcRect, const CRect &DestRect)
char video_axis[256] = {};
sprintf(video_axis, "%d %d %d %d", (int)dst_rect.x1, (int)dst_rect.y1, (int)dst_rect.x2, (int)dst_rect.y2);
- aml_set_sysfs_str("/sys/class/video/axis", video_axis);
+ SysfsUtils::SetString("/sys/class/video/axis", video_axis);
// make sure we are in 'full stretch' so we can stretch
- aml_set_sysfs_int("/sys/class/video/screen_mode", 1);
+ SysfsUtils::SetInt("/sys/class/video/screen_mode", 1);
// we only get called once gui has changed to something
// that would show video playback, so show it.
diff --git a/xbmc/utils/AMLUtils.cpp b/xbmc/utils/AMLUtils.cpp
index ac921db..c127c84 100644
--- a/xbmc/utils/AMLUtils.cpp
+++ b/xbmc/utils/AMLUtils.cpp
@@ -28,77 +28,22 @@
#include "AMLUtils.h"
#include "utils/CPUInfo.h"
#include "utils/log.h"
+#include "utils/SysfsUtils.h"
#include "utils/StringUtils.h"
#include "utils/AMLUtils.h"
#include "guilib/gui3d.h"
-int aml_set_sysfs_str(const char *path, const char *val)
-{
- int fd = open(path, O_CREAT | O_RDWR | O_TRUNC, 0644);
- if (fd >= 0)
- {
- write(fd, val, strlen(val));
- close(fd);
- return 0;
- }
- return -1;
-}
-
-int aml_get_sysfs_str(const char *path, char *valstr, const int size)
-{
- int fd = open(path, O_RDONLY);
- if (fd >= 0)
- {
- read(fd, valstr, size - 1);
- valstr[strlen(valstr)] = '\0';
- close(fd);
- return 0;
- }
-
- sprintf(valstr, "%s", "fail");
- return -1;
-}
-
-int aml_set_sysfs_int(const char *path, const int val)
-{
- int fd = open(path, O_CREAT | O_RDWR | O_TRUNC, 0644);
- if (fd >= 0)
- {
- char bcmd[16];
- sprintf(bcmd, "%d", val);
- write(fd, bcmd, strlen(bcmd));
- close(fd);
- return 0;
- }
- return -1;
-}
-
-int aml_get_sysfs_int(const char *path)
-{
- int val = -1;
- int fd = open(path, O_RDONLY);
- if (fd >= 0)
- {
- char bcmd[16];
- read(fd, bcmd, sizeof(bcmd));
- val = strtol(bcmd, NULL, 16);
- close(fd);
- }
- return val;
-}
-
bool aml_present()
{
static int has_aml = -1;
if (has_aml == -1)
{
- int rtn = aml_get_sysfs_int("/sys/class/audiodsp/digital_raw");
- if (rtn != -1)
+ if (SysfsUtils::Has("/sys/class/audiodsp/digital_raw"))
has_aml = 1;
else
has_aml = 0;
if (has_aml)
- CLog::Log(LOGNOTICE, "aml_present, rtn(%d)", rtn);
+ CLog::Log(LOGNOTICE, "AML device detected");
}
return has_aml == 1;
}
@@ -108,10 +53,12 @@ bool aml_hw3d_present()
static int has_hw3d = -1;
if (has_hw3d == -1)
{
- if (aml_get_sysfs_int("/sys/class/ppmgr/ppmgr_3d_mode") != -1)
+ if (SysfsUtils::Has("/sys/class/ppmgr/ppmgr_3d_mode"))
has_hw3d = 1;
else
has_hw3d = 0;
+ if (has_hw3d)
+ CLog::Log(LOGNOTICE, "AML 3D support detected");
}
return has_hw3d == 1;
}
@@ -121,8 +68,8 @@ bool aml_wired_present()
static int has_wired = -1;
if (has_wired == -1)
{
- char test[64] = {0};
- if (aml_get_sysfs_str("/sys/class/net/eth0/operstate", test, 63) != -1)
+ std::string test;
+ if (SysfsUtils::GetString("/sys/class/net/eth0/operstate", test) != -1)
has_wired = 1;
else
has_wired = 0;
@@ -161,18 +108,12 @@ void aml_permissions()
bool aml_support_hevc()
{
- char valstr[1024];
- if(aml_get_sysfs_str("/sys/class/amstream/vcodec_profile", valstr, 1024) != 0)
+ std::string valstr;
+ if(SysfsUtils::GetString("/sys/class/amstream/vcodec_profile", valstr) != 0)
{
return false;
}
- char* p = strstr(valstr, "hevc:");
- if(p == NULL)
- {
- return false;
- }
-
- return true;
+ return (valstr.find("hevc:") != std::string::npos);
}
enum AML_DEVICE_TYPE aml_get_device_type()
@@ -216,7 +157,7 @@ void aml_cpufreq_min(bool limit)
if (limit)
cpufreq = 600000;
- aml_set_sysfs_int("/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq", cpufreq);
+ SysfsUtils::SetInt("/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq", cpufreq);
}
#endif
}
@@ -231,8 +172,8 @@ void aml_cpufreq_max(bool limit)
if (limit)
cpufreq = 800000;
- aml_set_sysfs_int("/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq", cpufreq);
- aml_set_sysfs_str("/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor", "ondemand");
+ SysfsUtils::SetInt("/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq", cpufreq);
+ SysfsUtils::SetString("/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor", "ondemand");
}
}
@@ -244,7 +185,7 @@ void aml_set_audio_passthrough(bool passthrough)
{
// m1 uses 1, m3 and above uses 2
int raw = aml_get_device_type() == AML_DEVICE_TYPE_M1 ? 1:2;
- aml_set_sysfs_int("/sys/class/audiodsp/digital_raw", passthrough ? raw:0);
+ SysfsUtils::SetInt("/sys/class/audiodsp/digital_raw", passthrough ? raw:0);
}
}
@@ -314,11 +255,11 @@ void aml_probe_hdmi_audio()
int aml_axis_value(AML_DISPLAY_AXIS_PARAM param)
{
- char axis[20] = {0};
+ std::string axis;
int value[8];
- aml_get_sysfs_str("/sys/class/display/axis", axis, 19);
- sscanf(axis, "%d %d %d %d %d %d %d %d", &value[0], &value[1], &value[2], &value[3], &value[4], &value[5], &value[6], &value[7]);
+ SysfsUtils::GetString("/sys/class/display/axis", axis);
+ sscanf(axis.c_str(), "%d %d %d %d %d %d %d %d", &value[0], &value[1], &value[2], &value[3], &value[4], &value[5], &value[6], &value[7]);
return value[param];
}
diff --git a/xbmc/utils/AMLUtils.h b/xbmc/utils/AMLUtils.h
index 208f9d3..6b0048a 100644
--- a/xbmc/utils/AMLUtils.h
+++ b/xbmc/utils/AMLUtils.h
@@ -41,11 +41,6 @@ enum AML_DISPLAY_AXIS_PARAM
AML_DISPLAY_AXIS_PARAM_HEIGHT
};
-int aml_set_sysfs_str(const char *path, const char *val);
-int aml_get_sysfs_str(const char *path, char *valstr, const int size);
-int aml_set_sysfs_int(const char *path, const int val);
-int aml_get_sysfs_int(const char *path);
-
bool aml_present();
void aml_permissions();
bool aml_hw3d_present();
diff --git a/xbmc/utils/Makefile.in b/xbmc/utils/Makefile.in
index e203447..2d89fcd 100644
--- a/xbmc/utils/Makefile.in
+++ b/xbmc/utils/Makefile.in
@@ -79,6 +79,7 @@ SRCS += XMLUtils.cpp
SRCS += Utf8Utils.cpp
SRCS += XSLTUtils.cpp
SRCS += ActorProtocol.cpp
+SRCS += SysfsUtils.cpp
ifeq (@USE_OPENGLES@,1)
SRCS += AMLUtils.cpp
diff --git a/xbmc/utils/SysfsUtils.cpp b/xbmc/utils/SysfsUtils.cpp
new file mode 100644
index 0000000..ca62986
--- /dev/null
+++ b/xbmc/utils/SysfsUtils.cpp
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2011-2014 Team XBMC
+ * http://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 "SysfsUtils.h"
+#include "utils/log.h"
+
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <fcntl.h>
+#include <string.h>
+
+int SysfsUtils::SetString(const std::string& path, const std::string& valstr)
+{
+ int fd = open(path.c_str(), O_CREAT | O_RDWR | O_TRUNC, 0644);
+ if (fd >= 0)
+ {
+ write(fd, valstr.c_str(), valstr.size());
+ close(fd);
+ return 0;
+ }
+ CLog::Log(LOGERROR, "%s: error writing %s",__FUNCTION__, path.c_str());
+ return -1;
+}
+
+int SysfsUtils::GetString(const std::string& path, std::string& valstr)
+{
+ int len;
+ char buf[256] = {0};
+
+ int fd = open(path.c_str(), O_RDONLY);
+ if (fd >= 0)
+ {
+ valstr.clear();
+ while ((len = read(fd, buf, 256)) > 0)
+ valstr.append(buf, len);
+ close(fd);
+ return 0;
+ }
+
+ CLog::Log(LOGERROR, "%s: error reading %s",__FUNCTION__, path.c_str());
+ valstr = "fail";
+ return -1;
+}
+
+int SysfsUtils::SetInt(const std::string& path, const int val)
+{
+ int fd = open(path.c_str(), O_CREAT | O_RDWR | O_TRUNC, 0644);
+ if (fd >= 0)
+ {
+ char bcmd[16];
+ sprintf(bcmd, "%d", val);
+ write(fd, bcmd, strlen(bcmd));
+ close(fd);
+ return 0;
+ }
+
+ CLog::Log(LOGERROR, "%s: error writing %s",__FUNCTION__, path.c_str());
+ return -1;
+}
+
+int SysfsUtils::GetInt(const std::string& path, int& val)
+{
+ int fd = open(path.c_str(), O_RDONLY);
+ if (fd >= 0)
+ {
+ char bcmd[16];
+ read(fd, bcmd, sizeof(bcmd));
+ val = strtol(bcmd, NULL, 16);
+ close(fd);
+ return 0;
+ }
+
+ CLog::Log(LOGERROR, "%s: error reading %s",__FUNCTION__, path.c_str());
+ return -1;
+}
+
+bool SysfsUtils::Has(const std::string &path)
+{
+ int fd = open(path.c_str(), O_RDONLY);
+ if (fd >= 0)
+ {
+ close(fd);
+ return true;
+ }
+ return false;
+}
diff --git a/xbmc/utils/SysfsUtils.h b/xbmc/utils/SysfsUtils.h
new file mode 100644
index 0000000..fe038bf
--- /dev/null
+++ b/xbmc/utils/SysfsUtils.h
@@ -0,0 +1,32 @@
+#pragma once
+/*
+ * Copyright (C) 2011-2013 Team XBMC
+ * http://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 <string>
+
+class SysfsUtils
+{
+public:
+ static int SetString(const std::string& path, const std::string& valstr);
+ static int GetString(const std::string& path, std::string& valstr);
+ static int SetInt(const std::string& path, const int val);
+ static int GetInt(const std::string& path, int& val);
+ static bool Has(const std::string& path);
+};
diff --git a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
index 7064836..0cce3ea 100644
--- a/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp
@@ -22,6 +22,7 @@
#include "guilib/gui3d.h"
#include "utils/AMLUtils.h"
#include "utils/StringUtils.h"
+#include "utils/SysfsUtils.h"
#include <stdlib.h>
#include <linux/fb.h>
@@ -49,13 +50,12 @@ CEGLNativeTypeAmlogic::~CEGLNativeTypeAmlogic()
bool CEGLNativeTypeAmlogic::CheckCompatibility()
{
- char name[256] = {0};
+ std::string name;
std::string modalias = "/sys/class/graphics/" + m_framebuffer_name + "/device/modalias";
- aml_get_sysfs_str(modalias.c_str(), name, 255);
- CStdString strName = name;
- StringUtils::Trim(strName);
- if (strName == "platform:mesonfb")
+ SysfsUtils::GetString(modalias, name);
+ StringUtils::Trim(name);
+ if (name == "platform:mesonfb")
return true;
return false;
}
@@ -127,9 +127,9 @@ bool CEGLNativeTypeAmlogic::DestroyNativeWindow()
bool CEGLNativeTypeAmlogic::GetNativeResolution(RESOLUTION_INFO *res) const
{
- char mode[256] = {0};
- aml_get_sysfs_str("/sys/class/display/mode", mode, 255);
- return aml_mode_to_resolution(mode, res);
+ std::string mode;
+ SysfsUtils::GetString("/sys/class/display/mode", mode);
+ return aml_mode_to_resolution(mode.c_str(), res);
}
bool CEGLNativeTypeAmlogic::SetNativeResolution(const RESOLUTION_INFO &res)
@@ -180,8 +180,8 @@ bool CEGLNativeTypeAmlogic::SetNativeResolution(const RESOLUTION_INFO &res)
bool CEGLNativeTypeAmlogic::ProbeResolutions(std::vector<RESOLUTION_INFO> &resolutions)
{
- char valstr[256] = {0};
- aml_get_sysfs_str("/sys/class/amhdmitx/amhdmitx0/disp_cap", valstr, 255);
+ std::string valstr;
+ SysfsUtils::GetString("/sys/class/amhdmitx/amhdmitx0/disp_cap", valstr);
std::vector<std::string> probe_str = StringUtils::Split(valstr, "\n");
resolutions.clear();
@@ -210,7 +210,7 @@ bool CEGLNativeTypeAmlogic::GetPreferredResolution(RESOLUTION_INFO *res) const
bool CEGLNativeTypeAmlogic::ShowWindow(bool show)
{
std::string blank_framebuffer = "/sys/class/graphics/" + m_framebuffer_name + "/blank";
- aml_set_sysfs_int(blank_framebuffer.c_str(), show ? 0 : 1);
+ SysfsUtils::SetInt(blank_framebuffer.c_str(), show ? 0 : 1);
return true;
}
@@ -218,7 +218,7 @@ bool CEGLNativeTypeAmlogic::SetDisplayResolution(const char *resolution)
{
CStdString mode = resolution;
// switch display resolution
- aml_set_sysfs_str("/sys/class/display/mode", mode.c_str());
+ SysfsUtils::SetString("/sys/class/display/mode", mode.c_str());
SetupVideoScaling(mode.c_str());
return true;
@@ -226,67 +226,67 @@ bool CEGLNativeTypeAmlogic::SetDisplayResolution(const char *resolution)
void CEGLNativeTypeAmlogic::SetupVideoScaling(const char *mode)
{
- aml_set_sysfs_int("/sys/class/graphics/fb0/blank", 1);
- aml_set_sysfs_int("/sys/class/graphics/fb0/free_scale", 0);
- aml_set_sysfs_int("/sys/class/graphics/fb1/free_scale", 0);
- aml_set_sysfs_int("/sys/class/ppmgr/ppscaler", 0);
+ SysfsUtils::SetInt("/sys/class/graphics/fb0/blank", 1);
+ SysfsUtils::SetInt("/sys/class/graphics/fb0/free_scale", 0);
+ SysfsUtils::SetInt("/sys/class/graphics/fb1/free_scale", 0);
+ SysfsUtils::SetInt("/sys/class/ppmgr/ppscaler", 0);
if (strstr(mode, "1080"))
{
- aml_set_sysfs_str("/sys/class/graphics/fb0/request2XScale", "8");
- aml_set_sysfs_str("/sys/class/graphics/fb1/scale_axis", "1280 720 1920 1080");
- aml_set_sysfs_str("/sys/class/graphics/fb1/scale", "0x10001");
+ SysfsUtils::SetString("/sys/class/graphics/fb0/request2XScale", "8");
+ SysfsUtils::SetString("/sys/class/graphics/fb1/scale_axis", "1280 720 1920 1080");
+ SysfsUtils::SetString("/sys/class/graphics/fb1/scale", "0x10001");
}
else
{
- aml_set_sysfs_str("/sys/class/graphics/fb0/request2XScale", "16 1280 720");
+ SysfsUtils::SetString("/sys/class/graphics/fb0/request2XScale", "16 1280 720");
}
- aml_set_sysfs_int("/sys/class/graphics/fb0/blank", 0);
+ SysfsUtils::SetInt("/sys/class/graphics/fb0/blank", 0);
}
void CEGLNativeTypeAmlogic::EnableFreeScale()
{
// enable OSD free scale using frame buffer size of 720p
- aml_set_sysfs_int("/sys/class/graphics/fb0/free_scale", 0);
- aml_set_sysfs_int("/sys/class/graphics/fb1/free_scale", 0);
- aml_set_sysfs_int("/sys/class/graphics/fb0/scale_width", 1280);
- aml_set_sysfs_int("/sys/class/graphics/fb0/scale_height", 720);
- aml_set_sysfs_int("/sys/class/graphics/fb1/scale_width", 1280);
- aml_set_sysfs_int("/sys/class/graphics/fb1/scale_height", 720);
+ SysfsUtils::SetInt("/sys/class/graphics/fb0/free_scale", 0);
+ SysfsUtils::SetInt("/sys/class/graphics/fb1/free_scale", 0);
+ SysfsUtils::SetInt("/sys/class/graphics/fb0/scale_width", 1280);
+ SysfsUtils::SetInt("/sys/class/graphics/fb0/scale_height", 720);
+ SysfsUtils::SetInt("/sys/class/graphics/fb1/scale_width", 1280);
+ SysfsUtils::SetInt("/sys/class/graphics/fb1/scale_height", 720);
// enable video free scale (scaling to 1920x1080 with frame buffer size 1280x720)
- aml_set_sysfs_int("/sys/class/ppmgr/ppscaler", 0);
- aml_set_sysfs_int("/sys/class/video/disable_video", 1);
- aml_set_sysfs_int("/sys/class/ppmgr/ppscaler", 1);
- aml_set_sysfs_str("/sys/class/ppmgr/ppscaler_rect", "0 0 1919 1079 0");
- aml_set_sysfs_str("/sys/class/ppmgr/disp", "1280 720");
+ SysfsUtils::SetInt("/sys/class/ppmgr/ppscaler", 0);
+ SysfsUtils::SetInt("/sys/class/video/disable_video", 1);
+ SysfsUtils::SetInt("/sys/class/ppmgr/ppscaler", 1);
+ SysfsUtils::SetString("/sys/class/ppmgr/ppscaler_rect", "0 0 1919 1079 0");
+ SysfsUtils::SetString("/sys/class/ppmgr/disp", "1280 720");
//
- aml_set_sysfs_int("/sys/class/graphics/fb0/scale_width", 1280);
- aml_set_sysfs_int("/sys/class/graphics/fb0/scale_height", 720);
- aml_set_sysfs_int("/sys/class/graphics/fb1/scale_width", 1280);
- aml_set_sysfs_int("/sys/class/graphics/fb1/scale_height", 720);
+ SysfsUtils::SetInt("/sys/class/graphics/fb0/scale_width", 1280);
+ SysfsUtils::SetInt("/sys/class/graphics/fb0/scale_height", 720);
+ SysfsUtils::SetInt("/sys/class/graphics/fb1/scale_width", 1280);
+ SysfsUtils::SetInt("/sys/class/graphics/fb1/scale_height", 720);
//
- aml_set_sysfs_int("/sys/class/video/disable_video", 2);
- aml_set_sysfs_str("/sys/class/display/axis", "0 0 1279 719 0 0 0 0");
- aml_set_sysfs_str("/sys/class/ppmgr/ppscaler_rect", "0 0 1279 719 1");
+ SysfsUtils::SetInt("/sys/class/video/disable_video", 2);
+ SysfsUtils::SetString("/sys/class/display/axis", "0 0 1279 719 0 0 0 0");
+ SysfsUtils::SetString("/sys/class/ppmgr/ppscaler_rect", "0 0 1279 719 1");
//
- aml_set_sysfs_int("/sys/class/graphics/fb0/free_scale", 1);
- aml_set_sysfs_int("/sys/class/graphics/fb1/free_scale", 1);
- aml_set_sysfs_str("/sys/class/graphics/fb0/free_scale_axis", "0 0 1279 719");
+ SysfsUtils::SetInt("/sys/class/graphics/fb0/free_scale", 1);
+ SysfsUtils::SetInt("/sys/class/graphics/fb1/free_scale", 1);
+ SysfsUtils::SetString("/sys/class/graphics/fb0/free_scale_axis", "0 0 1279 719");
}
void CEGLNativeTypeAmlogic::DisableFreeScale()
{
// turn off frame buffer freescale
- aml_set_sysfs_int("/sys/class/graphics/fb0/free_scale", 0);
- aml_set_sysfs_int("/sys/class/graphics/fb1/free_scale", 0);
- aml_set_sysfs_str("/sys/class/graphics/fb0/free_scale_axis", "0 0 1279 719");
+ SysfsUtils::SetInt("/sys/class/graphics/fb0/free_scale", 0);
+ SysfsUtils::SetInt("/sys/class/graphics/fb1/free_scale", 0);
+ SysfsUtils::SetString("/sys/class/graphics/fb0/free_scale_axis", "0 0 1279 719");
- aml_set_sysfs_int("/sys/class/ppmgr/ppscaler", 0);
- aml_set_sysfs_int("/sys/class/video/disable_video", 0);
+ SysfsUtils::SetInt("/sys/class/ppmgr/ppscaler", 0);
+ SysfsUtils::SetInt("/sys/class/video/disable_video", 0);
// now default video display to off
- aml_set_sysfs_int("/sys/class/video/disable_video", 1);
+ SysfsUtils::SetInt("/sys/class/video/disable_video", 1);
// revert display axis
int fd0;
@@ -297,9 +297,9 @@ void CEGLNativeTypeAmlogic::DisableFreeScale()
struct fb_var_screeninfo vinfo;
if (ioctl(fd0, FBIOGET_VSCREENINFO, &vinfo) == 0)
{
- char daxis_str[255] = {0};
+ char daxis_str[256] = {0};
sprintf(daxis_str, "%d %d %d %d 0 0 0 0", 0, 0, vinfo.xres-1, vinfo.yres-1);
- aml_set_sysfs_str("/sys/class/display/axis", daxis_str);
+ SysfsUtils::SetString("/sys/class/display/axis", daxis_str);
}
close(fd0);
}
diff --git a/xbmc/windowing/egl/EGLNativeTypeIMX.cpp b/xbmc/windowing/egl/EGLNativeTypeIMX.cpp
index 04cadc8..9893558 100644
--- a/xbmc/windowing/egl/EGLNativeTypeIMX.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeIMX.cpp
@@ -28,6 +28,7 @@
#include "utils/log.h"
#include "utils/RegExp.h"
#include "utils/StringUtils.h"
+#include "utils/SysfsUtils.h"
#include "utils/Environment.h"
#include "guilib/gui3d.h"
#include "windowing/WindowingFactory.h"
@@ -190,7 +191,7 @@ bool CEGLNativeTypeIMX::DestroyNativeWindow()
bool CEGLNativeTypeIMX::GetNativeResolution(RESOLUTION_INFO *res) const
{
std::string mode;
- get_sysfs_str("/sys/class/graphics/fb0/mode", mode);
+ SysfsUtils::GetString("/sys/class/graphics/fb0/mode", mode);
return ModeToResolution(mode, res);
}
@@ -200,14 +201,14 @@ bool CEGLNativeTypeIMX::SetNativeResolution(const RESOLUTION_INFO &res)
return false;
std::string mode;
- get_sysfs_str("/sys/class/graphics/fb0/mode", mode);
+ SysfsUtils::GetString("/sys/class/graphics/fb0/mode", mode);
if (res.strId == mode)
return false;
DestroyNativeWindow();
DestroyNativeDisplay();
- set_sysfs_str("/sys/class/graphics/fb0/mode", res.strId);
+ SysfsUtils::SetString("/sys/class/graphics/fb0/mode", res.strId);
CreateNativeDisplay();
@@ -225,7 +226,7 @@ bool CEGLNativeTypeIMX::ProbeResolutions(std::vector<RESOLUTION_INFO> &resolutio
return false;
std::string valstr;
- get_sysfs_str("/sys/class/graphics/fb0/modes", valstr);
+ SysfsUtils::GetString("/sys/class/graphics/fb0/modes", valstr);
std::vector<std::string> probe_str;
probe_str = StringUtils::Split(valstr, "\n");
@@ -257,41 +258,6 @@ bool CEGLNativeTypeIMX::ShowWindow(bool show)
return false;
}
-int CEGLNativeTypeIMX::get_sysfs_str(std::string path, std::string& valstr) const
-{
- int len;
- char buf[256] = {0};
-
- int fd = open(path.c_str(), O_RDONLY);
- if (fd >= 0)
- {
- while ((len = read(fd, buf, 255)) > 0)
- valstr.append(buf, len);
- close(fd);
- }
- else
- {
- CLog::Log(LOGERROR, "%s: error reading %s",__FUNCTION__, path.c_str());
- valstr = "fail";
- return -1;
- }
- return 0;
-}
-
-int CEGLNativeTypeIMX::set_sysfs_str(std::string path, std::string val) const
-{
- int fd = open(path.c_str(), O_WRONLY);
- if (fd >= 0)
- {
- val += '\n';
- write(fd, val.c_str(), val.size());
- close(fd);
- return 0;
- }
- CLog::Log(LOGERROR, "%s: error writing %s",__FUNCTION__, path.c_str());
- return -1;
-}
-
bool CEGLNativeTypeIMX::ModeToResolution(std::string mode, RESOLUTION_INFO *res) const
{
if (!res)
diff --git a/xbmc/windowing/egl/EGLNativeTypeIMX.h b/xbmc/windowing/egl/EGLNativeTypeIMX.h
index d5e5739..0298cb5 100644
--- a/xbmc/windowing/egl/EGLNativeTypeIMX.h
+++ b/xbmc/windowing/egl/EGLNativeTypeIMX.h
@@ -50,8 +50,6 @@ public:
protected:
bool m_readonly;
- int get_sysfs_str(std::string path, std::string& valstr) const;
- int set_sysfs_str(std::string path, std::string val) const;
bool ModeToResolution(std::string mode, RESOLUTION_INFO *res) const;
EGLNativeDisplayType m_display;
--
1.9.3

View File

@ -1,25 +0,0 @@
From 11a9bc199b0ebd9e6cfb9b82547bb3c5379b1104 Mon Sep 17 00:00:00 2001
From: smallint <tahoma@gmx.de>
Date: Mon, 19 Jan 2015 20:38:42 +0100
Subject: [PATCH 09/16] [imx] Fixed mode change after SysfsUtils port
---
xbmc/windowing/egl/EGLNativeTypeIMX.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xbmc/windowing/egl/EGLNativeTypeIMX.cpp b/xbmc/windowing/egl/EGLNativeTypeIMX.cpp
index 9893558..061f6e6 100644
--- a/xbmc/windowing/egl/EGLNativeTypeIMX.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeIMX.cpp
@@ -208,7 +208,7 @@ bool CEGLNativeTypeIMX::SetNativeResolution(const RESOLUTION_INFO &res)
DestroyNativeWindow();
DestroyNativeDisplay();
- SysfsUtils::SetString("/sys/class/graphics/fb0/mode", res.strId);
+ SysfsUtils::SetString("/sys/class/graphics/fb0/mode", res.strId + "\n");
CreateNativeDisplay();
--
1.9.3

View File

@ -1,67 +0,0 @@
From 9c9935180aa9297d35855db674b7eb7f732714e9 Mon Sep 17 00:00:00 2001
From: smallint <tahoma@gmx.de>
Date: Thu, 5 Feb 2015 19:35:05 +0000
Subject: [PATCH 10/16] [imx] Added de-interlacing method enumerations
FAST_MOTION and FAST_MOTION_DOUBLE
---
language/English/strings.po | 14 +++++++++++++-
xbmc/settings/VideoSettings.h | 3 +++
xbmc/video/dialogs/GUIDialogVideoSettings.cpp | 2 ++
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/language/English/strings.po b/language/English/strings.po
index 15090fc..d994570 100755
--- a/language/English/strings.po
+++ b/language/English/strings.po
@@ -7548,7 +7548,19 @@ msgctxt "#16333"
msgid "MMAL - Bob (Half)"
msgstr ""
-#empty strings from id 16334 to 16399
+#. Description of OSD video settings for deinterlace method with label #16334
+#: xbmc/video/dialogs/GUIDialogVideoSettings.cpp
+msgctxt "#16334"
+msgid "IMX - Fast motion"
+msgstr ""
+
+#. Description of OSD video settings for deinterlace method with label #16335
+#: xbmc/video/dialogs/GUIDialogVideoSettings.cpp
+msgctxt "#16335"
+msgid "IMX - Fast motion (Double)"
+msgstr ""
+
+#empty strings from id 16336 to 16399
#: xbmc/video/dialogs/GUIDialogVideoSettings.cpp
msgctxt "#16400"
diff --git a/xbmc/settings/VideoSettings.h b/xbmc/settings/VideoSettings.h
index 6eaef1d..8644250 100644
--- a/xbmc/settings/VideoSettings.h
+++ b/xbmc/settings/VideoSettings.h
@@ -72,6 +72,9 @@ enum EINTERLACEMETHOD
VS_INTERLACEMETHOD_MMAL_BOB = 27,
VS_INTERLACEMETHOD_MMAL_BOB_HALF = 28,
+ VS_INTERLACEMETHOD_IMX_FASTMOTION = 29,
+ VS_INTERLACEMETHOD_IMX_FASTMOTION_DOUBLE = 30,
+
VS_INTERLACEMETHOD_MAX // do not use and keep as last enum value.
};
diff --git a/xbmc/video/dialogs/GUIDialogVideoSettings.cpp b/xbmc/video/dialogs/GUIDialogVideoSettings.cpp
index ca65fdc..d350a02 100644
--- a/xbmc/video/dialogs/GUIDialogVideoSettings.cpp
+++ b/xbmc/video/dialogs/GUIDialogVideoSettings.cpp
@@ -266,6 +266,8 @@ void CGUIDialogVideoSettings::InitializeSettings()
entries.push_back(make_pair(16331, VS_INTERLACEMETHOD_MMAL_ADVANCED_HALF));
entries.push_back(make_pair(16332, VS_INTERLACEMETHOD_MMAL_BOB));
entries.push_back(make_pair(16333, VS_INTERLACEMETHOD_MMAL_BOB_HALF));
+ entries.push_back(make_pair(16334, VS_INTERLACEMETHOD_IMX_FASTMOTION));
+ entries.push_back(make_pair(16335, VS_INTERLACEMETHOD_IMX_FASTMOTION_DOUBLE));
/* remove unsupported methods */
for (StaticIntegerSettingOptions::iterator it = entries.begin(); it != entries.end(); )
--
1.9.3

View File

@ -1,52 +0,0 @@
From ba9b668fcbfd4f6bcfd67b22bcdc850a140ac65c Mon Sep 17 00:00:00 2001
From: smallint <tahoma@gmx.de>
Date: Thu, 5 Feb 2015 19:37:13 +0000
Subject: [PATCH 11/16] [RenderManager] preserve field type for
Renderer::RenderUpdate
---
xbmc/cores/VideoRenderers/RenderManager.cpp | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/xbmc/cores/VideoRenderers/RenderManager.cpp b/xbmc/cores/VideoRenderers/RenderManager.cpp
index 36c2842..85c3565 100644
--- a/xbmc/cores/VideoRenderers/RenderManager.cpp
+++ b/xbmc/cores/VideoRenderers/RenderManager.cpp
@@ -676,7 +676,10 @@ void CXBMCRenderManager::FlipPage(volatile bool& bStop, double timestamp /* = 0L
deinterlacemode = VS_DEINTERLACEMODE_OFF;
if (deinterlacemode == VS_DEINTERLACEMODE_OFF)
+ {
presentmethod = PRESENT_METHOD_SINGLE;
+ sync = FS_NONE;
+ }
else
{
if (deinterlacemode == VS_DEINTERLACEMODE_AUTO && sync == FS_NONE)
@@ -691,6 +694,7 @@ void CXBMCRenderManager::FlipPage(volatile bool& bStop, double timestamp /* = 0L
else if (interlacemethod == VS_INTERLACEMETHOD_RENDER_BOB_INVERTED) { presentmethod = PRESENT_METHOD_BOB; invert = true; }
else if (interlacemethod == VS_INTERLACEMETHOD_DXVA_BOB) presentmethod = PRESENT_METHOD_BOB;
else if (interlacemethod == VS_INTERLACEMETHOD_DXVA_BEST) presentmethod = PRESENT_METHOD_BOB;
+ else if (interlacemethod == VS_INTERLACEMETHOD_IMX_FASTMOTION_DOUBLE) presentmethod = PRESENT_METHOD_BOB;
else presentmethod = PRESENT_METHOD_SINGLE;
/* default to odd field if we want to deinterlace and don't know better */
@@ -837,8 +841,14 @@ bool CXBMCRenderManager::IsVideoLayer()
void CXBMCRenderManager::PresentSingle(bool clear, DWORD flags, DWORD alpha)
{
CSingleLock lock(g_graphicsContext);
+ SPresent& m = m_Queue[m_presentsource];
- m_pRenderer->RenderUpdate(clear, flags, alpha);
+ if (m.presentfield == FS_BOT)
+ m_pRenderer->RenderUpdate(clear, flags | RENDER_FLAG_BOT, alpha);
+ else if (m.presentfield == FS_TOP)
+ m_pRenderer->RenderUpdate(clear, flags | RENDER_FLAG_TOP, alpha);
+ else
+ m_pRenderer->RenderUpdate(clear, flags, alpha);
}
/* new simpler method of handling interlaced material, *
--
1.9.3

View File

@ -1,895 +0,0 @@
From 85ca69f3fc1f9bfd30f828921db1283366c7bfea Mon Sep 17 00:00:00 2001
From: wolfgar <stephan.rafin@laposte.net>
Date: Sat, 14 Feb 2015 03:06:03 +0100
Subject: [PATCH 13/16] [iMX6] Implement rendercapture for latest rendering
rework blit fb using g2d when no deinterlacing is required
---
configure.in | 2 +-
xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp | 12 +
xbmc/cores/VideoRenderers/RenderCapture.cpp | 43 ++-
xbmc/cores/VideoRenderers/RenderCapture.h | 28 +-
.../dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp | 430 +++++++++++++++------
.../dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.h | 23 +-
6 files changed, 401 insertions(+), 137 deletions(-)
diff --git a/configure.in b/configure.in
index 32e37c5..a8cdca0 100644
--- a/configure.in
+++ b/configure.in
@@ -1935,7 +1935,7 @@ for codecs in `echo $add_codecs | sed 's/,/ /g'`; do
;;
*imxvpu*)
AC_CHECK_HEADER([imx-mm/vpu/vpu_wrapper.h],, AC_MSG_ERROR($missing_headers))
- AC_CHECK_LIB([vpu], main, LIBS="$LIBS -lfslvpuwrap -lvpu", AC_MSG_ERROR($missing_library))
+ AC_CHECK_LIB([vpu], main, LIBS="$LIBS -lfslvpuwrap -lvpu -lg2d", AC_MSG_ERROR($missing_library))
XB_ADD_CODEC([IMXVPU], [imxvpu], [$codecs])
CXXFLAGS="$CXXFLAGS -Wno-psabi -DLINUX "
CFLAGS="$CFLAGS -DLINUX"
diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
index 94fb19b..d523db4 100644
--- a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
+++ b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
@@ -1733,6 +1733,18 @@ bool CLinuxRendererGLES::RenderCapture(CRenderCapture* capture)
return true;
}
+#ifdef HAS_IMXVPU
+ if (m_renderMethod & RENDER_IMXMAP)
+ {
+ CRect rect(0, 0, capture->GetWidth(), capture->GetHeight());
+ CDVDVideoCodecIMXBuffer *buffer = m_buffers[m_iYV12RenderBuffer].IMXBuffer;
+ capture->BeginRender();
+ g_IMXContext.PushCaptureTask(buffer, &rect);
+ capture->EndRender();
+ return true;
+ }
+#endif
+
// save current video rect
CRect saveSize = m_destRect;
saveRotatedCoords();//backup current m_rotatedDestCoords
diff --git a/xbmc/cores/VideoRenderers/RenderCapture.cpp b/xbmc/cores/VideoRenderers/RenderCapture.cpp
index 0fac398..62605c8 100644
--- a/xbmc/cores/VideoRenderers/RenderCapture.cpp
+++ b/xbmc/cores/VideoRenderers/RenderCapture.cpp
@@ -54,7 +54,48 @@ bool CRenderCaptureBase::UseOcclusionQuery()
return true;
}
-#if defined(TARGET_RASPBERRY_PI)
+
+#if defined(HAS_IMXVPU)
+CRenderCaptureIMX::CRenderCaptureIMX()
+{
+}
+
+CRenderCaptureIMX::~CRenderCaptureIMX()
+{
+}
+
+int CRenderCaptureIMX::GetCaptureFormat()
+{
+ return CAPTUREFORMAT_RGBA;
+}
+
+void CRenderCaptureIMX::BeginRender()
+{
+ m_asyncChecked = true;
+ m_asyncSupported = true;
+}
+
+void CRenderCaptureIMX::EndRender()
+{
+ if (m_flags & CAPTUREFLAG_IMMEDIATELY)
+ ReadOut();
+ else
+ SetState(CAPTURESTATE_NEEDSREADOUT);
+}
+
+void* CRenderCaptureIMX::GetRenderBuffer()
+{
+ return m_pixels;
+}
+
+void CRenderCaptureIMX::ReadOut()
+{
+ g_IMXContext.WaitCapture();
+ m_pixels = reinterpret_cast<uint8_t*>(g_IMXContext.GetCaptureBuffer());
+ SetState(CAPTURESTATE_DONE);
+}
+
+#elif defined(TARGET_RASPBERRY_PI)
CRenderCaptureDispmanX::CRenderCaptureDispmanX()
{
diff --git a/xbmc/cores/VideoRenderers/RenderCapture.h b/xbmc/cores/VideoRenderers/RenderCapture.h
index 56d269a..5610945 100644
--- a/xbmc/cores/VideoRenderers/RenderCapture.h
+++ b/xbmc/cores/VideoRenderers/RenderCapture.h
@@ -172,7 +172,33 @@ class CRenderCaptureBase
bool m_asyncChecked;
};
-#if defined(TARGET_RASPBERRY_PI)
+
+#if defined(HAS_IMXVPU)
+#include "../dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.h"
+
+class CRenderCaptureIMX : public CRenderCaptureBase
+{
+ public:
+ CRenderCaptureIMX();
+ ~CRenderCaptureIMX();
+
+ int GetCaptureFormat();
+
+ void BeginRender();
+ void EndRender();
+ void ReadOut();
+
+ void* GetRenderBuffer();
+};
+
+class CRenderCapture : public CRenderCaptureIMX
+{
+ public:
+ CRenderCapture() {};
+};
+
+
+#elif defined(TARGET_RASPBERRY_PI)
#include "xbmc/linux/RBP.h"
class CRenderCaptureDispmanX : public CRenderCaptureBase
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp
index 65adced..fcd8b02 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp
@@ -45,6 +45,8 @@
// Global instance
CIMXContext g_IMXContext;
+// Number of fb pages used for paning
+const int CIMXContext::m_fbPages = 2;
// Experiments show that we need at least one more (+1) VPU buffer than the min value returned by the VPU
const int CDVDVideoCodecIMX::m_extraVpuBuffers = 1+RENDER_QUEUE_SIZE+2;
@@ -435,8 +437,7 @@ bool CDVDVideoCodecIMX::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options)
return false;
}
- if (!g_IMXContext.Configure())
- return false;
+ g_IMXContext.RequireConfiguration();
#ifdef DUMP_STREAM
m_dump = fopen("stream.dump", "wb");
@@ -810,6 +811,7 @@ int CDVDVideoCodecIMX::Decode(BYTE *pData, int iSize, double dts, double pts)
{
goto out_error;
}
+
}
else
{
@@ -882,7 +884,7 @@ int CDVDVideoCodecIMX::Decode(BYTE *pData, int iSize, double dts, double pts)
#endif
#ifdef TRACE_FRAMES
- CLog::Log(LOGDEBUG, "+ %02d dts %f pts %f (VPU)\n", idx, pDvdVideoPicture->dts, pDvdVideoPicture->pts);
+ CLog::Log(LOGDEBUG, "+ %02d dts %f pts %f (VPU)\n", idx, dts, pts);
#endif
if (!m_usePTS)
@@ -1269,12 +1271,15 @@ CDVDVideoCodecIMXBuffer::~CDVDVideoCodecIMXBuffer()
CIMXContext::CIMXContext()
: CThread("iMX IPU")
, m_fbHandle(0)
- , m_fbPages(0)
+ , m_fbCurrentPage(0)
, m_fbPhysAddr(0)
, m_fbVirtAddr(NULL)
, m_ipuHandle(0)
, m_vsync(true)
, m_pageCrops(NULL)
+ , m_g2dHandle(NULL)
+ , m_bufferCapture(NULL)
+ , m_checkConfigRequired(true)
{
// Limit queue to 2
m_input.resize(2);
@@ -1286,8 +1291,13 @@ CIMXContext::~CIMXContext()
Close();
}
-bool CIMXContext::Configure(int pages)
+
+bool CIMXContext::Configure()
{
+
+ if (!m_checkConfigRequired)
+ return false;
+
SetBlitRects(CRectInt(), CRectInt());
m_fbCurrentPage = 0;
@@ -1310,17 +1320,7 @@ bool CIMXContext::Configure(int pages)
close(fb0);
if (m_fbHandle)
- {
- // Check for updated screen resolution
- if ((m_fbWidth != fbVar.xres) || (m_fbHeight != fbVar.yres) || (pages != m_fbPages))
- Close();
- else
- {
- Clear();
- Unblank();
- return true;
- }
- }
+ Close();
CLog::Log(LOGNOTICE, "iMX : Initialize render buffers\n");
@@ -1344,14 +1344,20 @@ bool CIMXContext::Configure(int pages)
return false;
}
- // We want n fb pages
- m_fbPages = pages;
m_pageCrops = new CRectInt[m_fbPages];
m_fbVar.xoffset = 0;
m_fbVar.yoffset = 0;
- m_fbVar.bits_per_pixel = 16;
- m_fbVar.nonstd = _4CC('U', 'Y', 'V', 'Y');
+ if (m_deInterlacing)
+ {
+ m_fbVar.nonstd = _4CC('U', 'Y', 'V', 'Y');
+ m_fbVar.bits_per_pixel = 16;
+ }
+ else
+ {
+ m_fbVar.nonstd = _4CC('R', 'G', 'B', '4');
+ m_fbVar.bits_per_pixel = 32;
+ }
m_fbVar.activate = FB_ACTIVATE_NOW;
m_fbVar.xres = m_fbWidth;
m_fbVar.yres = m_fbHeight;
@@ -1364,7 +1370,6 @@ bool CIMXContext::Configure(int pages)
CLog::Log(LOGWARNING, "iMX : Failed to setup %s\n", deviceName);
close(m_fbHandle);
m_fbHandle = 0;
- m_fbPages = 0;
return false;
}
@@ -1374,7 +1379,6 @@ bool CIMXContext::Configure(int pages)
CLog::Log(LOGWARNING, "iMX : Failed to query fixed screen info at %s\n", deviceName);
close(m_fbHandle);
m_fbHandle = 0;
- m_fbPages = 0;
return false;
}
@@ -1401,6 +1405,7 @@ bool CIMXContext::Configure(int pages)
// Start the ipu thread
Create();
+ m_checkConfigRequired = false;
return true;
}
@@ -1428,7 +1433,6 @@ bool CIMXContext::Close()
{
Blank();
close(m_fbHandle);
- m_fbPages = 0;
m_fbHandle = 0;
m_fbPhysAddr = 0;
}
@@ -1442,7 +1446,8 @@ bool CIMXContext::Close()
m_ipuHandle = 0;
}
- CLog::Log(LOGNOTICE, "iMX : Deinitialized render context\n", m_fbPages);
+ m_checkConfigRequired = true;
+ CLog::Log(LOGNOTICE, "iMX : Deinitialized render context\n");
return true;
}
@@ -1503,7 +1508,14 @@ void CIMXContext::SetInterpolatedFrame(bool flag)
void CIMXContext::SetDeInterlacing(bool flag)
{
+ bool sav_deInt = m_deInterlacing;
m_deInterlacing = flag;
+ // If deinterlacing configuration changes then fb has to be reconfigured
+ if (sav_deInt != m_deInterlacing)
+ {
+ m_checkConfigRequired = true;
+ Configure();
+ }
}
void CIMXContext::SetBlitRects(const CRect &srcRect, const CRect &dstRect)
@@ -1522,10 +1534,18 @@ bool CIMXContext::Blit(int page, CIMXBuffer *source_p, CIMXBuffer *source, bool
return DoTask(ipu, page);
}
-bool CIMXContext::BlitAsync(CIMXBuffer *source_p, CIMXBuffer *source, bool topBottomFields)
+bool CIMXContext::BlitAsync(CIMXBuffer *source_p, CIMXBuffer *source, bool topBottomFields, CRect *dest)
{
IPUTask ipu;
- PrepareTask(ipu, source_p, source, topBottomFields);
+ PrepareTask(ipu, source_p, source, topBottomFields, dest);
+ return PushTask(ipu);
+}
+
+bool CIMXContext::PushCaptureTask(CIMXBuffer *source, CRect *dest)
+{
+ IPUTask ipu;
+ m_CaptureDone = false;
+ PrepareTask(ipu, NULL, source, false, dest);
return PushTask(ipu);
}
@@ -1562,34 +1582,44 @@ void CIMXContext::Clear(int page)
if (!m_fbVirtAddr) return;
uint8_t *tmp_buf;
- int pixels;
+ int bytes;
if (page < 0)
{
tmp_buf = m_fbVirtAddr;
- pixels = m_fbPageSize*m_fbPages/2;
+ bytes = m_fbPageSize*m_fbPages;
}
else if (page < m_fbPages)
{
tmp_buf = m_fbVirtAddr + page*m_fbPageSize;
- pixels = m_fbPageSize/2;
+ bytes = m_fbPageSize;
}
else
// out of range
return;
- for (int i = 0; i < pixels; ++i, tmp_buf += 2)
+
+ if (m_fbVar.nonstd == _4CC('R', 'G', 'B', '4'))
+ memset(tmp_buf, 0, bytes);
+ else if (m_fbVar.nonstd == _4CC('U', 'Y', 'V', 'Y'))
{
- tmp_buf[0] = 128;
- tmp_buf[1] = 16;
+ int pixels = bytes / 2;
+ for (int i = 0; i < pixels; ++i, tmp_buf += 2)
+ {
+ tmp_buf[0] = 128;
+ tmp_buf[1] = 16;
+ }
}
+ else
+ CLog::Log(LOGERROR, "iMX Clear fb error : Unexpected format");
}
#define clamp_byte(x) (x<0?0:(x>255?255:x))
void CIMXContext::CaptureDisplay(unsigned char *buffer, int iWidth, int iHeight)
{
- if (m_fbVar.nonstd != _4CC('U', 'Y', 'V', 'Y'))
+ if ((m_fbVar.nonstd != _4CC('R', 'G', 'B', '4')) &&
+ (m_fbVar.nonstd != _4CC('U', 'Y', 'V', 'Y')))
{
CLog::Log(LOGWARNING, "iMX : Unknown screen capture format\n");
return;
@@ -1602,56 +1632,60 @@ void CIMXContext::CaptureDisplay(unsigned char *buffer, int iWidth, int iHeight)
CLog::Log(LOGWARNING, "iMX : Invalid page to capture\n");
return;
}
-
- int r,g,b,a;
- int u, y0, v, y1;
-
unsigned char *display = m_fbVirtAddr + m_fbCurrentPage*m_fbPageSize;
- int iStride = m_fbWidth*2;
- int oStride = iWidth*4;
- int cy = 1*(1 << 16);
- int cr1 = 1.40200*(1 << 16);
- int cr2 = -0.71414*(1 << 16);
- int cr3 = 0*(1 << 16);
- int cb1 = 0*(1 << 16);
- int cb2 = -0.34414*(1 << 16);
- int cb3 = 1.77200*(1 << 16);
+ if (m_fbVar.nonstd != _4CC('R', 'G', 'B', '4'))
+ memcpy(buffer, display, iWidth * iHeight * 4);
+ else //_4CC('U', 'Y', 'V', 'Y')))
+ {
+ int r,g,b,a;
+ int u, y0, v, y1;
+ int iStride = m_fbWidth*2;
+ int oStride = iWidth*4;
- iWidth = std::min(iWidth/2, m_fbWidth/2);
- iHeight = std::min(iHeight, m_fbHeight);
+ int cy = 1*(1 << 16);
+ int cr1 = 1.40200*(1 << 16);
+ int cr2 = -0.71414*(1 << 16);
+ int cr3 = 0*(1 << 16);
+ int cb1 = 0*(1 << 16);
+ int cb2 = -0.34414*(1 << 16);
+ int cb3 = 1.77200*(1 << 16);
- for (int y = 0; y < iHeight; ++y, display += iStride, buffer += oStride)
- {
- unsigned char *iLine = display;
- unsigned char *oLine = buffer;
+ iWidth = std::min(iWidth/2, m_fbWidth/2);
+ iHeight = std::min(iHeight, m_fbHeight);
- for (int x = 0; x < iWidth; ++x, iLine += 4, oLine += 8 )
+ for (int y = 0; y < iHeight; ++y, display += iStride, buffer += oStride)
{
- u = iLine[0]-128;
- y0 = iLine[1]-16;
- v = iLine[2]-128;
- y1 = iLine[3]-16;
-
- a = 255-oLine[3];
- r = (cy*y0 + cb1*u + cr1*v) >> 16;
- g = (cy*y0 + cb2*u + cr2*v) >> 16;
- b = (cy*y0 + cb3*u + cr3*v) >> 16;
-
- oLine[0] = (clamp_byte(b)*a + oLine[0]*oLine[3])/255;
- oLine[1] = (clamp_byte(g)*a + oLine[1]*oLine[3])/255;
- oLine[2] = (clamp_byte(r)*a + oLine[2]*oLine[3])/255;
- oLine[3] = 255;
-
- a = 255-oLine[7];
- r = (cy*y0 + cb1*u + cr1*v) >> 16;
- g = (cy*y0 + cb2*u + cr2*v) >> 16;
- b = (cy*y0 + cb3*u + cr3*v) >> 16;
-
- oLine[4] = (clamp_byte(b)*a + oLine[4]*oLine[7])/255;
- oLine[5] = (clamp_byte(g)*a + oLine[5]*oLine[7])/255;
- oLine[6] = (clamp_byte(r)*a + oLine[6]*oLine[7])/255;
- oLine[7] = 255;
+ unsigned char *iLine = display;
+ unsigned char *oLine = buffer;
+
+ for (int x = 0; x < iWidth; ++x, iLine += 4, oLine += 8 )
+ {
+ u = iLine[0]-128;
+ y0 = iLine[1]-16;
+ v = iLine[2]-128;
+ y1 = iLine[3]-16;
+
+ a = 255-oLine[3];
+ r = (cy*y0 + cb1*u + cr1*v) >> 16;
+ g = (cy*y0 + cb2*u + cr2*v) >> 16;
+ b = (cy*y0 + cb3*u + cr3*v) >> 16;
+
+ oLine[0] = (clamp_byte(b)*a + oLine[0]*oLine[3])/255;
+ oLine[1] = (clamp_byte(g)*a + oLine[1]*oLine[3])/255;
+ oLine[2] = (clamp_byte(r)*a + oLine[2]*oLine[3])/255;
+ oLine[3] = 255;
+
+ a = 255-oLine[7];
+ r = (cy*y0 + cb1*u + cr1*v) >> 16;
+ g = (cy*y0 + cb2*u + cr2*v) >> 16;
+ b = (cy*y0 + cb3*u + cr3*v) >> 16;
+
+ oLine[4] = (clamp_byte(b)*a + oLine[4]*oLine[7])/255;
+ oLine[5] = (clamp_byte(g)*a + oLine[5]*oLine[7])/255;
+ oLine[6] = (clamp_byte(r)*a + oLine[6]*oLine[7])/255;
+ oLine[7] = 255;
+ }
}
}
}
@@ -1691,16 +1725,29 @@ bool CIMXContext::PushTask(const IPUTask &task)
return true;
}
+void CIMXContext::WaitCapture()
+{
+ CSingleLock lk(m_monitor);
+ while (!m_CaptureDone)
+ m_inputNotFull.wait(lk);
+}
+
void CIMXContext::PrepareTask(IPUTask &ipu, CIMXBuffer *source_p, CIMXBuffer *source,
- bool topBottomFields)
+ bool topBottomFields, CRect *dest)
{
+ Configure();
// Fill with zeros
ipu.Zero();
ipu.previous = source_p;
ipu.current = source;
CRect srcRect = m_srcRect;
- CRect dstRect = m_dstRect;
+ CRect dstRect;
+ if (dest == NULL)
+ dstRect = m_dstRect;
+ else
+ dstRect = *dest;
+
CRectInt iSrcRect, iDstRect;
float srcWidth = srcRect.Width();
@@ -1754,6 +1801,20 @@ void CIMXContext::PrepareTask(IPUTask &ipu, CIMXBuffer *source_p, CIMXBuffer *so
ipu.task.output.crop.w = iDstRect.Width();
ipu.task.output.crop.h = iDstRect.Height();
+ // If dest is set it means we do not want to blit to frame buffer
+ // but to a capture buffer and we state this capture buffer dimensions
+ if (dest)
+ {
+ // Populate partly output block
+ ipu.task.output.crop.pos.x = 0;
+ ipu.task.output.crop.pos.y = 0;
+ ipu.task.output.crop.w = iDstRect.Width();
+ ipu.task.output.crop.h = iDstRect.Height();
+ ipu.task.output.width = iDstRect.Width();
+ ipu.task.output.height = iDstRect.Height();
+ }
+ else
+ {
// Setup deinterlacing if enabled
if (m_deInterlacing)
{
@@ -1775,6 +1836,7 @@ void CIMXContext::PrepareTask(IPUTask &ipu, CIMXBuffer *source_p, CIMXBuffer *so
else
ipu.task.input.deinterlace.field_fmt |= IPU_DEINTERLACE_FIELD_BOTTOM;
}
+ }
}
bool CIMXContext::DoTask(IPUTask &ipu, int targetPage)
@@ -1790,16 +1852,40 @@ bool CIMXContext::DoTask(IPUTask &ipu, int targetPage)
ipu.task.input.format = ipu.current->iFormat;
ipu.task.input.paddr = ipu.current->pPhysAddr;
- // Populate output block
- ipu.task.output.width = m_fbWidth;
- ipu.task.output.height = m_fbHeight;
- ipu.task.output.format = m_fbVar.nonstd;
- ipu.task.output.paddr = m_fbPhysAddr + targetPage*m_fbPageSize;
+ // Populate output block if it has not already been filled
+ if (ipu.task.output.width == 0)
+ {
+ ipu.task.output.width = m_fbWidth;
+ ipu.task.output.height = m_fbHeight;
+ ipu.task.output.format = m_fbVar.nonstd;
+ ipu.task.output.paddr = m_fbPhysAddr + targetPage*m_fbPageSize;
- if (m_pageCrops[targetPage] != dstRect)
+ if (m_pageCrops[targetPage] != dstRect)
+ {
+ m_pageCrops[targetPage] = dstRect;
+ Clear(targetPage);
+ }
+ }
+ else
{
- m_pageCrops[targetPage] = dstRect;
- Clear(targetPage);
+ // If we have already set dest dimensions we want to use capture buffer
+ // Note we allocate this capture buffer as late as this function because
+ // all g2d functions have to be called from the same thread
+ int size = ipu.task.output.width * ipu.task.output.height * 4;
+ if ((m_bufferCapture) && (size != m_bufferCapture->buf_size))
+ {
+ if (g2d_free(m_bufferCapture))
+ CLog::Log(LOGERROR, "iMX : Error while freeing capture buuffer\n");
+ m_bufferCapture = NULL;
+ }
+
+ if (m_bufferCapture == NULL)
+ {
+ m_bufferCapture = g2d_alloc(size, 0);
+ if (m_bufferCapture == NULL)
+ CLog::Log(LOGERROR, "iMX : Error allocating capture buffer\n");
+ }
+ ipu.task.output.paddr = m_bufferCapture->buf_paddr;
}
if ((ipu.task.input.crop.w <= 0) || (ipu.task.input.crop.h <= 0)
@@ -1810,53 +1896,117 @@ bool CIMXContext::DoTask(IPUTask &ipu, int targetPage)
unsigned long long before = XbmcThreads::SystemClockMillis();
#endif
- int ret = IPU_CHECK_ERR_INPUT_CROP;
- while (ret != IPU_CHECK_OK && ret > IPU_CHECK_ERR_MIN)
+ if (ipu.task.input.deinterlace.enable)
{
- ret = ioctl(m_ipuHandle, IPU_CHECK_TASK, &ipu.task);
- switch (ret)
+ //We really use IPU only if we have to deinterlace (using VDIC)
+ int ret = IPU_CHECK_ERR_INPUT_CROP;
+ while (ret != IPU_CHECK_OK && ret > IPU_CHECK_ERR_MIN)
{
- case IPU_CHECK_OK:
- break;
- case IPU_CHECK_ERR_SPLIT_INPUTW_OVER:
- ipu.task.input.crop.w -= 8;
- break;
- case IPU_CHECK_ERR_SPLIT_INPUTH_OVER:
- ipu.task.input.crop.h -= 8;
- break;
- case IPU_CHECK_ERR_SPLIT_OUTPUTW_OVER:
- ipu.task.output.crop.w -= 8;
- break;
- case IPU_CHECK_ERR_SPLIT_OUTPUTH_OVER:
- ipu.task.output.crop.h -= 8;
- break;
- default:
- CLog::Log(LOGWARNING, "iMX : unhandled IPU check error: %d\n", ret);
+ ret = ioctl(m_ipuHandle, IPU_CHECK_TASK, &ipu.task);
+ switch (ret)
+ {
+ case IPU_CHECK_OK:
+ break;
+ case IPU_CHECK_ERR_SPLIT_INPUTW_OVER:
+ ipu.task.input.crop.w -= 8;
+ break;
+ case IPU_CHECK_ERR_SPLIT_INPUTH_OVER:
+ ipu.task.input.crop.h -= 8;
+ break;
+ case IPU_CHECK_ERR_SPLIT_OUTPUTW_OVER:
+ ipu.task.output.crop.w -= 8;
+ break;
+ case IPU_CHECK_ERR_SPLIT_OUTPUTH_OVER:
+ ipu.task.output.crop.h -= 8;
+ break;
+ default:
+ CLog::Log(LOGWARNING, "iMX : unhandled IPU check error: %d\n", ret);
+ return false;
+ }
+ }
+
+ // Need to find another interface to protect ipu.current from disposing
+ // in CDVDVideoCodecIMX::Dispose. CIMXContext must not have knowledge
+ // about CDVDVideoCodecIMX.
+ ipu.current->BeginRender();
+ if (ipu.current->IsValid())
+ ret = ioctl(m_ipuHandle, IPU_QUEUE_TASK, &ipu.task);
+ else
+ ret = 0;
+ ipu.current->EndRender();
+
+ if (ret < 0)
+ {
+ CLog::Log(LOGERROR, "IPU task failed: %s\n", strerror(errno));
return false;
}
- }
- // Need to find another interface to protect ipu.current from disposing
- // in CDVDVideoCodecIMX::Dispose. CIMXContext must not have knowledge
- // about CDVDVideoCodecIMX.
- ipu.current->BeginRender();
- if (ipu.current->IsValid())
- ret = ioctl(m_ipuHandle, IPU_QUEUE_TASK, &ipu.task);
+ // Duplicate 2nd scandline if double rate is active
+ if (ipu.task.input.deinterlace.field_fmt & IPU_DEINTERLACE_RATE_EN)
+ {
+ uint8_t *pageAddr = m_fbVirtAddr + targetPage*m_fbPageSize;
+ memcpy(pageAddr, pageAddr+m_fbLineLength, m_fbLineLength);
+ }
+ }
else
- ret = 0;
- ipu.current->EndRender();
-
- if (ret < 0)
{
- CLog::Log(LOGERROR, "IPU task failed: %s\n", strerror(errno));
- return false;
- }
+ // deinterlacing is not required, let's use g2d instead of IPU
- // Duplicate 2nd scandline if double rate is active
- if (ipu.task.input.deinterlace.field_fmt & IPU_DEINTERLACE_RATE_EN)
- {
- uint8_t *pageAddr = m_fbVirtAddr + targetPage*m_fbPageSize;
- memcpy(pageAddr, pageAddr+m_fbLineLength, m_fbLineLength);
+ struct g2d_surface src, dst;
+ memset(&src, 0, sizeof(src));
+ memset(&dst, 0, sizeof(dst));
+
+ ipu.current->BeginRender();
+ if (ipu.current->IsValid())
+ {
+ if (ipu.current->iFormat == _4CC('I', '4', '2', '0'))
+ {
+ src.format = G2D_I420;
+ src.planes[0] = ipu.current->pPhysAddr;
+ src.planes[1] = src.planes[0] + Align(ipu.current->iWidth * ipu.current->iHeight, 64);
+ src.planes[2] = src.planes[1] + Align((ipu.current->iWidth * ipu.current->iHeight) / 2, 64);
+ }
+ else //_4CC('N', 'V', '1', '2');
+ {
+ src.format = G2D_NV12;
+ src.planes[0] = ipu.current->pPhysAddr;
+ src.planes[1] = src.planes[0] + Align(ipu.current->iWidth * ipu.current->iHeight, 64);
+ }
+
+ src.left = ipu.task.input.crop.pos.x;
+ src.right = ipu.task.input.crop.w + src.left ;
+ src.top = ipu.task.input.crop.pos.y;
+ src.bottom = ipu.task.input.crop.h + src.top;
+ src.stride = ipu.current->iWidth;
+ src.width = ipu.current->iWidth;
+ src.height = ipu.current->iHeight;
+ src.rot = G2D_ROTATION_0;
+ /*printf("src planes :%x -%x -%x \n",src.planes[0], src.planes[1], src.planes[2] );
+ printf("src left %d right %d top %d bottom %d stride %d w : %d h %d rot : %d\n",
+ src.left, src.right, src.top, src.bottom, src.stride, src.width, src.height, src.rot);*/
+
+ dst.planes[0] = ipu.task.output.paddr;
+ dst.left = ipu.task.output.crop.pos.x;
+ dst.top = ipu.task.output.crop.pos.y;
+ dst.right = ipu.task.output.crop.w + dst.left;
+ dst.bottom = ipu.task.output.crop.h + dst.top;
+
+ dst.stride = ipu.task.output.width;
+ dst.width = ipu.task.output.width;
+ dst.height = ipu.task.output.height;
+ dst.rot = G2D_ROTATION_0;
+ dst.format = G2D_RGBA8888;
+ /*printf("dst planes :%x -%x -%x \n",dst.planes[0], dst.planes[1], dst.planes[2] );
+ printf("dst left %d right %d top %d bottom %d stride %d w : %d h %d rot : %d format %d\n",
+ dst.left, dst.right, dst.top, dst.bottom, dst.stride, dst.width, dst.height, dst.rot, dst.format);*/
+
+ // Launch synchronous blit
+ g2d_blit(m_g2dHandle, &src, &dst);
+ g2d_finish(m_g2dHandle);
+ if ((m_bufferCapture) && (ipu.task.output.paddr == m_bufferCapture->buf_paddr))
+ m_CaptureDone = true;
+ }
+ ipu.current->EndRender();
}
#ifdef IMX_PROFILE_BUFFERS
@@ -1891,6 +2041,16 @@ void CIMXContext::Process()
bool ret, useBackBuffer;
int backBuffer;
+ // open g2d here to ensure all g2d fucntions are called from the same thread
+ if (m_g2dHandle == NULL)
+ {
+ if (g2d_open(&m_g2dHandle) != 0)
+ {
+ m_g2dHandle = NULL;
+ CLog::Log(LOGERROR, "%s - Error while trying open G2D\n", __FUNCTION__);
+ }
+ }
+
while (!m_bStop)
{
{
@@ -1903,6 +2063,10 @@ void CIMXContext::Process()
useBackBuffer = m_vsync;
IPUTask &task = m_input[m_beginInput];
backBuffer = useBackBuffer?1-m_fbCurrentPage:m_fbCurrentPage;
+
+ // Hack to detect we deal with capture buffer
+ if (task.task.output.width != 0)
+ useBackBuffer = false;
ret = DoTask(task, backBuffer);
// Free resources
@@ -1926,5 +2090,19 @@ void CIMXContext::Process()
--m_bufferedInput;
}
+ // close g2d here to ensure all g2d fucntions are called from the same thread
+ if (m_bufferCapture)
+ {
+ if (g2d_free(m_bufferCapture))
+ CLog::Log(LOGERROR, "iMX : Failed to free capture buffers\n");
+ m_bufferCapture = NULL;
+ }
+ if (m_g2dHandle)
+ {
+ if (g2d_close(m_g2dHandle))
+ CLog::Log(LOGERROR, "iMX : Error while closing G2D\n");
+ m_g2dHandle = NULL;
+ }
+
return;
}
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.h
index dca3f2f..e414454 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.h
@@ -31,6 +31,7 @@
#include <linux/ipu.h>
#include <linux/mxcfb.h>
#include <imx-mm/vpu/vpu_wrapper.h>
+#include <g2d.h>
// The decoding format of the VPU buffer. Comment this to decode
@@ -93,17 +94,15 @@ public:
CIMXContext();
~CIMXContext();
- bool Configure(int pages = 2);
+ void RequireConfiguration() { m_checkConfigRequired = true; }
+ bool Configure();
bool Close();
bool Blank();
bool Unblank();
bool SetVSync(bool enable);
- bool IsValid() const { return m_fbPages > 0; }
-
- // Returns the number of available pages
- int PageCount() const { return m_fbPages; }
+ bool IsValid() const { return m_checkConfigRequired == false; }
// Populates a CIMXBuffer with attributes of a page
bool GetPageInfo(CIMXBuffer *info, int page);
@@ -127,7 +126,7 @@ public:
// been queued. BlitAsync renders always to the current backbuffer and
// swaps the pages.
bool BlitAsync(CIMXBuffer *source_p, CIMXBuffer *source,
- bool topBottomFields = true);
+ bool topBottomFields = true, CRect *dest = NULL);
// Shows a page vsynced
bool ShowPage(int page);
@@ -141,6 +140,9 @@ public:
// Captures the current visible frame buffer page and blends it into
// the passed overlay. The buffer format is BGRA (4 byte)
void CaptureDisplay(unsigned char *buffer, int iWidth, int iHeight);
+ bool PushCaptureTask(CIMXBuffer *source, CRect *dest);
+ void *GetCaptureBuffer() const { if (m_bufferCapture) return m_bufferCapture->buf_vaddr; else return NULL; }
+ void WaitCapture();
private:
struct IPUTask
@@ -167,7 +169,7 @@ private:
bool PushTask(const IPUTask &);
void PrepareTask(IPUTask &ipu, CIMXBuffer *source_p, CIMXBuffer *source,
- bool topBottomFields);
+ bool topBottomFields, CRect *dest = NULL);
bool DoTask(IPUTask &ipu, int targetPage);
virtual void OnStartup();
@@ -179,7 +181,6 @@ private:
typedef std::vector<IPUTask> TaskQueue;
int m_fbHandle;
- int m_fbPages;
int m_fbCurrentPage;
int m_fbWidth;
int m_fbHeight;
@@ -206,6 +207,12 @@ private:
XbmcThreads::ConditionVariable m_inputNotEmpty;
XbmcThreads::ConditionVariable m_inputNotFull;
mutable CCriticalSection m_monitor;
+
+ void *m_g2dHandle;
+ struct g2d_buf *m_bufferCapture;
+ bool m_CaptureDone;
+ bool m_checkConfigRequired;
+ static const int m_fbPages;
};
--
1.9.3

View File

@ -1,24 +0,0 @@
From 1ec717d9197fb0086c76197519f2b522b4ec73af Mon Sep 17 00:00:00 2001
From: smallint <tahoma@gmx.de>
Date: Fri, 20 Feb 2015 15:40:29 +0100
Subject: [PATCH 15/16] [imx] Output associated pts for TRACE_FRAMES
---
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp
index fcd8b02..7789e38 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp
@@ -885,6 +885,7 @@ int CDVDVideoCodecIMX::Decode(BYTE *pData, int iSize, double dts, double pts)
#ifdef TRACE_FRAMES
CLog::Log(LOGDEBUG, "+ %02d dts %f pts %f (VPU)\n", idx, dts, pts);
+ CLog::Log(LOGDEBUG, "+ %02d dts %f pts %f (VPU)\n", idx, buffer->GetDts(), buffer->GetPts());
#endif
if (!m_usePTS)
--
1.9.3

View File

@ -1,34 +0,0 @@
From d2113f254cabde119734440620d16aca7444acd8 Mon Sep 17 00:00:00 2001
From: wolfgar <stephan.rafin@laposte.net>
Date: Sat, 21 Feb 2015 23:45:26 +0100
Subject: [PATCH 16/16] Add guard to fix build on non iMX6 arch
---
xbmc/windowing/egl/EGLNativeTypeIMX.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/xbmc/windowing/egl/EGLNativeTypeIMX.cpp b/xbmc/windowing/egl/EGLNativeTypeIMX.cpp
index 25dbc9b..f482075 100644
--- a/xbmc/windowing/egl/EGLNativeTypeIMX.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeIMX.cpp
@@ -96,7 +96,7 @@ void CEGLNativeTypeIMX::Initialize()
CLog::Log(LOGERROR, "%s - Error while opening /dev/fb0.\n", __FUNCTION__);
return;
}
-
+#ifdef HAS_IMXVPU
struct mxcfb_color_key colorKey;
struct mxcfb_gbl_alpha gbl_alpha;
struct mxcfb_loc_alpha lalpha;
@@ -117,7 +117,7 @@ void CEGLNativeTypeIMX::Initialize()
colorKey.color_key = (16 << 16)|(8 << 8)|16;
if (ioctl(fd, MXCFB_SET_CLR_KEY, &colorKey) < 0)
CLog::Log(LOGERROR, "%s - Failed to setup color keying\n", __FUNCTION__);
-
+#endif
// Unblank the fb
if (ioctl(fd, FBIOBLANK, 0) < 0)
{
--
1.9.3