Skip to content
Browse files

Merge branch 'master' into pvr-ppa

  • Loading branch information...
2 parents 99c0b41 + 053e479 commit 28847152eda01b93d48d491f05d05e7c0de058fe @opdenkamp committed Nov 2, 2011
Showing with 1,949 additions and 876 deletions.
  1. +45 −15 addons/skin.confluence/language/Czech/strings.xml
  2. +2 −0 configure.in
  3. +53 −8 language/Catalan/strings.xml
  4. +1 −1 language/Czech/langinfo.xml
  5. +377 −357 language/Czech/strings.xml
  6. +2 −1 language/English/strings.xml
  7. +41 −1 language/German/strings.xml
  8. +1 −1 lib/cmyth/include/cmyth/cmyth.h
  9. +3 −3 lib/cmyth/include/refmem/atomic.h
  10. +1 −1 lib/cmyth/libcmyth/debug.c
  11. +4 −4 lib/cmyth/libcmyth/mythtv_mysql.c
  12. +2 −1 lib/cmyth/librefmem/alloc.c
  13. +60 −13 lib/ffmpeg/libavcodec/arm/fft_neon.S
  14. +14 −14 lib/ffmpeg/libavcodec/arm/h264idct_neon.S
  15. +2 −3 lib/ffmpeg/libavcodec/arm/h264pred_neon.S
  16. +1 −2 lib/ffmpeg/libavcodec/arm/simple_idct_neon.S
  17. +6 −7 lib/ffmpeg/libavcodec/arm/vp3dsp_neon.S
  18. +307 −0 lib/ffmpeg/patches/0057-Fixes-neon-usage-under-iOS5.patch
  19. +1 −1 lib/libexif/IptcParse.cpp
  20. +43 −0 system/Lircmap.xml
  21. +34 −22 system/keymaps/keyboard.nyxboard.xml
  22. +5 −0 system/keymaps/keyboard.xml
  23. +5 −0 system/keymaps/remote.xml
  24. +42 −89 tools/EventClients/Clients/PS3 Sixaxis Controller/ps3d.py
  25. +10 −0 tools/EventClients/lib/python/bt/hid.py
  26. +0 −54 tools/EventClients/lib/python/ps3/keymaps.py
  27. +182 −50 tools/EventClients/lib/python/ps3/sixaxis.py
  28. +114 −0 tools/EventClients/lib/python/ps3/sixpair.py
  29. +31 −0 tools/EventClients/lib/python/ps3/sixwatch.py
  30. +6 −2 tools/Linux/xbmc-standalone.sh.in
  31. +2 −1 tools/darwin/depends/config.site_ios.mk.in
  32. +1 −1 tools/darwin/depends/config.site_osx.in
  33. +2 −1 tools/darwin/depends/config.site_osx.mk.in
  34. +1 −1 tools/darwin/depends/fontconfig/Makefile
  35. +1 −1 tools/darwin/depends/freetype2/Makefile
  36. +2 −2 tools/darwin/depends/libass/Makefile
  37. +5 −0 tools/darwin/packaging/xbmc-atv2/mkdeb-xbmc-atv2.sh
  38. +23 −5 xbmc/Application.cpp
  39. +5 −4 xbmc/FileItem.cpp
  40. +1 −1 xbmc/FileItem.h
  41. +28 −0 xbmc/addons/GUIDialogAddonSettings.cpp
  42. +1 −0 xbmc/addons/GUIDialogAddonSettings.h
  43. +1 −1 xbmc/addons/Scraper.cpp
  44. +2 −1 xbmc/cores/dvdplayer/DVDSubtitles/DVDSubtitlesLibass.cpp
  45. +2 −1 xbmc/cores/paplayer/BXAcodec.cpp
  46. +2 −2 xbmc/dbwrappers/Database.cpp
  47. +1 −0 xbmc/dbwrappers/Database.h
  48. +11 −0 xbmc/dialogs/GUIDialogContextMenu.cpp
  49. +1 −0 xbmc/dialogs/GUIDialogContextMenu.h
  50. +2 −0 xbmc/filesystem/AFPDirectory.cpp
  51. +72 −13 xbmc/filesystem/FileAFP.cpp
  52. +7 −1 xbmc/filesystem/FileAFP.h
  53. +3 −3 xbmc/filesystem/FileCurl.cpp
  54. +46 −29 xbmc/filesystem/FileNFS.cpp
  55. +5 −2 xbmc/filesystem/FileNFS.h
  56. +1 −1 xbmc/filesystem/FilePipe.cpp
  57. +7 −1 xbmc/guilib/DirtyRegionSolvers.cpp
  58. +7 −1 xbmc/guilib/DirtyRegionSolvers.h
  59. +10 −6 xbmc/guilib/DirtyRegionTracker.cpp
  60. +0 −2 xbmc/guilib/GUIShader.cpp
  61. +9 −1 xbmc/guilib/GUIWindowManager.cpp
  62. +1 −1 xbmc/guilib/GUIWrappingListContainer.cpp
  63. +4 −0 xbmc/guilib/GraphicContext.cpp
  64. +2 −1 xbmc/guilib/IDirtyRegionSolver.h
  65. +45 −0 xbmc/guilib/MatrixGLES.cpp
  66. +1 −0 xbmc/guilib/MatrixGLES.h
  67. +6 −1 xbmc/interfaces/python/xbmcmodule/pyrendercapture.cpp
  68. +8 −1 xbmc/interfaces/python/xbmcmodule/pyrendercapture.h
  69. +15 −3 xbmc/interfaces/python/xbmcmodule/xbmcmodule.cpp
  70. +2 −2 xbmc/music/MusicDatabase.h
  71. +2 −1 xbmc/peripherals/devices/PeripheralCecAdapter.cpp
  72. +4 −1 xbmc/pvr/PVRDatabase.cpp
  73. +2 −5 xbmc/pvr/PVRManager.cpp
  74. +11 −5 xbmc/pvr/channels/PVRChannelGroup.cpp
  75. +5 −0 xbmc/pvr/channels/PVRChannelGroup.h
  76. +0 −12 xbmc/pvr/channels/PVRChannelGroups.cpp
  77. +0 −7 xbmc/pvr/channels/PVRChannelGroups.h
  78. +22 −40 xbmc/pvr/windows/GUIWindowPVR.cpp
  79. +1 −3 xbmc/pvr/windows/GUIWindowPVR.h
  80. +9 −4 xbmc/pvr/windows/GUIWindowPVRChannels.cpp
  81. +4 −3 xbmc/pvr/windows/GUIWindowPVRGuide.cpp
  82. +4 −2 xbmc/pvr/windows/GUIWindowPVRRecordings.cpp
  83. +2 −1 xbmc/pvr/windows/GUIWindowPVRTimers.cpp
  84. +5 −0 xbmc/rendering/RenderSystem.h
  85. +16 −0 xbmc/rendering/dx/RenderSystemDX.cpp
  86. +7 −0 xbmc/rendering/dx/RenderSystemDX.h
  87. +16 −3 xbmc/rendering/gl/RenderSystemGL.cpp
  88. +9 −0 xbmc/rendering/gl/RenderSystemGL.h
  89. +18 −0 xbmc/rendering/gles/RenderSystemGLES.cpp
  90. +6 −0 xbmc/rendering/gles/RenderSystemGLES.h
  91. +1 −0 xbmc/settings/GUISettings.cpp
  92. +1 −1 xbmc/storage/MediaManager.cpp
  93. +4 −2 xbmc/video/VideoDatabase.cpp
  94. +2 −2 xbmc/video/VideoDatabase.h
  95. +1 −1 xbmc/video/VideoInfoTag.cpp
  96. +47 −22 xbmc/video/windows/GUIWindowFullScreen.cpp
  97. +1 −1 xbmc/video/windows/GUIWindowVideoNav.cpp
  98. +9 −0 xbmc/win32/WIN32Util.cpp
  99. +0 −19 xbmc/xbmc.cpp
View
60 addons/skin.confluence/language/Czech/strings.xml
@@ -1,16 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!--Translator: ezechiel1917-->
<!--Date of translation: 26/09/2010-->
+<!--updated 22/10/2011 by mirek-->
<strings>
<!-- Misc labels -->
<string id="31000">Změnit</string>
<string id="31001">Milovat</string>
<string id="31002">Nesnášet</string>
<string id="31003">Napájení</string>
<string id="31004">Pracuji...</string>
- <string id="31005">Skrýt INFO</string>
-
+ <string id="31005">Skrýt Info</string>
+ <string id="31006">Zobrazit možnosti</string>
<string id="31007">Pluginy</string>
+ <string id="31008">Celá obrazovka</string>
<string id="31020">Nejnovější položky</string>
<string id="31021">Video - Soubory</string>
@@ -24,7 +26,7 @@
<!-- View Type labels -->
<string id="31028">Obaly</string>
<string id="31029">Fanart</string>
- <string id="31030">Seznam I</string>
+ <string id="31030">Seznam</string>
<string id="31031">Náhledy</string>
<string id="31032">Obrázky</string>
<string id="31033">Info</string>
@@ -40,6 +42,8 @@
<string id="31047">Akutální předvolba</string>
<string id="31048">Předvolby vizualizace</string>
<string id="31049">Čas ukončení</string>
+ <string id="31050">Seřadit: vzestupně</string>
+ <string id="31051">Seřadit: sestupně</string>
<!-- Playlist Editor labels -->
@@ -55,35 +59,42 @@
<string id="31100"></string>
<string id="31101">Informace na Úvodní obrazovce</string>
<string id="31102">Pozadí</string>
- <string id="31103">Zobrazovat "POZASTAVENO" při prezentaci obrázků</string>
+ <string id="31103">Zobrazovat "Pozastaveno" při prezentaci obrázků</string>
<string id="31104">Přehrávat upoutávky v okně [COLOR=grey3](pouze z okna Informace o videu)[/COLOR]</string>
- <string id="31105"></string>
+ <string id="31105">V nabídce "Video" vždy zobrazit "Soubory"</string>
<string id="31106">Různé</string>
<string id="31107">Nezobrazovat ikony zdroje videí [COLOR=grey3](Blu-ray, HD-DVD)[/COLOR]</string>
<string id="31108">Zobrazení sekcí úvodní obrazovky</string>
<string id="31109">Pozadí úvodní obrazovky</string>
<string id="31110">Změnit pozadí úvodní obrazovky - sekce</string>
<string id="31111">Skrýt</string>
<string id="31112">Možnosti</string>
- <string id="31113">1 obrázek</string>
+ <string id="31113">Jeden obrázek</string>
<string id="31114">Více obrázků</string>
<string id="31115">Přizpůsobení</string>
<string id="31116"></string>
<string id="31117">Zobrazovat Nejnovější filmy a epizody</string>
- <string id="31118">Úvodní obrazovka</string>
- <string id="31119"></string>
+ <string id="31118">Úvodní obrazovka - nabídka Programy</string>
+ <string id="31119">Skrýt Fanart na pozadí</string>
<string id="31120">NÁZEV POLOŽKY</string>
<string id="31121"></string>
<string id="31122">Počasí</string>
- <string id="31123">Použít u TV seriálů klasické náhledy místo širokoúhlých</string>
+ <string id="31123">Použít u TV seriálů klasické náhledy místo bannerů</string>
<string id="31124">Zobrazovat na pozadí právě přehrávané video</string>
<string id="31125">Zobrazovat na pozadí vizualizaci</string>
- <string id="31126"></string>
- <string id="31127"></string>
+ <string id="31126">Přehrát znělky v knihovně videí (doplněk TvTunes)</string>
+ <string id="31127">TvTunes</string>
<string id="31128">Texty skladeb</string>
<string id="31129"></string>
<string id="31130"></string>
+
+ <string id="31131"></string>
+ <string id="31132">Doplněk Texty skladeb</string>
+ <string id="31133">Doplněk Titulky</string>
+ <string id="31134">Úvodní strana - podmenu Videa</string>
+ <string id="31135">Úvodní strana - podmenu Hudba</string>
+ <string id="31136">Úvodní strana - podmenu Obrázky</string>
<string id="31140">Hudební OSD</string>
<string id="31141">Video OSD</string>
@@ -97,7 +108,7 @@
<string id="31205">Zdroj textu skladeb</string>
<!-- Extra labels -->
- <string id="31300">Aktuální teplota</string>
+ <string id="31300">Aktuální počasí</string>
<string id="31301">Naposledy aktualizováno</string>
<string id="31302">Menu</string>
<string id="31303"></string>
@@ -108,7 +119,7 @@
<string id="31308">Detaily o filmu</string>
<string id="31309">Využitá paměť:</string>
<string id="31310">Číslo stopy</string>
- <string id="31311">POZADÍ FANART[CR][CR]NENÍ K DISPOZICI[CR][CR] NASTAVTE HO STISKNUTÍM TLAČÍTKA</string>
+ <string id="31311">Fanart[CR][CR]není k dispozici[CR][CR] Nastavte ho stisknutím tlačítka</string>
<string id="31312">Současný stahovač</string>
<string id="31313">Změnit stahovač</string>
<string id="31314">Možnosti vyhledávání obsahu</string>
@@ -126,8 +137,9 @@
<string id="31326">Vytvořeno</string>
<string id="31327">Rozlišení</string>
<string id="31328">Nejnovější položky</string>
- <string id="31329">[B]ČASOVAČ BYL NASTAVEN![/B] [COLOR=grey2] - SYSTÉM SE AUTOMATICKY VYPNE ZA[/COLOR]</string>
+ <string id="31329">[B]Časovač byl nastaven![/B] [COLOR=grey2] - Systém se automaticky vypne za[/COLOR]</string>
<string id="31330">Pro přehrání upoutávky[CR][CR]stiskněte tlačítko</string>
+ <string id="31331">Detaily o albu</string>
<!-- Video and Music OSD Labels -->
<string id="31351">Pozastavit</string>
@@ -138,6 +150,11 @@
<string id="31356">Stáhnout titulky</string>
<string id="31357"></string>
+ <!-- Skin Fontsets -->
+ <string id="31390">Výchozí vzhled</string>
+ <string id="31391">Výchozí vzhled bez velkých písmen</string>
+ <string id="31392">Písmo Arial</string>
+
<!-- Description Labels -->
<string id="31400">[B]MOŽNOSTI PROSTŘEDÍ[/B][CR][CR]Změna vzhledu · Výběr jazyka a oblasti · Možnosti zobrazení souborů[CR]Nastavení spořiče obrazovky</string>
<string id="31401">[B]MOŽNOSTI VIDEA[/B][CR][CR]Správa knihovny videí · Možnosti přehrávání videa · Možnosti zobrazení video souborů[CR]Nastavení fontu titulků</string>
@@ -150,4 +167,17 @@
<string id="31408">[B]MOŽNOSTI DOPLŇKŮ[/B][CR][CR]Správa nainstalovaných doplňků · Vyhledávání a instalace doplňků z xbmc.org[CR]Nastavení doplňků</string>
<string id="31421">Přihlášení uživatele[CR]Pokračujte výběrem profilu</string>
-</strings>
+
+ <!-- Weather plugin -->
+ <string id="31900">Mapy počasí</string>
+ <string id="31901">Předpověď na 36 hodin</string>
+ <string id="31902">Hodinová předpověď</string>
+ <string id="31903">Předpověď na víkend</string>
+ <string id="31904">Předpověď na 10 dní</string>
+ <string id="31905">Předpověď</string>
+ <string id="31906">Mapy a Video</string>
+ <string id="31907">Video předpověď [COLOR=grey2](Přehrávání na celé obrazovce)[/COLOR]</string>
+ <string id="31908">Pravděpodobnost srážek</string>
+ <string id="31909">Načítání informací o předpovědi...</string>
+
+ </strings>
View
2 configure.in
@@ -455,6 +455,8 @@ case $host in
;;
arm-apple-darwin*)
use_joystick=no
+ use_neon=yes
+ use_libcec=no
use_crystalhd=no
use_vdadecoder=no
use_vtbdecoder=yes
View
61 language/Catalan/strings.xml
@@ -811,6 +811,7 @@
<string id="1270">Permet que l'XBMC rebi contingut de l'AirPlay</string>
<string id="1271">Nom del dispositiu</string>
+ <string id="1272">- Utilitza protecció amb contrasenya</string>
<string id="1300">Dispositiu d'àudio personalitzat</string>
<string id="1301">Custom passthrough device</string>
@@ -1480,20 +1481,25 @@
<string id="16020">Desentrellaçat</string>
<string id="16021">Bob</string>
<string id="16022">Bob (invertit)</string>
- <string id="16023">Manejador entrellaçat</string>
+ <string id="16023"></string>
<string id="16024">S'està cancel·lant...</string>
<string id="16025">Introduïu el nom de l'artista</string>
<string id="16026">La reproducció ha fallat</string>
<string id="16027">Un o més ítems no s'han pogut reproduir.</string>
<string id="16028">Introduïu el valor</string>
- <string id="16029">Check the log file for details.</string>
+ <string id="16029">Comproveu el fitxer de registre per obtenir més detalls.</string>
<string id="16030">Mode festa abortat.</string>
<string id="16031">Sense cançons coincidents a la biblioteca</string>
<string id="16032">No s'ha pogut inicialitzar la base de dades.</string>
<string id="16033">No s'ha pogut obrir la base de dades.</string>
<string id="16034">No s'han pogut obtenir les cançons de la base de dades.</string>
- <string id="16035">Lllista de reproducció del mode festa</string>
+ <string id="16035">Llista de reproducció del mode festa</string>
<string id="16036">Desentrellaçat (Half)</string>
+ <string id="16037">Deinterlace video</string>
+ <string id="16038">Mètode de desentrellaçat</string>
+ <string id="16039">Off</string>
+ <string id="16040">Auto</string>
+ <string id="16041">On</string>
<string id="16100">Tots els vídeos</string>
<string id="16101">No visualitzats</string>
@@ -1534,6 +1540,7 @@
<string id="16321">DXVA Best</string>
<string id="16322">Spline36</string>
<string id="16323">Spline36 optimitzat</string>
+ <string id="16324">Software Blend</string>
<string id="16400">Postprocessament</string>
@@ -1746,7 +1753,7 @@
<string id="20258">Client de MythTV</string>
<string id="20259">Network Filesystem (NFS)</string>
<string id="20260">Secure Shell (SSH/SFTP)</string>
- <string id="20261">Apple File Protocol (AFP)</string>
+ <string id="20261">Apple Filing Protocol (AFP)</string>
<string id="20300">Directori del servidor web (HTTP)</string>
<string id="20301">Directori dels servidor web (HTTPS)</string>
@@ -1911,16 +1918,16 @@
<string id="21336">S'està connectant a: %s</string>
<string id="21337">Unitat de TuxBox</string>
<!-- up to 21355 is reserved for the TuxBox Client!! !-->
-
+
<string id="21359">Afegeix recurs compartit...</string>
<string id="21360">Comparteix les biblioteques de vídeo i música a través de UPnP</string>
-
+
<string id="21364">Edita recurs compartit</string>
<string id="21365">Elimina recurs compartit</string>
<string id="21366">Carpeta del subtítol</string>
<string id="21367">Movie &amp; alternate subtitle directory</string>
-
- <string id="21369">Activa el ratolí</string>
+
+ <string id="21369">Activa el suport de ratolí i pantalla tàctil</string>
<string id="21370">Reprodueix els sons de navegació durant la reproducció</string>
<string id="21371">Miniatura</string>
<string id="21372">Força la regió del reproductor DVD</string>
@@ -2223,6 +2230,7 @@
<string id="24073">No s'ha pogut connectar</string>
<string id="24074">És necessari reiniciar</string>
<string id="24075">Desactiva</string>
+ <string id="24076">Complement necessari</string>
<string id="24080">Voleu tornar a provar de connectar?</string>
<string id="24089">Reinicia el complement</string>
<string id="24090">Bloqueja el gestor de complements</string>
@@ -2233,6 +2241,8 @@
<string id="24097">Voleu desactivar-lo en el sistema?</string>
<string id="24098">Trencat</string>
<string id="24099">Voleu canviar a aquesta aparença?</string>
+ <string id="24100">Per utilitzar aquesta funció cal descarregar un complement:</string>
+ <string id="24101">Voleu descarregar aquest complement?</string>
<string id="25000">Notificacions</string>
<!-- strings 29800 thru 29998 reserved strings used only in the default Project Mayhem III skin and not c++ code -->
@@ -2345,4 +2355,39 @@
<string id="34201">Can't find a next item to play</string>
<string id="34202">Can't find a previous item to play</string>
+
+ <string id="35000">Perifèrics</string>
+ <string id="35001">Generic HID device</string>
+ <string id="35002">Adaptador de xarxa genèric</string>
+ <string id="35003">Disc genèric</string>
+ <string id="35004">No hi ha opcions disponibles&#10;per aquest perifèric.</string>
+ <string id="35005">Nou dispositiu configurat</string>
+ <string id="35006">Dispositiu eliminat</string>
+ <string id="35007">Keymap to use for this device</string>
+ <string id="35008">Mapa de teclat activat</string>
+
+ <string id="35500">Ubicació</string>
+ <string id="35501">Classe</string>
+ <string id="35502">Nom</string>
+ <string id="35503">Venedor</string>
+ <string id="35504">Product ID</string>
+
+ <string id="36000">Pulse-Eight CEC adapter</string>
+ <string id="36001">Pulse-Eight Nyxboard</string>
+ <string id="36002">Switch to keyboard side command</string>
+ <string id="36003">Switch to remote side command</string>
+ <string id="36004">Press "user" button command</string>
+ <string id="36005">Enable switch side commands</string>
+ <string id="36006">Could not open the adapter</string>
+ <string id="36007">Power on the TV when starting XBMC</string>
+ <string id="36008">Power off devices when stopping XBMC</string>
+ <string id="36009">Put devices in standby mode when activating screensaver</string>
+ <string id="36010">Set as inactive source when stopping XBMC</string>
+ <string id="36011">Could not detect the CEC port. Set it up manually.</string>
+ <string id="36012">Could not detect the CEC adapter.</string>
+ <string id="36013">Unsupported libcec interface version. %d is greater than the version XBMC supports (%d)</string>
+ <string id="36014">Put this PC in standby mode when the TV is switched off</string>
+ <string id="36015">Número de port HDMI</string>
+ <string id="36016">XBMC connectat</string>
+ <string id="36017">S'ha trobat un adaptador, però la libcec no està disponible</string>
</strings>
View
2 language/Czech/langinfo.xml
@@ -14,7 +14,7 @@
<regions>
<region name="CZ" locale="CZ">
<dateshort>D.M.YYYY</dateshort>
- <datelong>D. MMMM YYYY</datelong>
+ <datelong>DDDD, D. MMMM YYYY</datelong>
<time symbolAM="" symbolPM="">H:mm:ss</time>
<tempunit>C</tempunit>
<speedunit>kmh</speedunit>
View
734 language/Czech/strings.xml
377 additions, 357 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
3 language/English/strings.xml
@@ -2364,7 +2364,8 @@
<string id="21365">Remove media share</string>
<string id="21366">Subtitle folder</string>
<string id="21367">Movie &amp; alternate subtitle directory</string>
-
+ <string id="21368">Override ASS/SSA subtitles fonts</string>
+
<string id="21369">Enable mouse and Touch Screen support</string>
<string id="21370">Play navigation sounds during media playback</string>
<string id="21371">Thumbnail</string>
View
42 language/German/strings.xml
@@ -2378,7 +2378,8 @@
<string id="21366">Alternatives Untertitel-Verzeichnis</string>
<string id="21367">Video- &amp; alternatives Untertitel-Verzeichnis</string>
- <string id="21369">Maus aktivieren</string>
+ <string id="21368">ASS/SSA Untertitel Schriftarten ignorieren</string>
+ <string id="21369">Maus und Touchscreen Unterstützung aktivieren</string>
<string id="21370">Navigations-Sounds während Medienwiedergabe aktivieren</string>
<string id="21371">Thumbnail</string>
<string id="21372">Erzwungene DVD-Player Region</string>
@@ -2776,4 +2777,43 @@
<string id="33100">Start fehlgeschlagen</string>
<string id="34100">Lautsprecherkonfiguration</string>
+
+ <string id="34201">Nächstes Element konnte nicht gefunden werden</string>
+ <string id="34202">Vorheriges Element konnte nich gefunden werden</string>
+
+ <string id="35000">Geräte</string>
+
+ <string id="35001">HID-Gerät</string>
+ <string id="35002">Netzwerkadapter</string>
+ <string id="35003">Festplatte</string>
+ <string id="35004">Für dieses Gerät sind keine Einstellungen verfügbar</string>
+ <string id="35005">Neues Gerät konfiguriert</string>
+ <string id="35006">Gerät entfernt</string>
+ <string id="35007">Tastenbelegung für dieses Gerät</string>
+ <string id="35008">Tastenbelegung aktiviert</string>
+
+ <string id="35500">Ort</string>
+ <string id="35501">Klasse</string>
+ <string id="35502">Name</string>
+ <string id="35503">Hersteller</string>
+ <string id="35504">Produkt ID</string>
+
+ <string id="36000">Pulse-Eight CEC Adapter</string>
+ <string id="36001">Pulse-Eight Nyxboard</string>
+ <string id="36002">Befehl beim Wechsel zur Tastatur-Seite</string>
+ <string id="36003">Befehl beim Wechsel zur Fernbedienungs-Seite</string>
+ <string id="36004">Befehl der benutzerdefinierten Taste (USER)</string>
+ <string id="36005">Seitenwechsel Befehle aktivieren</string>
+ <string id="36006">Der Adapter konnte nicht geöffnet werden</string>
+ <string id="36007">Geräte anschalten wenn XBMC startet</string>
+ <string id="36008">Geräe ausschalten wenn XBMC beendet wird</string>
+ <string id="36009">Geräte in den Standby versetzen wenn der Bilschirmschoner aktiviert wird</string>
+ <string id="36010">Als inaktiv markieren wenn XBMC beendet wird</string>
+ <string id="36011">Der CEC Port konnte nicht gefunden werden. Manuell einstellen.</string>
+ <string id="36012">Der CEC Adapter konnte nicht gefunden werden.</string>
+ <string id="36013">Nicht unterstützte libcec Version. %d ist größer als die von XBMC unterstützte Version (%d)</string>
+ <string id="36014">PC in den Standby versetzen wenn der Fernseher ausgeschaltet wird</string>
+ <string id="36015">HDMI Port Nummer</string>
+ <string id="36016">XBMC verbunden</string>
+ <string id="36017">CEC Adapter gefunden, aber libcec ist nicht verfügbar</string>
</strings>
View
2 lib/cmyth/include/cmyth/cmyth.h
@@ -201,7 +201,7 @@ extern void cmyth_dbg(int level, char *fmt, ...);
* Define a callback to use to send messages rather than using stderr
* \param msgcb function pointer to pass a string to
*/
-extern void cmyth_set_dbg_msgcallback(void (*msgcb)(char *));
+extern void cmyth_set_dbg_msgcallback(void (*msgcb)(int level,char *));
/*
* -----------------------------------------------------------------
View
6 lib/cmyth/include/refmem/atomic.h
@@ -63,7 +63,7 @@ __mvp_atomic_increment(mvp_atomic_t *valp)
/**
* Atomically decrement a reference count variable.
* \param valp address of atomic variable
- * \return incremented reference count
+ * \return decremented reference count
*/
static inline unsigned
__mvp_atomic_decrement(mvp_atomic_t *valp)
@@ -72,7 +72,7 @@ __mvp_atomic_decrement(mvp_atomic_t *valp)
#if defined __i486__ || defined __i586__ || defined __i686__
__asm__ __volatile__(
"lock xaddl %0, (%1);"
- " inc %0;"
+ " dec %0;"
: "=r" (__val)
: "r" (valp), "0" (0x1)
: "cc", "memory"
@@ -113,7 +113,7 @@ __mvp_atomic_decrement(mvp_atomic_t *valp)
* Don't know how to atomic decrement for a generic architecture
* so punt and just decrement the value.
*/
-//#warning unknown architecture, atomic deccrement is not...
+//#warning unknown architecture, atomic decrement is not...
__val = --(*valp);
#endif
return __val;
View
2 lib/cmyth/libcmyth/debug.c
@@ -116,7 +116,7 @@ cmyth_dbg(int level, char *fmt, ...)
}
void
-cmyth_set_dbg_msgcallback(void (*msgcb)(char *))
+cmyth_set_dbg_msgcallback(void (*msgcb)(int level,char *))
{
cmyth_debug_ctx.msg_callback = msgcb;
}
View
8 lib/cmyth/libcmyth/mythtv_mysql.c
@@ -936,7 +936,7 @@ cmyth_mythtv_remove_previos_recorded(cmyth_database_t db,char *query)
int
cmyth_mysql_testdb_connection(cmyth_database_t db,char **message) {
- char buf[1000];
+ char *buf=malloc(sizeof(char)*1001);
int new_conn = 0;
if (db->mysql != NULL) {
if (mysql_stat(db->mysql) == NULL) {
@@ -949,21 +949,21 @@ cmyth_mysql_testdb_connection(cmyth_database_t db,char **message) {
new_conn = 1;
if(db->mysql == NULL) {
fprintf(stderr,"%s: mysql_init() failed, insufficient memory?", __FUNCTION__);
- snprintf(buf, sizeof(buf), "mysql_init() failed, insufficient memory?");
+ snprintf(buf, 1000, "mysql_init() failed, insufficient memory?");
*message=buf;
return -1;
}
if (NULL == mysql_real_connect(db->mysql, db->db_host,db->db_user,db->db_pass,db->db_name,0,NULL,0)) {
fprintf(stderr,"%s: mysql_connect() failed: %s\n", __FUNCTION__,
mysql_error(db->mysql));
- snprintf(buf, sizeof(buf), "%s",mysql_error(db->mysql));
+ snprintf(buf, 1000, "%s",mysql_error(db->mysql));
fprintf (stderr,"buf = %s\n",buf);
*message=buf;
cmyth_database_close(db);
return -1;
}
}
- snprintf(buf, sizeof(buf), "All Test Successful\n");
+ snprintf(buf, 1000, "All Test Successful\n");
*message=buf;
return 1;
}
View
3 lib/cmyth/librefmem/alloc.c
@@ -283,7 +283,8 @@ ref_realloc(void *p, size_t len)
refmem_dbg(REF_DBG_DEBUG, "%s(%d, ret = %p, ref = %p) {\n",
__FUNCTION__, len, ret, ref);
#ifdef DEBUG
- assert(ref->magic == ALLOC_MAGIC);
+ if(p)
+ assert(ref->magic == ALLOC_MAGIC);
#endif /* DEBUG */
if (p && ret) {
memcpy(ret, p, ref->length);
View
73 lib/ffmpeg/libavcodec/arm/fft_neon.S
@@ -101,8 +101,12 @@ function fft8_neon
bx lr
endfunc
+ .align 4
+pmmp: .float +1.0, -1.0, -1.0, +1.0
+mppm: .float -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2
+
function fft16_neon
- movrel r1, mppm
+ adr r1, mppm
vld1.32 {d16-d19}, [r0,:128]! @ q8{r0,i0,r1,i1} q9{r2,i2,r3,i3}
pld [r0, #32]
vld1.32 {d2-d3}, [r1,:128]
@@ -144,12 +148,16 @@ function fft16_neon
vswp d29, d30 @ q14{r12,i12,i14,r15} q15{r13,i13,i15,r14}
vadd.f32 q0, q12, q13 @ {t1,t2,t5,t6}
vadd.f32 q1, q14, q15 @ {t1a,t2a,t5a,t6a}
- movrel r2, X(ff_cos_16)
+ ldr r2, _neon_label
+ ldr r3, L$diff1
+ add r2, r3
+local_label1:
+ ldr r2, [pc, r2]
vsub.f32 q13, q12, q13 @ {t3,t4,t7,t8}
vrev64.32 d1, d1
vsub.f32 q15, q14, q15 @ {t3a,t4a,t7a,t8a}
vrev64.32 d3, d3
- movrel r3, pmmp
+ adr r3, pmmp
vswp d1, d26 @ q0{t1,t2,t3,t4} q13{t6,t5,t7,t8}
vswp d3, d30 @ q1{t1a,t2a,t3a,t4a} q15{t6a,t5a,t7a,t8a}
vadd.f32 q12, q0, q13 @ {r8,i8,r9,i9}
@@ -214,7 +222,7 @@ function fft_pass_neon
add r2, r2, r0 @ &z[o2]
add r3, r3, r0 @ &z[o3]
vld1.32 {d20-d21},[r2,:128] @ {z[o2],z[o2+1]}
- movrel r12, pmmp
+ adr r12, pmmp
vld1.32 {d22-d23},[r3,:128] @ {z[o3],z[o3+1]}
add r5, r5, r1 @ wim
vld1.32 {d6-d7}, [r12,:128] @ pmmp
@@ -279,6 +287,11 @@ function fft_pass_neon
pop {r4-r6,pc}
endfunc
+.set L$offs16, 0
+.macro setTabOffs n, n2
+.set L$offs\n, L$offs\n2 + 4
+.endm
+
.macro def_fft n, n2, n4
.align 6
function fft\n\()_neon
@@ -291,10 +304,15 @@ function fft\n\()_neon
bl fft\n4\()_neon
mov r0, r4
pop {r4, lr}
- movrel r1, X(ff_cos_\n)
+ ldr r1, _neon_label
+ add r1, #L$diff\n
+local_label\n:
+ ldr r1, [pc, r1]
mov r2, #\n4/2
b fft_pass_neon
endfunc
+setTabOffs \n, \n2
+.set L$diff\n, _neon_label - local_label\n + L$offs\n - 8
.endm
def_fft 32, 16, 8
@@ -310,10 +328,14 @@ endfunc
def_fft 32768, 16384, 8192
def_fft 65536, 32768, 16384
+.set L$diffTab, fft_tab_neon_offs - local_label_tab - 8
function ff_fft_calc_neon, export=1
ldr r2, [r0]
sub r2, r2, #2
- movrel r3, fft_tab_neon
+ ldr r3, fft_tab_neon_offs
+ add r3, #L$diffTab
+local_label_tab:
+ add r3, pc
ldr r3, [r3, r2, lsl #2]
mov r0, r1
bx r3
@@ -349,9 +371,22 @@ function ff_fft_permute_neon, export=1
pop {r4,pc}
endfunc
- .section .rodata
+
+.global _neon_label
+_neon_label:
+.word _neon_cos_tab - .
+
+L$diff1:
+.word _neon_label - local_label1 - 8
+
+fft_tab_neon_offs:
+.word _fft_tab_neon - .
+
+
+.section .rodata
+
.align 4
-fft_tab_neon:
+_fft_tab_neon:
.word fft4_neon
.word fft8_neon
.word fft16_neon
@@ -367,8 +402,20 @@ fft_tab_neon:
.word fft16384_neon
.word fft32768_neon
.word fft65536_neon
-ELF .size fft_tab_neon, . - fft_tab_neon
-
- .align 4
-pmmp: .float +1.0, -1.0, -1.0, +1.0
-mppm: .float -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2
+ELF .size _fft_tab_neon, . - _fft_tab_neon
+
+ .align 4
+_neon_cos_tab:
+ .word X(ff_cos_16)
+ .word X(ff_cos_32)
+ .word X(ff_cos_64)
+ .word X(ff_cos_128)
+ .word X(ff_cos_256)
+ .word X(ff_cos_512)
+ .word X(ff_cos_1024)
+ .word X(ff_cos_2048)
+ .word X(ff_cos_4096)
+ .word X(ff_cos_8192)
+ .word X(ff_cos_16384)
+ .word X(ff_cos_32768)
+ .word X(ff_cos_65536)
View
28 lib/ffmpeg/libavcodec/arm/h264idct_neon.S
@@ -97,7 +97,7 @@ function ff_h264_idct_add16_neon, export=1
mov r1, r2
mov r2, r3
ldr r6, [sp, #24]
- movrel r7, scan8
+ adr r7, scan8
mov ip, #16
1: ldrb r8, [r7], #1
ldr r0, [r5], #4
@@ -117,14 +117,24 @@ function ff_h264_idct_add16_neon, export=1
pop {r4-r8,pc}
endfunc
+ .align
+scan8: .byte 4+1*8, 5+1*8, 4+2*8, 5+2*8
+ .byte 6+1*8, 7+1*8, 6+2*8, 7+2*8
+ .byte 4+3*8, 5+3*8, 4+4*8, 5+4*8
+ .byte 6+3*8, 7+3*8, 6+4*8, 7+4*8
+ .byte 1+1*8, 2+1*8
+ .byte 1+2*8, 2+2*8
+ .byte 1+4*8, 2+4*8
+ .byte 1+5*8, 2+5*8
+
function ff_h264_idct_add16intra_neon, export=1
push {r4-r8,lr}
mov r4, r0
mov r5, r1
mov r1, r2
mov r2, r3
ldr r6, [sp, #24]
- movrel r7, scan8
+ adr r7, scan8
mov ip, #16
1: ldrb r8, [r7], #1
ldr r0, [r5], #4
@@ -149,7 +159,7 @@ function ff_h264_idct_add8_neon, export=1
add r1, r2, #16*32
mov r2, r3
ldr r6, [sp, #32]
- movrel r7, scan8+16
+ adr r7, scan8+16
mov ip, #7
1: ldrb r8, [r7], #1
ldr r0, [r5], #4
@@ -353,7 +363,7 @@ function ff_h264_idct8_add4_neon, export=1
mov r1, r2
mov r2, r3
ldr r6, [sp, #24]
- movrel r7, scan8
+ adr r7, scan8
mov r12, #16
1: ldrb r8, [r7], #4
ldr r0, [r5], #16
@@ -372,13 +382,3 @@ function ff_h264_idct8_add4_neon, export=1
bne 1b
pop {r4-r8,pc}
endfunc
-
- .section .rodata
-scan8: .byte 4+1*8, 5+1*8, 4+2*8, 5+2*8
- .byte 6+1*8, 7+1*8, 6+2*8, 7+2*8
- .byte 4+3*8, 5+3*8, 4+4*8, 5+4*8
- .byte 6+3*8, 7+3*8, 6+4*8, 7+4*8
- .byte 1+1*8, 2+1*8
- .byte 1+2*8, 2+2*8
- .byte 1+4*8, 2+4*8
- .byte 1+5*8, 2+5*8
View
5 lib/ffmpeg/libavcodec/arm/h264pred_neon.S
@@ -123,7 +123,7 @@ function ff_pred16x16_plane_neon, export=1
vaddl.u8 q8, d2, d3
vsubl.u8 q2, d2, d0
vsubl.u8 q3, d3, d1
- movrel r3, p16weight
+ adr r3, p16weight
vld1.8 {q0}, [r3,:128]
vmul.s16 q2, q2, q0
vmul.s16 q3, q3, q0
@@ -166,7 +166,6 @@ function ff_pred16x16_plane_neon, export=1
bx lr
endfunc
- .section .rodata
.align 4
p16weight:
.short 1,2,3,4,5,6,7,8
@@ -207,7 +206,7 @@ function ff_pred8x8_plane_neon, export=1
vrev32.8 d0, d0
vtrn.32 d2, d3
vsubl.u8 q2, d2, d0
- movrel r3, p16weight
+ adr r3, p16weight
vld1.16 {q0}, [r3,:128]
vmul.s16 d4, d4, d0
vmul.s16 d5, d5, d0
View
3 lib/ffmpeg/libavcodec/arm/simple_idct_neon.S
@@ -239,7 +239,6 @@ function idct_col4_st8_neon
bx lr
endfunc
- .section .rodata
.align 4
idct_coeff_neon:
.short W1, W2, W3, W4, W5, W6, W7, W4c
@@ -249,7 +248,7 @@ idct_coeff_neon:
pld [\data]
pld [\data, #64]
vpush {d8-d15}
- movrel r3, idct_coeff_neon
+ adr r3, idct_coeff_neon
vld1.64 {d0,d1}, [r3,:128]
.endm
View
13 lib/ffmpeg/libavcodec/arm/vp3dsp_neon.S
@@ -20,12 +20,9 @@
#include "asm.S"
-.section .rodata
+.text
.align 4
-vp3_idct_constants:
-.short 64277, 60547, 54491, 46341, 36410, 25080, 12785
-
#define xC1S7 d0[0]
#define xC2S6 d0[1]
#define xC3S5 d0[2]
@@ -34,8 +31,6 @@ vp3_idct_constants:
#define xC6S2 d1[1]
#define xC7S1 d1[2]
-.text
-
.macro vp3_loop_filter
vsubl.u8 q3, d18, d17
vsubl.u8 q2, d16, d19
@@ -109,10 +104,14 @@ function ff_vp3_h_loop_filter_neon, export=1
bx lr
endfunc
+.align 4
+vp3_idct_constants:
+.short 64277, 60547, 54491, 46341, 36410, 25080, 12785
+.align 4
function vp3_idct_start_neon
vpush {d8-d15}
- movrel r3, vp3_idct_constants
+ adr r3, vp3_idct_constants
vld1.64 {d0-d1}, [r3,:128]
vld1.64 {d16-d19}, [r2,:128]!
vld1.64 {d20-d23}, [r2,:128]!
View
307 lib/ffmpeg/patches/0057-Fixes-neon-usage-under-iOS5.patch
@@ -0,0 +1,307 @@
+diff --git a/lib/ffmpeg/libavcodec/arm/fft_neon.S b/lib/ffmpeg/libavcodec/arm/fft_neon.S
+index 1db7abd..6390065 100644
+--- a/lib/ffmpeg/libavcodec/arm/fft_neon.S
++++ b/lib/ffmpeg/libavcodec/arm/fft_neon.S
+@@ -101,8 +101,12 @@ function fft8_neon
+ bx lr
+ endfunc
+
++ .align 4
++pmmp: .float +1.0, -1.0, -1.0, +1.0
++mppm: .float -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2
++
+ function fft16_neon
+- movrel r1, mppm
++ adr r1, mppm
+ vld1.32 {d16-d19}, [r0,:128]! @ q8{r0,i0,r1,i1} q9{r2,i2,r3,i3}
+ pld [r0, #32]
+ vld1.32 {d2-d3}, [r1,:128]
+@@ -144,12 +148,16 @@ function fft16_neon
+ vswp d29, d30 @ q14{r12,i12,i14,r15} q15{r13,i13,i15,r14}
+ vadd.f32 q0, q12, q13 @ {t1,t2,t5,t6}
+ vadd.f32 q1, q14, q15 @ {t1a,t2a,t5a,t6a}
+- movrel r2, X(ff_cos_16)
++ ldr r2, _neon_label
++ ldr r3, L$diff1
++ add r2, r3
++local_label1:
++ ldr r2, [pc, r2]
+ vsub.f32 q13, q12, q13 @ {t3,t4,t7,t8}
+ vrev64.32 d1, d1
+ vsub.f32 q15, q14, q15 @ {t3a,t4a,t7a,t8a}
+ vrev64.32 d3, d3
+- movrel r3, pmmp
++ adr r3, pmmp
+ vswp d1, d26 @ q0{t1,t2,t3,t4} q13{t6,t5,t7,t8}
+ vswp d3, d30 @ q1{t1a,t2a,t3a,t4a} q15{t6a,t5a,t7a,t8a}
+ vadd.f32 q12, q0, q13 @ {r8,i8,r9,i9}
+@@ -214,7 +222,7 @@ function fft_pass_neon
+ add r2, r2, r0 @ &z[o2]
+ add r3, r3, r0 @ &z[o3]
+ vld1.32 {d20-d21},[r2,:128] @ {z[o2],z[o2+1]}
+- movrel r12, pmmp
++ adr r12, pmmp
+ vld1.32 {d22-d23},[r3,:128] @ {z[o3],z[o3+1]}
+ add r5, r5, r1 @ wim
+ vld1.32 {d6-d7}, [r12,:128] @ pmmp
+@@ -279,6 +287,11 @@ function fft_pass_neon
+ pop {r4-r6,pc}
+ endfunc
+
++.set L$offs16, 0
++.macro setTabOffs n, n2
++.set L$offs\n, L$offs\n2 + 4
++.endm
++
+ .macro def_fft n, n2, n4
+ .align 6
+ function fft\n\()_neon
+@@ -291,10 +304,15 @@ function fft\n\()_neon
+ bl fft\n4\()_neon
+ mov r0, r4
+ pop {r4, lr}
+- movrel r1, X(ff_cos_\n)
++ ldr r1, _neon_label
++ add r1, #L$diff\n
++local_label\n:
++ ldr r1, [pc, r1]
+ mov r2, #\n4/2
+ b fft_pass_neon
+ endfunc
++setTabOffs \n, \n2
++.set L$diff\n, _neon_label - local_label\n + L$offs\n - 8
+ .endm
+
+ def_fft 32, 16, 8
+@@ -310,10 +328,14 @@ endfunc
+ def_fft 32768, 16384, 8192
+ def_fft 65536, 32768, 16384
+
++.set L$diffTab, fft_tab_neon_offs - local_label_tab - 8
+ function ff_fft_calc_neon, export=1
+ ldr r2, [r0]
+ sub r2, r2, #2
+- movrel r3, fft_tab_neon
++ ldr r3, fft_tab_neon_offs
++ add r3, #L$diffTab
++local_label_tab:
++ add r3, pc
+ ldr r3, [r3, r2, lsl #2]
+ mov r0, r1
+ bx r3
+@@ -349,9 +371,22 @@ function ff_fft_permute_neon, export=1
+ pop {r4,pc}
+ endfunc
+
+- .section .rodata
++
++.global _neon_label
++_neon_label:
++.word _neon_cos_tab - .
++
++L$diff1:
++.word _neon_label - local_label1 - 8
++
++fft_tab_neon_offs:
++.word _fft_tab_neon - .
++
++
++.section .rodata
++
+ .align 4
+-fft_tab_neon:
++_fft_tab_neon:
+ .word fft4_neon
+ .word fft8_neon
+ .word fft16_neon
+@@ -367,8 +402,20 @@ fft_tab_neon:
+ .word fft16384_neon
+ .word fft32768_neon
+ .word fft65536_neon
+-ELF .size fft_tab_neon, . - fft_tab_neon
+-
+- .align 4
+-pmmp: .float +1.0, -1.0, -1.0, +1.0
+-mppm: .float -M_SQRT1_2, M_SQRT1_2, M_SQRT1_2, -M_SQRT1_2
++ELF .size _fft_tab_neon, . - _fft_tab_neon
++
++ .align 4
++_neon_cos_tab:
++ .word X(ff_cos_16)
++ .word X(ff_cos_32)
++ .word X(ff_cos_64)
++ .word X(ff_cos_128)
++ .word X(ff_cos_256)
++ .word X(ff_cos_512)
++ .word X(ff_cos_1024)
++ .word X(ff_cos_2048)
++ .word X(ff_cos_4096)
++ .word X(ff_cos_8192)
++ .word X(ff_cos_16384)
++ .word X(ff_cos_32768)
++ .word X(ff_cos_65536)
+diff --git a/lib/ffmpeg/libavcodec/arm/h264idct_neon.S b/lib/ffmpeg/libavcodec/arm/h264idct_neon.S
+index 6b6a669..8111975 100644
+--- a/lib/ffmpeg/libavcodec/arm/h264idct_neon.S
++++ b/lib/ffmpeg/libavcodec/arm/h264idct_neon.S
+@@ -97,7 +97,7 @@ function ff_h264_idct_add16_neon, export=1
+ mov r1, r2
+ mov r2, r3
+ ldr r6, [sp, #24]
+- movrel r7, scan8
++ adr r7, scan8
+ mov ip, #16
+ 1: ldrb r8, [r7], #1
+ ldr r0, [r5], #4
+@@ -117,6 +117,16 @@ function ff_h264_idct_add16_neon, export=1
+ pop {r4-r8,pc}
+ endfunc
+
++ .align
++scan8: .byte 4+1*8, 5+1*8, 4+2*8, 5+2*8
++ .byte 6+1*8, 7+1*8, 6+2*8, 7+2*8
++ .byte 4+3*8, 5+3*8, 4+4*8, 5+4*8
++ .byte 6+3*8, 7+3*8, 6+4*8, 7+4*8
++ .byte 1+1*8, 2+1*8
++ .byte 1+2*8, 2+2*8
++ .byte 1+4*8, 2+4*8
++ .byte 1+5*8, 2+5*8
++
+ function ff_h264_idct_add16intra_neon, export=1
+ push {r4-r8,lr}
+ mov r4, r0
+@@ -124,7 +134,7 @@ function ff_h264_idct_add16intra_neon, export=1
+ mov r1, r2
+ mov r2, r3
+ ldr r6, [sp, #24]
+- movrel r7, scan8
++ adr r7, scan8
+ mov ip, #16
+ 1: ldrb r8, [r7], #1
+ ldr r0, [r5], #4
+@@ -149,7 +159,7 @@ function ff_h264_idct_add8_neon, export=1
+ add r1, r2, #16*32
+ mov r2, r3
+ ldr r6, [sp, #32]
+- movrel r7, scan8+16
++ adr r7, scan8+16
+ mov ip, #7
+ 1: ldrb r8, [r7], #1
+ ldr r0, [r5], #4
+@@ -353,7 +363,7 @@ function ff_h264_idct8_add4_neon, export=1
+ mov r1, r2
+ mov r2, r3
+ ldr r6, [sp, #24]
+- movrel r7, scan8
++ adr r7, scan8
+ mov r12, #16
+ 1: ldrb r8, [r7], #4
+ ldr r0, [r5], #16
+@@ -372,13 +382,3 @@ function ff_h264_idct8_add4_neon, export=1
+ bne 1b
+ pop {r4-r8,pc}
+ endfunc
+-
+- .section .rodata
+-scan8: .byte 4+1*8, 5+1*8, 4+2*8, 5+2*8
+- .byte 6+1*8, 7+1*8, 6+2*8, 7+2*8
+- .byte 4+3*8, 5+3*8, 4+4*8, 5+4*8
+- .byte 6+3*8, 7+3*8, 6+4*8, 7+4*8
+- .byte 1+1*8, 2+1*8
+- .byte 1+2*8, 2+2*8
+- .byte 1+4*8, 2+4*8
+- .byte 1+5*8, 2+5*8
+diff --git a/lib/ffmpeg/libavcodec/arm/h264pred_neon.S b/lib/ffmpeg/libavcodec/arm/h264pred_neon.S
+index 63c96ee..357c10a 100644
+--- a/lib/ffmpeg/libavcodec/arm/h264pred_neon.S
++++ b/lib/ffmpeg/libavcodec/arm/h264pred_neon.S
+@@ -123,7 +123,7 @@ function ff_pred16x16_plane_neon, export=1
+ vaddl.u8 q8, d2, d3
+ vsubl.u8 q2, d2, d0
+ vsubl.u8 q3, d3, d1
+- movrel r3, p16weight
++ adr r3, p16weight
+ vld1.8 {q0}, [r3,:128]
+ vmul.s16 q2, q2, q0
+ vmul.s16 q3, q3, q0
+@@ -166,7 +166,6 @@ function ff_pred16x16_plane_neon, export=1
+ bx lr
+ endfunc
+
+- .section .rodata
+ .align 4
+ p16weight:
+ .short 1,2,3,4,5,6,7,8
+@@ -207,7 +206,7 @@ function ff_pred8x8_plane_neon, export=1
+ vrev32.8 d0, d0
+ vtrn.32 d2, d3
+ vsubl.u8 q2, d2, d0
+- movrel r3, p16weight
++ adr r3, p16weight
+ vld1.16 {q0}, [r3,:128]
+ vmul.s16 d4, d4, d0
+ vmul.s16 d5, d5, d0
+diff --git a/lib/ffmpeg/libavcodec/arm/simple_idct_neon.S b/lib/ffmpeg/libavcodec/arm/simple_idct_neon.S
+index 17cde58..e61414e 100644
+--- a/lib/ffmpeg/libavcodec/arm/simple_idct_neon.S
++++ b/lib/ffmpeg/libavcodec/arm/simple_idct_neon.S
+@@ -239,7 +239,6 @@ function idct_col4_st8_neon
+ bx lr
+ endfunc
+
+- .section .rodata
+ .align 4
+ idct_coeff_neon:
+ .short W1, W2, W3, W4, W5, W6, W7, W4c
+@@ -249,7 +248,7 @@ idct_coeff_neon:
+ pld [\data]
+ pld [\data, #64]
+ vpush {d8-d15}
+- movrel r3, idct_coeff_neon
++ adr r3, idct_coeff_neon
+ vld1.64 {d0,d1}, [r3,:128]
+ .endm
+
+diff --git a/lib/ffmpeg/libavcodec/arm/vp3dsp_neon.S b/lib/ffmpeg/libavcodec/arm/vp3dsp_neon.S
+index d97ed3d..74bf7ba 100644
+--- a/lib/ffmpeg/libavcodec/arm/vp3dsp_neon.S
++++ b/lib/ffmpeg/libavcodec/arm/vp3dsp_neon.S
+@@ -20,12 +20,9 @@
+
+ #include "asm.S"
+
+-.section .rodata
++.text
+ .align 4
+
+-vp3_idct_constants:
+-.short 64277, 60547, 54491, 46341, 36410, 25080, 12785
+-
+ #define xC1S7 d0[0]
+ #define xC2S6 d0[1]
+ #define xC3S5 d0[2]
+@@ -34,8 +31,6 @@ vp3_idct_constants:
+ #define xC6S2 d1[1]
+ #define xC7S1 d1[2]
+
+-.text
+-
+ .macro vp3_loop_filter
+ vsubl.u8 q3, d18, d17
+ vsubl.u8 q2, d16, d19
+@@ -109,10 +104,14 @@ function ff_vp3_h_loop_filter_neon, export=1
+ bx lr
+ endfunc
+
++.align 4
++vp3_idct_constants:
++.short 64277, 60547, 54491, 46341, 36410, 25080, 12785
++.align 4
+
+ function vp3_idct_start_neon
+ vpush {d8-d15}
+- movrel r3, vp3_idct_constants
++ adr r3, vp3_idct_constants
+ vld1.64 {d0-d1}, [r3,:128]
+ vld1.64 {d16-d19}, [r2,:128]!
+ vld1.64 {d20-d23}, [r2,:128]!
View
2 lib/libexif/IptcParse.cpp
@@ -107,7 +107,7 @@ bool CIptcParse::Process (const unsigned char* const Data, const unsigned short
// Get length (Motorola format)
unsigned long length = CExifParse::Get32(pos);
- pos += sizeof(long); // move data pointer to the next field
+ pos += 4; // move data pointer to the next field
// Now read IPTC data
while (pos < (char*)(Data + itemlen-5))
View
43 system/Lircmap.xml
@@ -58,6 +58,49 @@
<yellow>Yellow</yellow>
<blue>Blue</blue>
<teletext>Teletext</teletext>
+
+ <!-- new kernel-based lirc button names -->
+ <left>KEY_LEFT</left>
+ <right>KEY_RIGHT</right>
+ <up>KEY_UP</up>
+ <down>KEY_DOWN</down>
+ <select>KEY_OK</select>
+ <start>KEY_HOME</start>
+ <back>KEY_BACK</back>
+ <record>KEY_RECORD</record>
+ <play>KEY_PLAY</play>
+ <pause>KEY_PAUSE</pause>
+ <stop>KEY_STOP</stop>
+ <forward>KEY_FORWARD</forward>
+ <reverse>KEY_REWIND</reverse>
+ <volumeplus>KEY_VOLUMEUP</volumeplus>
+ <volumeminus>KEY_VOLUMEDOWN</volumeminus>
+ <pageplus>KEY_CHANNELUP</pageplus>
+ <pageminus>KEY_CHANNELDOWN</pageminus>
+ <skipplus>KEY_NEXT</skipplus>
+ <skipminus>KEY_AGAIN</skipminus>
+ <mute>KEY_MUTE</mute>
+ <power>KEY_POWER</power>
+ <myvideo>KEY_VIDEO</myvideo>
+ <mymusic>KEY_AUDIO</mymusic>
+ <mytv>LiveTV</mytv>
+ <one>KEY_1</one>
+ <two>KEY_2</two>
+ <three>KEY_3</three>
+ <four>KEY_4</four>
+ <five>KEY_5</five>
+ <six>KEY_6</six>
+ <seven>KEY_7</seven>
+ <eight>KEY_8</eight>
+ <nine>KEY_9</nine>
+ <zero>KEY_0</zero>
+ <red>KEY_RED</red>
+ <green>KEY_GREEN</green>
+ <yellow>KEY_YELLOW</yellow>
+ <blue>KEY_BLUE</blue>
+ <menu>KEY_DVD</menu>
+ <clear>KEY_CLEAR</clear>
+ <enter>KEY_ENTER</enter>
</remote>
<remote device="XboxDVDDongle">
View
56 system/keymaps/keyboard.nyxboard.xml
@@ -1,18 +1,19 @@
+<?xml version="1.0"?>
<keymap>
<global>
- <appcommand name="Motorola Nyxboard Hybrid">
- <volume_mute>Mute</volume_mute>
- <volume_down>VolumeDown</volume_down>
+ <appcommand name="Motorola Nyxboard Hybrid">
+ <volume_mute>Mute</volume_mute>
+ <volume_down>VolumeDown</volume_down>
<volume_up>VolumeUp</volume_up>
- <next_track>SkipNext</next_track>
- <prev_track>SkipPrevious</prev_track>
- <stop>Stop</stop>
- <play_pause>Play</play_pause>
- <play>Play</play>
- <pause>Pause</pause>
- <fastforward>FastForward</fastforward>
- <rewind>Rewind</rewind>
- </appcommand>
+ <next_track>SkipNext</next_track>
+ <prev_track>SkipPrevious</prev_track>
+ <stop>Stop</stop>
+ <play_pause>Play</play_pause>
+ <play>Play</play>
+ <pause>Pause</pause>
+ <fastforward>FastForward</fastforward>
+ <rewind>Rewind</rewind>
+ </appcommand>
<mouse name="Motorola Nyxboard Hybrid">
<leftclick>leftclick</leftclick>
<middleclick>middleclick</middleclick>
@@ -23,7 +24,7 @@
<mousedrag>mousedrag</mousedrag>
<mousemove>mousemove</mousemove>
</mouse>
- <keyboard name="Motorola Nyxboard Hybrid">
+ <keyboard name="Motorola Nyxboard Hybrid">
<p>Play</p>
<q>Queue</q>
<f mod="ctrl,shift">FastForward</f>
@@ -39,12 +40,13 @@
<return>Select</return>
<enter>Select</enter>
<backspace>Back</backspace>
- <key id='65446'>Back</key>
+ <key id="65446">Back</key>
<m>ActivateWindow(PlayerControls)</m>
<s>ActivateWindow(shutdownmenu)</s>
<escape>PreviousMenu</escape>
<i>Info</i>
- <f9>Info</f9>
+ <d mod="ctrl">Info</d>
+ <f9>Info</f9>
<menu>ContextMenu</menu>
<c>ContextMenu</c>
<space>Pause</space>
@@ -87,7 +89,7 @@
<prev_track>SkipPrevious</prev_track>
<stop>Stop</stop>
<play_pause>Pause</play_pause>
- <!--
+ <!--
<f3>RED</f3>
<f4>GREEN</f4>
<f5>YELLOW</f5>
@@ -96,7 +98,7 @@
<f12>ActivateSearch</f12>
<f11>CloseSearch</f11>
-->
- <f10>ContextMenu</f10>
+ <f10>ContextMenu</f10>
</keyboard>
</global>
<LoginScreen>
@@ -107,7 +109,7 @@
<Home>
<keyboard name="Motorola Nyxboard Hybrid">
<i>info</i>
- <home>noop</home>
+ <home>noop</home>
<end>XBMC.ShutDown()</end>
</keyboard>
</Home>
@@ -217,7 +219,8 @@
<left>SkipPrevious</left>
<right>SkipNext</right>
<up>IncreaseRating</up>
- <down>DecreaseRating</down> <!--<back>NextPreset</back>!-->
+ <down>DecreaseRating</down>
+ <!--<back>NextPreset</back>!-->
<o>CodecInfo</o>
<l>LockPreset</l>
<escape>FullScreen</escape>
@@ -304,7 +307,8 @@
<VideoOSD>
<keyboard name="Motorola Nyxboard Hybrid">
<m>Back</m>
- <g mod="ctrl">Back</g> <!-- MCE Guide button -->
+ <g mod="ctrl">Back</g>
+ <!-- MCE Guide button -->
<i>Info</i>
<o>CodecInfo</o>
</keyboard>
@@ -322,7 +326,8 @@
<a>AudioDelay</a>
<escape>Fullscreen</escape>
<return>Select</return>
- <enter>Select</enter> <!-- backspace>Fullscreen</backspace -->
+ <enter>Select</enter>
+ <!-- backspace>Fullscreen</backspace -->
</keyboard>
</VideoMenu>
<OSDVideoSettings>
@@ -382,7 +387,7 @@
</Scripts>
<shutdownmenu>
<keyboard name="Motorola Nyxboard Hybrid">
- <s>Back</s>
+ <s>Back</s>
</keyboard>
</shutdownmenu>
<MusicInformation>
@@ -394,6 +399,7 @@
<MovieInformation>
<keyboard name="Motorola Nyxboard Hybrid">
<i>Back</i>
+ <d mod="ctrl">Back</d>
</keyboard>
</MovieInformation>
<PictureInfo>
@@ -406,6 +412,12 @@
<space>Pause</space>
</keyboard>
</PictureInfo>
+ <AddonInformation>
+ <keyboard>
+ <i>Back</i>
+ <d mod="ctrl">Back</d>
+ </keyboard>
+ </AddonInformation>
<Teletext>
<keyboard name="Motorola Nyxboard Hybrid">
<v>Back</v>
View
5 system/keymaps/keyboard.xml
@@ -523,4 +523,9 @@
<i>Back</i>
</keyboard>
</AddonInformation>
+ <AddonSettings>
+ <keyboard>
+ <delete>Delete</delete>
+ </keyboard>
+ </AddonSettings>
</keymap>
View
5 system/keymaps/remote.xml
@@ -538,4 +538,9 @@
<back>PreviousMenu</back>
</remote>
</MyTVSettings>
+ <AddonSettings>
+ <remote>
+ <clear>Delete</clear>
+ </remote>
+ </AddonSettings>
</keymap>
View
131 tools/EventClients/Clients/PS3 Sixaxis Controller/ps3d.py
@@ -22,33 +22,41 @@
import time
import struct
import threading
+import os
-sys.path.append("../PS3 BD Remote")
-
-try:
- # try loading modules from source directory
+if os.path.exists("../../lib/python"):
+ sys.path.append("../PS3 BD Remote")
sys.path.append("../../lib/python")
from bt.hid import HID
from bt.bt import bt_lookup_name
from xbmcclient import XBMCClient
from ps3 import sixaxis
- from ps3.keymaps import keymap_sixaxis
from ps3_remote import process_keys as process_remote
try:
+ from ps3 import sixwatch
+ except Exception, e:
+ print "Failed to import sixwatch now disabled: " + str(e)
+ sixwatch = None
+
+ try:
import zeroconf
except:
zeroconf = None
ICON_PATH = "../../icons/"
-except:
+else:
# fallback to system wide modules
from xbmc.bt.hid import HID
from xbmc.bt.bt import bt_lookup_name
from xbmc.xbmcclient import XBMCClient
from xbmc.ps3 import sixaxis
- from xbmc.ps3.keymaps import keymap_sixaxis
from xbmc.ps3_remote import process_keys as process_remote
from xbmc.defs import *
try:
+ from xbmc.ps3 import sixwatch
+ except Exception, e:
+ print "Failed to import sixwatch now disabled: " + str(e)
+ sixwatch = None
+ try:
import xbmc.zeroconf as zeroconf
except:
zeroconf = None
@@ -110,21 +118,6 @@ def timed_out(self):
else:
return False
-# to make sure all combination keys are checked first
-# we sort the keymap's button codes in reverse order
-# this guranties that any bit combined button code
-# will be processed first
-keymap_sixaxis_keys = keymap_sixaxis.keys()
-keymap_sixaxis_keys.sort()
-keymap_sixaxis_keys.reverse()
-
-def getkeys(bflags):
- keys = [];
- for k in keymap_sixaxis_keys:
- if (k & bflags) == k:
- keys.append(k)
- bflags = bflags & ~k
- return keys;
class PS3SixaxisThread ( StoppableThread ):
def __init__(self, csock, isock, ipaddr="127.0.0.1"):
@@ -135,86 +128,26 @@ def __init__(self, csock, isock, ipaddr="127.0.0.1"):
self.set_timeout(600)
def run(self):
- sixaxis.initialize(self.csock, self.isock)
+ six = sixaxis.sixaxis(self.xbmc, self.csock, self.isock)
self.xbmc.connect()
- bflags = 0
- released = set()
- pressed = set()
- pending = set()
- held = set()
- psflags = 0
- psdown = 0
- toggle_mouse = 0
self.reset_timeout()
try:
while not self.stop():
- if self.timed_out():
-
- for key in (held | pressed):
- (mapname, action, amount, axis) = keymap_sixaxis[key]
- self.xbmc.send_button_state(map=mapname, button=action, amount=0, down=0, axis=axis)
+ if self.timed_out():
raise Exception("PS3 Sixaxis powering off, timed out")
if self.idle_time() > 50:
self.xbmc.connect()
try:
- data = sixaxis.read_input(self.isock)
+ if six.process_socket(self.isock):
+ self.reset_timeout()
except Exception, e:
- print str(e)
+ print e
break
- if not data:
- continue
-
- (bflags, psflags, pressure, analog) = sixaxis.process_input(data, self.xbmc, toggle_mouse)
-
- if analog:
- self.reset_timeout()
-
- if psflags:
- self.reset_timeout()
- if psdown:
- if (time.time() - psdown) > 5:
-
- for key in (held | pressed):
- (mapname, action, amount, axis) = keymap_sixaxis[key]
- self.xbmc.send_button_state(map=mapname, button=action, amount=0, down=0, axis=axis)
-
- raise Exception("PS3 Sixaxis powering off, user request")
- else:
- psdown = time.time()
- else:
- if psdown:
- toggle_mouse = 1 - toggle_mouse
- psdown = 0
-
- keys = set(getkeys(bflags))
- released = (pressed | held) - keys
- held = (pressed | held) - released
- pressed = (keys - held) & pending
- pending = (keys - held)
-
- for key in released:
- (mapname, action, amount, axis) = keymap_sixaxis[key]
- self.xbmc.send_button_state(map=mapname, button=action, amount=0, down=0, axis=axis)
-
- for key in held:
- (mapname, action, amount, axis) = keymap_sixaxis[key]
- if amount > 0:
- amount = pressure[amount-1] * 256
- self.xbmc.send_button_state(map=mapname, button=action, amount=amount, down=1, axis=axis)
-
- for key in pressed:
- (mapname, action, amount, axis) = keymap_sixaxis[key]
- if amount > 0:
- amount = pressure[amount-1] * 256
- self.xbmc.send_button_state(map=mapname, button=action, amount=amount, down=1, axis=axis)
-
- if keys:
- self.reset_timeout()
-
except Exception, e:
printerr()
+ six.close()
self.close_sockets()
@@ -229,7 +162,6 @@ def __init__(self, csock, isock, ipaddr="127.0.0.1"):
self.current_xbmc = 0
def run(self):
- sixaxis.initialize(self.csock, self.isock)
self.xbmc.connect()
try:
# start the zeroconf thread if possible
@@ -314,6 +246,18 @@ def zeroconf_service_handler(self, event, service):
pass
return
+class SixWatch(threading.Thread):
+ def __init__(self, mac):
+ threading.Thread.__init__(self)
+ self.mac = mac
+ self.daemon = True
+ self.start()
+ def run(self):
+ try:
+ sixwatch.main(self.mac)
+ except Exception, e:
+ print "Exception caught in sixwatch, aborting: " + str(e)
+ pass
class ZeroconfThread ( threading.Thread ):
"""
@@ -373,6 +317,15 @@ def start_hidd(bdaddr=None, ipaddr="127.0.0.1"):
devices = [ 'PLAYSTATION(R)3 Controller',
'BD Remote Control' ]
hid = HID(bdaddr)
+ watch = None
+ if sixwatch:
+ try:
+ print "Starting USB sixwatch"
+ watch = SixWatch(hid.get_local_address())
+ except Exception, e:
+ print "Failed to initialize sixwatch" + str(e)
+ pass
+
while True:
if hid.listen():
(csock, addr) = hid.get_control_socket()
View
10 tools/EventClients/lib/python/bt/hid.py
@@ -16,6 +16,9 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from bluetooth import *
+import fcntl
+import bluetooth._bluetooth as _bt
+import array
class HID:
def __init__(self, bdaddress=None):
@@ -56,6 +59,13 @@ def listen(self):
self.connected = False
return False
+ def get_local_address(self):
+ hci = BluetoothSocket( HCI )
+ fd = hci.fileno()
+ buf = array.array('B', [0] * 96)
+ fcntl.ioctl(fd, _bt.HCIGETDEVINFO, buf, 1)
+ data = struct.unpack_from("H8s6B", buf.tostring())
+ return data[2:8][::-1]
def get_control_socket(self):
if self.connected:
View
54 tools/EventClients/lib/python/ps3/keymaps.py
@@ -79,57 +79,3 @@
"39": 'pause' ,#PAUSE
}
-
-SX_SQUARE = 32768
-SX_X = 16384
-SX_CIRCLE = 8192
-SX_TRIANGLE = 4096
-SX_R1 = 2048
-SX_R2 = 512
-SX_R3 = 4
-SX_L1 = 1024
-SX_L2 = 256
-SX_L3 = 2
-SX_DUP = 16
-SX_DDOWN = 64
-SX_DLEFT = 128
-SX_DRIGHT = 32
-SX_SELECT = 1
-SX_START = 8
-
-SX_LSTICK_X = 0
-SX_LSTICK_Y = 1
-SX_RSTICK_X = 2
-SX_RSTICK_Y = 3
-
-# (map, key, amount index, axis)
-keymap_sixaxis = {
- SX_X : ('XG', 'A', 0, 0),
- SX_CIRCLE : ('XG', 'B', 0, 0),
- SX_SQUARE : ('XG', 'X', 0, 0),
- SX_TRIANGLE : ('XG', 'Y', 0, 0),
-
- SX_DUP : ('XG', 'dpadup', 0, 0),
- SX_DDOWN : ('XG', 'dpaddown', 0, 0),
- SX_DLEFT : ('XG', 'dpadleft', 0, 0),
- SX_DRIGHT : ('XG', 'dpadright', 0, 0),
-
- SX_START : ('XG', 'start', 0, 0),
- SX_SELECT : ('XG', 'back', 0, 0),
-
- SX_R1 : ('XG', 'white', 0, 0),
- SX_R2 : ('XG', 'rightanalogtrigger', 6, 1),
- SX_L2 : ('XG', 'leftanalogtrigger', 5, 1),
- SX_L1 : ('XG', 'black', 0, 0),
-
- SX_L3 : ('XG', 'leftthumbbutton', 0, 0),
- SX_R3 : ('XG', 'rightthumbbutton', 0, 0),
-}
-
-# (data index, left map, left action, right map, right action)
-axismap_sixaxis = {
- SX_LSTICK_X : ('XG', 'leftthumbstickleft' , 'leftthumbstickright'),
- SX_LSTICK_Y : ('XG', 'leftthumbstickup' , 'leftthumbstickdown'),
- SX_RSTICK_X : ('XG', 'rightthumbstickleft', 'rightthumbstickright'),
- SX_RSTICK_Y : ('XG', 'rightthumbstickup' , 'rightthumbstickdown'),
-}
View
232 tools/EventClients/lib/python/ps3/sixaxis.py
@@ -23,16 +23,78 @@
import math
import binascii
from bluetooth import set_l2cap_mtu
-from keymaps import keymap_sixaxis
-from keymaps import axismap_sixaxis
-xval = 0
-yval = 0
-num_samples = 16
-sumx = [0] * num_samples
-sumy = [0] * num_samples
-sumr = [0] * num_samples
-axis_amount = [0, 0, 0, 0]
+SX_SELECT = 1 << 0
+SX_L3 = 1 << 1
+SX_R3 = 1 << 2
+SX_START = 1 << 3
+SX_DUP = 1 << 4
+SX_DRIGHT = 1 << 5
+SX_DDOWN = 1 << 6
+SX_DLEFT = 1 << 7
+SX_L2 = 1 << 8
+SX_R2 = 1 << 9
+SX_L1 = 1 << 10
+SX_R1 = 1 << 11
+SX_TRIANGLE = 1 << 12
+SX_CIRCLE = 1 << 13
+SX_X = 1 << 14
+SX_SQUARE = 1 << 15
+SX_POWER = 1 << 16
+
+SX_LSTICK_X = 0
+SX_LSTICK_Y = 1
+SX_RSTICK_X = 2
+SX_RSTICK_Y = 3
+
+# (map, key, amount index, axis)
+keymap_sixaxis = {
+ SX_X : ('XG', 'A', 0, 0),
+ SX_CIRCLE : ('XG', 'B', 0, 0),
+ SX_SQUARE : ('XG', 'X', 0, 0),
+ SX_TRIANGLE : ('XG', 'Y', 0, 0),
+
+ SX_DUP : ('XG', 'dpadup', 0, 0),
+ SX_DDOWN : ('XG', 'dpaddown', 0, 0),
+ SX_DLEFT : ('XG', 'dpadleft', 0, 0),
+ SX_DRIGHT : ('XG', 'dpadright', 0, 0),
+
+ SX_START : ('XG', 'start', 0, 0),
+ SX_SELECT : ('XG', 'back', 0, 0),
+
+ SX_R1 : ('XG', 'white', 0, 0),
+ SX_R2 : ('XG', 'rightanalogtrigger', 6, 1),
+ SX_L2 : ('XG', 'leftanalogtrigger', 5, 1),
+ SX_L1 : ('XG', 'black', 0, 0),
+
+ SX_L3 : ('XG', 'leftthumbbutton', 0, 0),
+ SX_R3 : ('XG', 'rightthumbbutton', 0, 0),
+}
+
+# (data index, left map, left action, right map, right action)
+axismap_sixaxis = {
+ SX_LSTICK_X : ('XG', 'leftthumbstickleft' , 'leftthumbstickright'),
+ SX_LSTICK_Y : ('XG', 'leftthumbstickup' , 'leftthumbstickdown'),
+ SX_RSTICK_X : ('XG', 'rightthumbstickleft', 'rightthumbstickright'),
+ SX_RSTICK_Y : ('XG', 'rightthumbstickup' , 'rightthumbstickdown'),
+}
+
+# to make sure all combination keys are checked first
+# we sort the keymap's button codes in reverse order
+# this guranties that any bit combined button code
+# will be processed first
+keymap_sixaxis_keys = keymap_sixaxis.keys()
+keymap_sixaxis_keys.sort()
+keymap_sixaxis_keys.reverse()
+
+def getkeys(bflags):
+ keys = [];
+ for k in keymap_sixaxis_keys:
+ if (k & bflags) == k:
+ keys.append(k)
+ bflags = bflags & ~k
+ return keys;
+
def normalize(val):
upperlimit = 65281
@@ -80,16 +142,44 @@ def normalize_angle(val, valrange):
val = -1.0
return (val + 0.5) * 65535.0
-def initialize(control_sock, interrupt_sock):
+def average(array):
+ val = 0
+ for i in array:
+ val += i
+ return val / len(array)
+
+def smooth(arr, val):
+ cnt = len(arr)
+ arr.insert(0, val)
+ arr.pop(cnt)
+ return average(arr)
+
+class sixaxis():
+ def __init__(self, xbmc, control_sock, interrupt_sock):
+
+ self.xbmc = xbmc
+ self.num_samples = 16
+ self.sumx = [0] * self.num_samples
+ self.sumy = [0] * self.num_samples
+ self.sumr = [0] * self.num_samples
+ self.axis_amount = [0, 0, 0, 0]
+
+ self.released = set()
+ self.pressed = set()
+ self.pending = set()
+ self.held = set()
+ self.psflags = 0
+ self.psdown = 0
+ self.mouse_enabled = 0
+
+ set_l2cap_mtu(control_sock, 64)
+ set_l2cap_mtu(interrupt_sock, 64)
+ time.sleep(0.25) # If we ask to quickly here, it sometimes doesn't start
+
# sixaxis needs this to enable it
# 0x53 => HIDP_TRANS_SET_REPORT | HIDP_DATA_RTYPE_FEATURE
control_sock.send("\x53\xf4\x42\x03\x00\x00")
- time.sleep(0.25)
data = control_sock.recv(1)
-
- set_l2cap_mtu(control_sock, 64)
- set_l2cap_mtu(interrupt_sock, 64)
-
# This command will turn on the gyro and set the leds
# I wonder if turning on the gyro makes it draw more current??
# it's probably a flag somewhere in the following command
@@ -116,24 +206,34 @@ def initialize(control_sock, interrupt_sock):
bytes.extend([0x00, 0x00, 0x00, 0x00, 0x00])
control_sock.send(struct.pack("42B", *bytes))
- time.sleep(0.25)
data = control_sock.recv(1)
+ def __del__(self):
+ self.close()
- return data
+ def close(self):
+ for key in (self.held | self.pressed):
+ (mapname, action, amount, axis) = keymap_sixaxis[key]
+ self.xbmc.send_button_state(map=mapname, button=action, amount=0, down=0, axis=axis)
+ self.held = set()
+ self.pressed = set()
-def read_input(isock):
- return isock.recv(50)
+ def process_socket(self, isock):
+ data = isock.recv(50)
+ if data == None:
+ return False
+ return self.process_data(data)
-def process_input(data, xbmc=None, mouse_enabled=0):
+
+ def process_data(self, data):
if len(data) < 3:
- return (0, 0, 0, False)
+ return False
# make sure this is the correct report
if struct.unpack("BBB", data[0:3]) != (0xa1, 0x01, 0x00):
- return (0, 0, 0, False)
+ return False
if len(data) >= 48:
v1 = struct.unpack("h", data[42:44])
@@ -155,8 +255,7 @@ def process_input(data, xbmc=None, mouse_enabled=0):
rz = float(v4[0])
at = math.sqrt(ax*ax + ay*ay + az*az)
- bflags = struct.unpack("H", data[3:5])[0]
- psflags = struct.unpack("B", data[5:6])[0]
+ bflags = struct.unpack("<I", data[3:7])[0]
if len(data) > 27:
pressure = struct.unpack("BBBBBBBBBBBB", data[15:27])
else:
@@ -169,39 +268,72 @@ def process_input(data, xbmc=None, mouse_enabled=0):
xpos = normalize_angle(roll, math.radians(30))
ypos = normalize_angle(pitch, math.radians(30))
+
- # update our sliding window array
- sumx.insert(0, xpos)
- sumy.insert(0, ypos)
- sumx.pop(num_samples)
- sumy.pop(num_samples)
+ axis = struct.unpack("BBBB", data[7:11])
+ return self.process_input(bflags, pressure, axis, xpos, ypos)
- # reset average
- xval = 0
- yval = 0
+ def process_input(self, bflags, pressure, axis, xpos, ypos):
- # do a sliding window average to remove high frequency
- # noise in accelerometer sampling
-