Merge pull request #3650 from Karlson2k/fix_pcre_utf8
authorjmarshallnz <jcmarsha@gmail.com>
Tue, 10 Dec 2013 00:17:31 +0000 (16:17 -0800)
committerjmarshallnz <jcmarsha@gmail.com>
Tue, 10 Dec 2013 00:17:31 +0000 (16:17 -0800)
Fix PCRE UTF-8 error (mostly for scrapers)

194 files changed:
XBMC.xcodeproj/project.pbxproj
addons/skin.confluence/720p/DialogAddonSettings.xml
addons/skin.confluence/720p/DialogPVRChannelManager.xml
addons/skin.confluence/720p/DialogPVRGroupManager.xml
addons/skin.confluence/720p/DialogSelect.xml
addons/skin.confluence/720p/DialogSubtitles.xml
addons/skin.confluence/720p/FileBrowser.xml
addons/skin.confluence/720p/ViewsPVR.xml
addons/skin.confluence/720p/script-globalsearch-main.xml
language/English/strings.po
lib/ffmpeg/libavformat/hls.c
lib/ffmpeg/patches/0058-backport-fixed-not-keeping-custom-http-headers.patch [new file with mode: 0644]
project/BuildDependencies/scripts/0_package.list
project/VS2010Express/XBMC.vcxproj
project/VS2010Express/XBMC.vcxproj.filters
system/settings/settings.xml
tools/codegenerator/Helper.groovy
xbmc/Application.cpp
xbmc/GUIInfoManager.cpp
xbmc/GUIInfoManager.h
xbmc/addons/Skin.cpp
xbmc/addons/Skin.h
xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAE.cpp
xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
xbmc/cores/AudioEngine/Sinks/AESinkALSA.h
xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp
xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp
xbmc/cores/VideoRenderers/BaseRenderer.cpp
xbmc/cores/VideoRenderers/BaseRenderer.h
xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
xbmc/cores/VideoRenderers/LinuxRendererGLES.h
xbmc/cores/VideoRenderers/OverlayRendererGUI.cpp
xbmc/cores/VideoRenderers/OverlayRendererUtil.cpp
xbmc/cores/VideoRenderers/OverlayRendererUtil.h
xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp
xbmc/cores/VideoRenderers/WinRenderer.cpp
xbmc/cores/VideoRenderers/WinRenderer.h
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h
xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h
xbmc/cores/dvdplayer/DVDCodecs/Video/DXVAHD.cpp [new file with mode: 0644]
xbmc/cores/dvdplayer/DVDCodecs/Video/DXVAHD.h [new file with mode: 0644]
xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp
xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h
xbmc/cores/dvdplayer/DVDFileInfo.cpp
xbmc/cores/dvdplayer/DVDFileInfo.h
xbmc/cores/dvdplayer/DVDOverlayRenderer.cpp
xbmc/cores/omxplayer/PCMRemap.cpp
xbmc/cores/omxplayer/PCMRemap.h
xbmc/cores/paplayer/CodecFactory.cpp
xbmc/cores/paplayer/DVDPlayerCodec.cpp
xbmc/epg/EpgSearchFilter.cpp
xbmc/filesystem/File.h
xbmc/filesystem/NFSFile.cpp
xbmc/filesystem/NFSFile.h
xbmc/filesystem/SMBDirectory.cpp
xbmc/filesystem/SmbFile.cpp
xbmc/filesystem/SmbFile.h
xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeSeasons.cpp
xbmc/filesystem/test/Makefile
xbmc/filesystem/test/TestNfsFile.cpp [new file with mode: 0644]
xbmc/guilib/GUIControl.cpp
xbmc/guilib/GUIControl.h
xbmc/guilib/GUIDialog.cpp
xbmc/guilib/GUIIncludes.cpp
xbmc/guilib/GUIIncludes.h
xbmc/guilib/GUIInfoTypes.cpp
xbmc/guilib/GUIInfoTypes.h
xbmc/guilib/GUIListItemLayout.cpp
xbmc/guilib/GUIListItemLayout.h
xbmc/guilib/GUIRadioButtonControl.cpp
xbmc/guilib/GUIRadioButtonControl.h
xbmc/guilib/GUIStaticItem.cpp
xbmc/guilib/GUIStaticItem.h
xbmc/guilib/GUITextBox.cpp
xbmc/guilib/GUITextBox.h
xbmc/guilib/GUITextLayout.cpp
xbmc/guilib/GUITextLayout.h
xbmc/guilib/GUIToggleButtonControl.cpp
xbmc/guilib/GUIToggleButtonControl.h
xbmc/guilib/GUIWindow.cpp
xbmc/guilib/GUIWindow.h
xbmc/guilib/VisibleEffect.cpp
xbmc/guilib/VisibleEffect.h
xbmc/input/linux/Keymap.h
xbmc/input/linux/XKBCommonKeymap.cpp
xbmc/input/linux/XKBCommonKeymap.h
xbmc/interfaces/info/InfoBool.cpp [deleted file]
xbmc/interfaces/info/InfoBool.h
xbmc/interfaces/info/InfoExpression.cpp [new file with mode: 0644]
xbmc/interfaces/info/InfoExpression.h [new file with mode: 0644]
xbmc/interfaces/info/Makefile
xbmc/interfaces/info/SkinVariable.cpp
xbmc/interfaces/info/SkinVariable.h
xbmc/listproviders/DirectoryProvider.cpp
xbmc/listproviders/DirectoryProvider.h
xbmc/listproviders/IListProvider.cpp
xbmc/listproviders/IListProvider.h
xbmc/listproviders/StaticProvider.cpp
xbmc/listproviders/StaticProvider.h
xbmc/music/tags/TagLoaderTagLib.cpp
xbmc/peripherals/devices/PeripheralCecAdapter.cpp
xbmc/peripherals/devices/PeripheralHID.cpp
xbmc/peripherals/devices/PeripheralHID.h
xbmc/settings/Settings.cpp
xbmc/storage/linux/UDevProvider.cpp
xbmc/utils/Archive.cpp
xbmc/utils/CharsetConverter.cpp
xbmc/utils/CharsetConverter.h
xbmc/utils/StringUtils.cpp
xbmc/utils/StringUtils.h
xbmc/utils/test/TestCPUInfo.cpp
xbmc/utils/test/TestCharsetConverter.cpp
xbmc/video/dialogs/GUIDialogSubtitles.cpp
xbmc/video/dialogs/GUIDialogSubtitles.h
xbmc/video/windows/GUIWindowFullScreen.cpp
xbmc/video/windows/GUIWindowVideoNav.cpp
xbmc/view/GUIViewControl.cpp
xbmc/windowing/DllWaylandClient.h
xbmc/windowing/DllWaylandEgl.h
xbmc/windowing/DllXKBCommon.h
xbmc/windowing/WaylandProtocol.h
xbmc/windowing/WinEventsWayland.cpp
xbmc/windowing/WinEventsWayland.h
xbmc/windowing/egl/EGLNativeTypeWayland.cpp
xbmc/windowing/egl/EGLNativeTypeWayland.h
xbmc/windowing/egl/wayland/Callback.cpp
xbmc/windowing/egl/wayland/Callback.h
xbmc/windowing/egl/wayland/Compositor.cpp
xbmc/windowing/egl/wayland/Compositor.h
xbmc/windowing/egl/wayland/Display.cpp
xbmc/windowing/egl/wayland/Display.h
xbmc/windowing/egl/wayland/OpenGLSurface.cpp
xbmc/windowing/egl/wayland/OpenGLSurface.h
xbmc/windowing/egl/wayland/Output.cpp
xbmc/windowing/egl/wayland/Output.h
xbmc/windowing/egl/wayland/Region.cpp
xbmc/windowing/egl/wayland/Region.h
xbmc/windowing/egl/wayland/Registry.cpp
xbmc/windowing/egl/wayland/Registry.h
xbmc/windowing/egl/wayland/Shell.cpp
xbmc/windowing/egl/wayland/Shell.h
xbmc/windowing/egl/wayland/ShellSurface.cpp
xbmc/windowing/egl/wayland/ShellSurface.h
xbmc/windowing/egl/wayland/Surface.cpp
xbmc/windowing/egl/wayland/Surface.h
xbmc/windowing/egl/wayland/WaylandLibraries.cpp
xbmc/windowing/egl/wayland/WaylandLibraries.h
xbmc/windowing/egl/wayland/XBMCConnection.cpp
xbmc/windowing/egl/wayland/XBMCConnection.h
xbmc/windowing/egl/wayland/XBMCSurface.cpp
xbmc/windowing/egl/wayland/XBMCSurface.h
xbmc/windowing/tests/wayland/StubCursorManager.cpp
xbmc/windowing/tests/wayland/StubCursorManager.h
xbmc/windowing/tests/wayland/StubEventListener.cpp
xbmc/windowing/tests/wayland/StubEventListener.h
xbmc/windowing/tests/wayland/TestEGLNativeTypeWayland.cpp
xbmc/windowing/tests/wayland/TestWaylandInputUnit.cpp
xbmc/windowing/tests/wayland/TestXBMCWaylandInputAcceptance.cpp
xbmc/windowing/tests/wayland/TmpEnv.cpp
xbmc/windowing/tests/wayland/TmpEnv.h
xbmc/windowing/tests/wayland/WestonProcess.cpp
xbmc/windowing/tests/wayland/WestonProcess.h
xbmc/windowing/tests/wayland/WestonTest.cpp
xbmc/windowing/tests/wayland/WestonTest.h
xbmc/windowing/tests/wayland/XBMCWayland.cpp
xbmc/windowing/tests/wayland/XBMCWayland.h
xbmc/windowing/tests/wayland/XBMCWaylandTestExtension.cpp
xbmc/windowing/wayland/CursorManager.h
xbmc/windowing/wayland/EventListener.h
xbmc/windowing/wayland/EventLoop.cpp
xbmc/windowing/wayland/EventLoop.h
xbmc/windowing/wayland/EventQueueStrategy.h
xbmc/windowing/wayland/InputFactory.cpp
xbmc/windowing/wayland/InputFactory.h
xbmc/windowing/wayland/Keyboard.cpp
xbmc/windowing/wayland/Keyboard.h
xbmc/windowing/wayland/KeyboardProcessor.cpp
xbmc/windowing/wayland/KeyboardProcessor.h
xbmc/windowing/wayland/Pointer.cpp
xbmc/windowing/wayland/Pointer.h
xbmc/windowing/wayland/PointerProcessor.cpp
xbmc/windowing/wayland/PointerProcessor.h
xbmc/windowing/wayland/PollThread.cpp
xbmc/windowing/wayland/PollThread.h
xbmc/windowing/wayland/Seat.cpp
xbmc/windowing/wayland/Seat.h
xbmc/windowing/wayland/TimeoutManager.h
xbmc/windowing/wayland/Wayland11EventQueueStrategy.cpp
xbmc/windowing/wayland/Wayland11EventQueueStrategy.h
xbmc/windowing/wayland/Wayland12EventQueueStrategy.cpp
xbmc/windowing/wayland/Wayland12EventQueueStrategy.h

index 58581da..1c56587 100644 (file)
                7C1409A4183224B8009F9411 /* SettingUpdate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C140987183224B8009F9411 /* SettingUpdate.cpp */; };
                7C1409A5183224B8009F9411 /* SettingUpdate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C140987183224B8009F9411 /* SettingUpdate.cpp */; };
                7C1409A6183224B8009F9411 /* SettingUpdate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C140987183224B8009F9411 /* SettingUpdate.cpp */; };
+               7C1409A9184015C9009F9411 /* InfoExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1409A7184015C6009F9411 /* InfoExpression.cpp */; };
+               7C1409AA184015C9009F9411 /* InfoExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1409A7184015C6009F9411 /* InfoExpression.cpp */; };
+               7C1409AB184015C9009F9411 /* InfoExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1409A7184015C6009F9411 /* InfoExpression.cpp */; };
                7C1A492315A962EE004AF4A4 /* SeekHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1A492115A962EE004AF4A4 /* SeekHandler.cpp */; };
                7C1A85661520522500C63311 /* TextureCacheJob.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1A85631520522500C63311 /* TextureCacheJob.cpp */; };
                7C1D682915A7D2FD00658B65 /* DatabaseManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1D682715A7D2FD00658B65 /* DatabaseManager.cpp */; };
                7C84A59E12FA3C1600CD1714 /* SourcesDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C84A59C12FA3C1600CD1714 /* SourcesDirectory.cpp */; };
                7C87B2CE162CE39600EF897D /* PlayerController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C87B2CC162CE39600EF897D /* PlayerController.cpp */; };
                7C89619213B6A16F003631FE /* GUIWindowScreensaverDim.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C89619013B6A16F003631FE /* GUIWindowScreensaverDim.cpp */; };
-               7C89674613C03B22003631FE /* InfoBool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C89674313C03B22003631FE /* InfoBool.cpp */; };
                7C8A14571154CB2600E5FCFA /* TextureCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C8A14541154CB2600E5FCFA /* TextureCache.cpp */; };
                7C8A187D115B2A8200E5FCFA /* TextureDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C8A187A115B2A8200E5FCFA /* TextureDatabase.cpp */; };
                7C8FC6EE1829A4580045153D /* DirectoryProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C8FC6EC1829A4580045153D /* DirectoryProvider.cpp */; };
                DFF0F2C817528350002DA3A4 /* XBTFReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18B7C7A81294222E009E7A26 /* XBTFReader.cpp */; };
                DFF0F2C917528350002DA3A4 /* GenericTouchActionHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4991334174E5E5C00741B6D /* GenericTouchActionHandler.cpp */; };
                DFF0F2CA17528350002DA3A4 /* ITouchInputHandling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4991342174E5E5C00741B6D /* ITouchInputHandling.cpp */; };
-               DFF0F2CB17528350002DA3A4 /* InfoBool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C89674313C03B22003631FE /* InfoBool.cpp */; };
                DFF0F2CC17528350002DA3A4 /* SkinVariable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF98D98A1434F47D00A6EBE1 /* SkinVariable.cpp */; };
                DFF0F2CD17528350002DA3A4 /* AddonsOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DFB0F470161B747500D744F4 /* AddonsOperations.cpp */; };
                DFF0F2CE17528350002DA3A4 /* ApplicationOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18968DC614155D7C005BA742 /* ApplicationOperations.cpp */; };
                E4991331174E5DAD00741B6D /* XBTFReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18B7C7A81294222E009E7A26 /* XBTFReader.cpp */; };
                E4991345174E5E5C00741B6D /* GenericTouchActionHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4991334174E5E5C00741B6D /* GenericTouchActionHandler.cpp */; };
                E499134B174E5E5C00741B6D /* ITouchInputHandling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4991342174E5E5C00741B6D /* ITouchInputHandling.cpp */; };
-               E499134C174E5EB700741B6D /* InfoBool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C89674313C03B22003631FE /* InfoBool.cpp */; };
                E499134D174E5EB700741B6D /* SkinVariable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF98D98A1434F47D00A6EBE1 /* SkinVariable.cpp */; };
                E499134E174E5EBE00741B6D /* AddonsOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DFB0F470161B747500D744F4 /* AddonsOperations.cpp */; };
                E499134F174E5EBE00741B6D /* ApplicationOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18968DC614155D7C005BA742 /* ApplicationOperations.cpp */; };
                7C140986183224B8009F9411 /* SettingsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SettingsManager.h; path = lib/SettingsManager.h; sourceTree = "<group>"; };
                7C140987183224B8009F9411 /* SettingUpdate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SettingUpdate.cpp; path = lib/SettingUpdate.cpp; sourceTree = "<group>"; };
                7C140988183224B8009F9411 /* SettingUpdate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SettingUpdate.h; path = lib/SettingUpdate.h; sourceTree = "<group>"; };
+               7C1409A7184015C6009F9411 /* InfoExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InfoExpression.cpp; sourceTree = "<group>"; };
+               7C1409A8184015C8009F9411 /* InfoExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InfoExpression.h; sourceTree = "<group>"; };
                7C1A492115A962EE004AF4A4 /* SeekHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SeekHandler.cpp; sourceTree = "<group>"; };
                7C1A492215A962EE004AF4A4 /* SeekHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SeekHandler.h; sourceTree = "<group>"; };
                7C1A495B15A96918004AF4A4 /* SaveFileStateJob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaveFileStateJob.h; sourceTree = "<group>"; };
                7C87B2CD162CE39600EF897D /* PlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlayerController.h; sourceTree = "<group>"; };
                7C89619013B6A16F003631FE /* GUIWindowScreensaverDim.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIWindowScreensaverDim.cpp; sourceTree = "<group>"; };
                7C89619113B6A16F003631FE /* GUIWindowScreensaverDim.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIWindowScreensaverDim.h; sourceTree = "<group>"; };
-               7C89674313C03B22003631FE /* InfoBool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InfoBool.cpp; sourceTree = "<group>"; };
                7C89674413C03B22003631FE /* InfoBool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InfoBool.h; sourceTree = "<group>"; };
                7C8A14541154CB2600E5FCFA /* TextureCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextureCache.cpp; sourceTree = "<group>"; };
                7C8A14551154CB2600E5FCFA /* TextureCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextureCache.h; sourceTree = "<group>"; };
                7C89674213C03B21003631FE /* info */ = {
                        isa = PBXGroup;
                        children = (
-                               7C89674313C03B22003631FE /* InfoBool.cpp */,
                                7C89674413C03B22003631FE /* InfoBool.h */,
+                               7C1409A7184015C6009F9411 /* InfoExpression.cpp */,
+                               7C1409A8184015C8009F9411 /* InfoExpression.h */,
                                DF98D98A1434F47D00A6EBE1 /* SkinVariable.cpp */,
                                DF98D98B1434F47D00A6EBE1 /* SkinVariable.h */,
                        );
                                38F4E57013CCCB3B00664821 /* Implementation.cpp in Sources */,
                                3802709A13D5A653009493DD /* SystemClock.cpp in Sources */,
                                7CEE2E5B13D6B71E000ABF2A /* TimeSmoother.cpp in Sources */,
-                               7C89674613C03B22003631FE /* InfoBool.cpp in Sources */,
                                DFAB049813F8376700B70BFB /* InertialScrollingHandler.cpp in Sources */,
                                DF3488E713FD958F0026A711 /* GUIAction.cpp in Sources */,
                                DF34892A13FD9C780026A711 /* AirPlayServer.cpp in Sources */,
                                7C1409A1183224B8009F9411 /* SettingsManager.cpp in Sources */,
                                7C1409A4183224B8009F9411 /* SettingUpdate.cpp in Sources */,
                                DF0ABB73183A94A30018445D /* Utf8Utils.cpp in Sources */,
+                               7C1409A9184015C9009F9411 /* InfoExpression.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                DFF0F2C817528350002DA3A4 /* XBTFReader.cpp in Sources */,
                                DFF0F2C917528350002DA3A4 /* GenericTouchActionHandler.cpp in Sources */,
                                DFF0F2CA17528350002DA3A4 /* ITouchInputHandling.cpp in Sources */,
-                               DFF0F2CB17528350002DA3A4 /* InfoBool.cpp in Sources */,
                                DFF0F2CC17528350002DA3A4 /* SkinVariable.cpp in Sources */,
                                DFF0F2CD17528350002DA3A4 /* AddonsOperations.cpp in Sources */,
                                DFF0F2CE17528350002DA3A4 /* ApplicationOperations.cpp in Sources */,
                                7C1409A3183224B8009F9411 /* SettingsManager.cpp in Sources */,
                                7C1409A6183224B8009F9411 /* SettingUpdate.cpp in Sources */,
                                DF0ABB75183A94A30018445D /* Utf8Utils.cpp in Sources */,
+                               7C1409AB184015C9009F9411 /* InfoExpression.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                E4991331174E5DAD00741B6D /* XBTFReader.cpp in Sources */,
                                E4991345174E5E5C00741B6D /* GenericTouchActionHandler.cpp in Sources */,
                                E499134B174E5E5C00741B6D /* ITouchInputHandling.cpp in Sources */,
-                               E499134C174E5EB700741B6D /* InfoBool.cpp in Sources */,
                                E499134D174E5EB700741B6D /* SkinVariable.cpp in Sources */,
                                E499134E174E5EBE00741B6D /* AddonsOperations.cpp in Sources */,
                                E499134F174E5EBE00741B6D /* ApplicationOperations.cpp in Sources */,
                                7C1409A2183224B8009F9411 /* SettingsManager.cpp in Sources */,
                                7C1409A5183224B8009F9411 /* SettingUpdate.cpp in Sources */,
                                DF0ABB74183A94A30018445D /* Utf8Utils.cpp in Sources */,
+                               7C1409AA184015C9009F9411 /* InfoExpression.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index fb1c1c9..276dcb3 100644 (file)
                        <textureslidernib>ScrollBarNib.png</textureslidernib>
                        <textureslidernibfocus>ScrollBarNib.png</textureslidernibfocus>
                        <onleft>2</onleft>
-                       <onright>9</onright>
+                       <onright>2</onright>
                        <showonepage>false</showonepage>
                        <orientation>vertical</orientation>
                </control>
                                <onleft>12</onleft>
                                <onright>11</onright>
                                <onup>2</onup>
-                               <ondown>9</ondown>
+                               <ondown>2</ondown>
                        </control>
                        <control type="button" id="11">
                                <description>Cancel Button</description>
                                <onleft>10</onleft>
                                <onright>12</onright>
                                <onup>2</onup>
-                               <ondown>9</ondown>
+                               <ondown>2</ondown>
                        </control>
                        <control type="button" id="12">
                                <description>Defaults Button</description>
                                <onleft>11</onleft>
                                <onright>10</onright>
                                <onup>2</onup>
-                               <ondown>9</ondown>
+                               <ondown>2</ondown>
                        </control>
                </control>
 
index 446b552..c9b27c7 100644 (file)
@@ -4,8 +4,8 @@
        <allowoverlay>no</allowoverlay>
        <coordinates>
                <system>1</system>
-               <left>190</left>
-               <top>30</top>
+               <left>80</left>
+               <top>65</top>
        </coordinates>
        <include>dialogeffect</include>
 
                <control type="image">
                        <left>0</left>
                        <top>0</top>
-                       <width>900</width>
-                       <height>660</height>
+                       <width>1120</width>
+                       <height>570</height>
                        <texture border="40">DialogBack.png</texture>
                </control>
                <control type="image">
                        <description>Dialog Header image</description>
                        <left>40</left>
                        <top>16</top>
-                       <width>820</width>
+                       <width>1020</width>
                        <height>40</height>
                        <texture>dialogheader.png</texture>
                </control>
@@ -29,7 +29,7 @@
                        <description>header label</description>
                        <left>40</left>
                        <top>20</top>
-                       <width>820</width>
+                       <width>1020</width>
                        <height>30</height>
                        <font>font13_title</font>
                        <label>$LOCALIZE[19199] - $LOCALIZE[19023]</label>
@@ -43,7 +43,7 @@
                        <description>header label</description>
                        <left>40</left>
                        <top>20</top>
-                       <width>820</width>
+                       <width>1020</width>
                        <height>30</height>
                        <font>font13_title</font>
                        <label>$LOCALIZE[19199] - $LOCALIZE[19024]</label>
@@ -55,7 +55,7 @@
                </control>
                <control type="button">
                        <description>Close Window button</description>
-                       <left>810</left>
+                       <left>1030</left>
                        <top>15</top>
                        <width>64</width>
                        <height>32</height>
@@ -74,7 +74,7 @@
                        <left>20</left>
                        <top>70</top>
                        <control type="scrollbar" id="60">
-                               <left>0</left>
+                               <left>440</left>
                                <top>5</top>
                                <width>25</width>
                                <height>470</height>
                                <texturesliderbarfocus border="0,14,0,14">ScrollBarV_bar_focus.png</texturesliderbarfocus>
                                <textureslidernib>ScrollBarNib.png</textureslidernib>
                                <textureslidernibfocus>ScrollBarNib.png</textureslidernibfocus>
-                               <onleft>9002</onleft>
-                               <onright>20</onright>
+                               <onleft>20</onleft>
+                               <onright>9002</onright>
                                <showonepage>false</showonepage>
                                <orientation>vertical</orientation>
                        </control>
                        <control type="image">
-                               <left>25</left>
+                               <left>10</left>
                                <top>0</top>
                                <width>430</width>
                                <height>475</height>
                                <texture border="5">button-nofocus.png</texture>
                        </control>
                        <control type="list" id="20">
-                               <left>30</left>
+                               <left>15</left>
                                <top>5</top>
                                <width>420</width>
                                <height>470</height>
                                <onup>20</onup>
                                <ondown>20</ondown>
-                               <onleft>60</onleft>
-                               <onright>9002</onright>
+                               <onleft>9002</onleft>
+                               <onright>60</onright>
                                <pagecontrol>60</pagecontrol>
                                <scrolltime>200</scrolltime>
                                <itemlayout height="45" width="420">
                                        </control>
                                </focusedlayout>
                        </control>
-                       <control type="label">
-                               <description>Page Count Label</description>
-                               <left>30</left>
-                               <top>485</top>
-                               <width>420</width>
-                               <height>20</height>
-                               <font>font12</font>
-                               <textcolor>grey</textcolor>
-                               <scroll>false</scroll>
-                               <align>center</align>
-                               <aligny>center</aligny>
-                               <label>([COLOR=blue]$INFO[Container(20).NumItems][/COLOR]) $LOCALIZE[19019] - $LOCALIZE[31024] ([COLOR=blue]$INFO[Container(20).CurrentPage]/$INFO[Container(20).NumPages][/COLOR])</label>
-                       </control>
                </control>
                <control type="group" id="9002">
                        <control type="group">
                                        <pulseonselect>no</pulseonselect>
                                        <label>19074</label>
                                        <onleft>20</onleft>
-                                       <onright>60</onright>
-                                       <onup>9000</onup>
+                                       <onright>9000</onright>
+                                       <onup>33</onup>
                                        <ondown>8</ondown>
                                </control>
                                <control type="edit" id="8">
                                        <texturenofocus border="5">button-nofocus.png</texturenofocus>
                                        <label>19202</label>
                                        <onleft>20</onleft>
-                                       <onright>60</onright>
+                                       <onright>9000</onright>
                                        <onup>8</onup>
                                        <ondown>12</ondown>
                                </control>
                                        <pulseonselect>no</pulseonselect>
                                        <label>19206</label>
                                        <onleft>20</onleft>
-                                       <onright>60</onright>
+                                       <onright>9000</onright>
                                        <onup>9</onup>
                                        <ondown>13</ondown>
                                </control>
                                        <texturefocus border="5">button-focus2.png</texturefocus>
                                        <texturenofocus border="5">button-nofocus.png</texturenofocus>
                                        <label>19200</label>
-                                       <onright>60</onright>
+                                       <onright>9000</onright>
                                        <onleft>20</onleft>
                                        <onup>12</onup>
                                        <ondown>14</ondown>
                                        <pulseonselect>no</pulseonselect>
                                        <label>19267</label>
                                        <onleft>20</onleft>
-                                       <onright>60</onright>
+                                       <onright>9000</onright>
                                        <onup>13</onup>
                                        <ondown>30</ondown>
                                </control>
                                        <align>center</align>
                                        <label>19024</label>
                                        <onleft>30</onleft>
-                                       <onright>60</onright>
+                                       <onright>9000</onright>
                                        <onup>14</onup>
                                        <ondown>31</ondown>
                                </control>
                                        <align>center</align>
                                        <label>19023</label>
                                        <onleft>30</onleft>
-                                       <onright>60</onright>
+                                       <onright>9000</onright>
                                        <onup>14</onup>
                                        <ondown>31</ondown>
                                </control>
                                        <align>center</align>
                                        <label>19203</label>
                                        <onleft>20</onleft>
-                                       <onright>60</onright>
+                                       <onright>9000</onright>
                                        <onup>30</onup>
                                        <ondown>32</ondown>
                                </control>
                                        <align>center</align>
                                        <label>19211</label>
                                        <onleft>20</onleft>
-                                       <onright>60</onright>
+                                       <onright>9000</onright>
                                        <onup>31</onup>
                                        <ondown>33</ondown>
                                </control>
                                        <align>center</align>
                                        <label>19204</label>
                                        <onleft>20</onleft>
-                                       <onright>60</onright>
+                                       <onright>9000</onright>
                                        <onup>32</onup>
-                                       <ondown>9000</ondown>
+                                       <ondown>7</ondown>
                                </control>
                        </control>
                </control>
                <control type="group" id="9000">
-                       <left>70</left>
-                       <top>590</top>
+                       <left>890</left>
+                       <top>95</top>
                        <control type="button" id="4">
                                <description>OK Button</description>
                                <left>0</left>
                                <top>0</top>
-                               <width>250</width>
+                               <width>200</width>
                                <height>40</height>
                                <label>186</label>
                                <font>font12_title</font>
                                <align>center</align>
                                <aligny>center</aligny>
-                               <onleft>6</onleft>
-                               <onright>5</onright>
-                               <onup>33</onup>
-                               <ondown>7</ondown>
+                               <onleft>9002</onleft>
+                               <onright>20</onright>
+                               <onup>6</onup>
+                               <ondown>5</ondown>
                        </control>
                        <control type="button" id="5">
                                <description>Apply changes Button</description>
-                               <left>260</left>
-                               <top>0</top>
-                               <width>250</width>
+                               <left>0</left>
+                               <top>45</top>
+                               <width>200</width>
                                <height>40</height>
                                <label>14070</label>
                                <font>font12_title</font>
                                <align>center</align>
                                <aligny>center</aligny>
-                               <onleft>4</onleft>
-                               <onright>6</onright>
-                               <onup>33</onup>
-                               <ondown>7</ondown>
+                               <onleft>9002</onleft>
+                               <onright>20</onright>
+                               <onup>4</onup>
+                               <ondown>6</ondown>
                        </control>
                        <control type="button" id="6">
                                <description>Cancel Button</description>
-                               <left>520</left>
-                               <top>0</top>
-                               <width>250</width>
+                               <left>0</left>
+                               <top>90</top>
+                               <width>200</width>
                                <height>40</height>
                                <label>222</label>
                                <font>font12_title</font>
                                <align>center</align>
                                <aligny>center</aligny>
-                               <onleft>5</onleft>
-                               <onright>4</onright>
-                               <onup>33</onup>
-                               <ondown>7</ondown>
+                               <onleft>9002</onleft>
+                               <onright>20</onright>
+                               <onup>5</onup>
+                               <ondown>4</ondown>
+                       </control>
+                       <control type="group">
+                               <left>-5</left>
+                               <top>200</top>
+                               <control type="image">
+                                       <left>0</left>
+                                       <top>0</top>
+                                       <width>210</width>
+                                       <height>210</height>
+                                       <texture border="5">button-nofocus.png</texture>
+                               </control>
+                               <control type="image">
+                                       <left>5</left>
+                                       <top>5</top>
+                                       <width>200</width>
+                                       <height>200</height>
+                                       <aspectratio>keep</aspectratio>
+                                       <texture background="true">$INFO[Container(20).ListItem.Icon]</texture>
+                               </control> 
+                       </control>
+                       <control type="label">
+                               <description>Page Count Label</description>
+                               <left>-15</left>
+                               <top>418</top>
+                               <width>230</width>
+                               <height>35</height>
+                               <font>font12</font>
+                               <textcolor>grey</textcolor>
+                               <scroll>false</scroll>
+                               <align>center</align>
+                               <aligny>center</aligny>
+                               <label>([COLOR=blue]$INFO[Container(20).NumItems][/COLOR]) $LOCALIZE[19019] - $LOCALIZE[31024] ([COLOR=blue]$INFO[Container(20).CurrentPage]/$INFO[Container(20).NumPages][/COLOR])</label>
+                               <wrapmultiline>true</wrapmultiline>
                        </control>
                </control>
        </controls>
index 519edb9..fa7749f 100644 (file)
@@ -7,15 +7,32 @@
                        <animation effect="slide" start="1150,0" end="0,0" time="400" tween="quadratic" easing="out">WindowOpen</animation>
                        <animation effect="slide" start="0,0" end="1150,0" time="400" tween="quadratic" easing="out">WindowClose</animation>
                        <control type="image">
-                               <left>130</left>
+                               <left>50</left>
                                <top>0</top>
-                               <width>1150</width>
+                               <width>1230</width>
                                <height>720</height>
                                <texture border="15,0,0,0" flipx="true">MediaBladeSub.png</texture>
                        </control>
+                       <control type="image">
+                               <description>background image</description>
+                               <left>1060</left>
+                               <top>-10</top>
+                               <width>675</width>
+                               <height>740</height>
+                               <texture border="10">KeyboardEditArea.png</texture>
+                               <animation effect="fade" end="30" time="0" condition="true">conditional</animation>
+                       </control>
+                       <control type="image">
+                               <description>Dialog Header image</description>
+                               <left>90</left>
+                               <top>16</top>
+                               <width>930</width>
+                               <height>40</height>
+                               <texture>dialogheader.png</texture>
+                       </control>
                        <control type="button">
                                <description>Close Window button</description>
-                               <left>180</left>
+                               <left>70</left>
                                <top>0</top>
                                <width>64</width>
                                <height>32</height>
                                <animation effect="fade" start="100" end="0" time="200">WindowClose</animation>
                                <control type="label">
                                        <description>header label</description>
-                                       <left>160</left>
-                                       <top>40</top>
-                                       <width>1080</width>
-                                       <height>30</height>
+                                       <left>90</left>
+                                       <top>16</top>
+                                       <width>930</width>
+                                       <height>40</height>
                                        <font>font24_title</font>
                                        <label>19143</label>
                                        <align>center</align>
                                </control>
                                <control type="group">
                                        <description>Group list</description>
-                                       <left>160</left>
+                                       <left>70</left>
                                        <top>80</top>
                                        <control type="label">
                                                <description>name label</description>
                                                <left>0</left>
                                                <top>0</top>
-                                               <width>340</width>
+                                               <width>310</width>
                                                <height>70</height>
                                                <font>font13</font>
                                                <label>31506</label>
                                        <control type="image">
                                                <left>0</left>
                                                <top>75</top>
-                                               <width>340</width>
+                                               <width>310</width>
                                                <height>460</height>
                                                <texture border="5">button-nofocus.png</texture>
                                        </control>
                                        <control type="list" id="13">
                                                <left>5</left>
                                                <top>80</top>
-                                               <width>330</width>
+                                               <width>300</width>
                                                <height>450</height>
                                                <onup>13</onup>
                                                <ondown>13</ondown>
-                                               <onleft>29</onleft>
+                                               <onleft>9000</onleft>
                                                <onright>73</onright>
                                                <pagecontrol>73</pagecontrol>
                                                <scrolltime>200</scrolltime>
                                                        <control type="image">
                                                                <left>0</left>
                                                                <top>0</top>
-                                                               <width>330</width>
+                                                               <width>300</width>
                                                                <height>40</height>
                                                                <texture border="5">button-nofocus.png</texture>
                                                        </control>
                                                        <control type="label">
                                                                <left>10</left>
                                                                <top>0</top>
-                                                               <width>310</width>
+                                                               <width>280</width>
                                                                <height>40</height>
                                                                <font>font12</font>
                                                                <align>left</align>
                                                        <control type="image">
                                                                <left>0</left>
                                                                <top>0</top>
-                                                               <width>330</width>
+                                                               <width>300</width>
                                                                <height>40</height>
                                                                <texture border="5">button-nofocus.png</texture>
                                                                <visible>!Control.HasFocus(13)</visible>
                                                        <control type="image">
                                                                <left>0</left>
                                                                <top>0</top>
-                                                               <width>330</width>
+                                                               <width>300</width>
                                                                <height>40</height>
                                                                <texture border="5">button-focus2.png</texture>
                                                                <visible>Control.HasFocus(13)</visible>
                                                        <control type="label">
                                                                <left>10</left>
                                                                <top>0</top>
-                                                               <width>310</width>
+                                                               <width>280</width>
                                                                <height>40</height>
                                                                <font>font12</font>
                                                                <align>left</align>
                                                </focusedlayout>
                                        </control>
                                        <control type="scrollbar" id="73">
-                                               <left>340</left>
+                                               <left>305</left>
                                                <top>75</top>
                                                <width>25</width>
                                                <height>460</height>
                                </control>
                                <control type="group">
                                        <description>Channels list</description>
-                                       <left>525</left>
+                                       <left>400</left>
                                        <top>80</top>
                                        <control type="label" id="21">
                                                <description>name label</description>
                                                <left>0</left>
                                                <top>0</top>
-                                               <width>340</width>
+                                               <width>310</width>
                                                <height>70</height>
                                                <font>font13</font>
                                                <align>center</align>
                                        <control type="image">
                                                <left>0</left>
                                                <top>75</top>
-                                               <width>340</width>
+                                               <width>310</width>
                                                <height>460</height>
                                                <texture border="5">button-nofocus.png</texture>
                                        </control>
                                        <control type="list" id="11">
                                                <left>5</left>
                                                <top>85</top>
-                                               <width>330</width>
+                                               <width>300</width>
                                                <height>450</height>
                                                <onup>11</onup>
                                                <ondown>11</ondown>
                                                        <control type="image">
                                                                <left>0</left>
                                                                <top>0</top>
-                                                               <width>330</width>
+                                                               <width>300</width>
                                                                <height>40</height>
                                                                <texture border="5">button-nofocus.png</texture>
                                                        </control>
                                                        <control type="label">
                                                                <left>40</left>
                                                                <top>0</top>
-                                                               <width>280</width>
+                                                               <width>250</width>
                                                                <height>40</height>
                                                                <font>font12</font>
                                                                <align>left</align>
                                                        <control type="image">
                                                                <left>0</left>
                                                                <top>0</top>
-                                                               <width>330</width>
+                                                               <width>300</width>
                                                                <height>40</height>
                                                                <texture border="5">button-nofocus.png</texture>
                                                                <visible>!Control.HasFocus(11)</visible>
                                                        <control type="image">
                                                                <left>0</left>
                                                                <top>0</top>
-                                                               <width>330</width>
+                                                               <width>300</width>
                                                                <height>40</height>
                                                                <texture border="5">button-focus2.png</texture>
                                                                <visible>Control.HasFocus(11)</visible>
                                                        <control type="label">
                                                                <left>40</left>
                                                                <top>0</top>
-                                                               <width>280</width>
+                                                               <width>250</width>
                                                                <height>40</height>
                                                                <font>font12</font>
                                                                <align>left</align>
                                                </focusedlayout>
                                        </control>
                                        <control type="scrollbar" id="71">
-                                               <left>340</left>
+                                               <left>305</left>
                                                <top>75</top>
                                                <width>25</width>
                                                <height>460</height>
                                </control>
                                <control type="group">
                                        <description>Grouped Channels list</description>
-                                       <left>890</left>
+                                       <left>730</left>
                                        <top>80</top>
                                        <control type="label" id="22">
                                                <description>name label</description>
                                                <left>0</left>
                                                <top>0</top>
-                                               <width>340</width>
+                                               <width>310</width>
                                                <height>70</height>
                                                <font>font13</font>
                                                <align>center</align>
                                        <control type="image">
                                                <left>0</left>
                                                <top>75</top>
-                                               <width>340</width>
+                                               <width>310</width>
                                                <height>460</height>
                                                <texture border="5">button-nofocus.png</texture>
                                        </control>
                                        <control type="list" id="12">
                                                <left>5</left>
                                                <top>85</top>
-                                               <width>330</width>
+                                               <width>300</width>
                                                <height>450</height>
                                                <onup>12</onup>
                                                <ondown>12</ondown>
                                                        <control type="image">
                                                                <left>0</left>
                                                                <top>0</top>
-                                                               <width>330</width>
+                                                               <width>300</width>
                                                                <height>40</height>
                                                                <texture border="5">button-nofocus.png</texture>
                                                        </control>
                                                        <control type="label">
                                                                <left>40</left>
                                                                <top>0</top>
-                                                               <width>280</width>
+                                                               <width>250</width>
                                                                <height>40</height>
                                                                <font>font12</font>
                                                                <align>left</align>
                                                        <control type="image">
                                                                <left>0</left>
                                                                <top>0</top>
-                                                               <width>330</width>
+                                                               <width>300</width>
                                                                <height>40</height>
                                                                <texture border="5">button-nofocus.png</texture>
                                                                <visible>!Control.HasFocus(12)</visible>
                                                        <control type="image">
                                                                <left>0</left>
                                                                <top>0</top>
-                                                               <width>330</width>
+                                                               <width>300</width>
                                                                <height>40</height>
                                                                <texture border="5">button-focus2.png</texture>
                                                                <visible>Control.HasFocus(12)</visible>
                                                        <control type="label">
                                                                <left>40</left>
                                                                <top>0</top>
-                                                               <width>280</width>
+                                                               <width>250</width>
                                                                <height>40</height>
                                                                <font>font12</font>
                                                                <align>left</align>
                                                </focusedlayout>
                                        </control>
                                        <control type="scrollbar" id="72">
-                                               <left>340</left>
+                                               <left>305</left>
                                                <top>75</top>
                                                <width>25</width>
                                                <height>460</height>
                                                <textureslidernib>ScrollBarNib.png</textureslidernib>
                                                <textureslidernibfocus>ScrollBarNib.png</textureslidernibfocus>
                                                <onleft>12</onleft>
-                                               <onright>26</onright>
+                                               <onright>9000</onright>
                                                <ondown>72</ondown>
                                                <onup>72</onup>
                                                <showonepage>false</showonepage>
                                        </control>
                                </control>
                                <control type="grouplist" id="9000">
-                                       <left>160</left>
-                                       <top>660</top>
-                                       <width>1080</width>
-                                       <height>40</height>
-                                       <itemgap>2</itemgap>
+                                       <left>1070</left>
+                                       <top>165</top>
+                                       <width>200</width>
+                                       <height>175</height>
+                                       <itemgap>5</itemgap>
                                        <align>center</align>
-                                       <orientation>horizontal</orientation>
-                                       <onleft>72</onleft>
+                                       <orientation>vertical</orientation>
+                                       <onleft>12</onleft>
                                        <onright>13</onright>
                                        <onup>9000</onup>
                                        <ondown>9000</ondown>
                                        <control type="button" id="26">
                                                <description>Add Group</description>
-                                               <width>230</width>
+                                               <width>200</width>
                                                <include>ButtonInfoDialogsCommonValues</include>
                                                <label>31503</label>
                                        </control>
                                        <control type="button" id="27">
                                                <description>Rename Group</description>
-                                               <width>230</width>
+                                               <width>200</width>
                                                <include>ButtonInfoDialogsCommonValues</include>
                                                <label>31504</label>
                                        </control>
                                        <control type="button" id="28">
                                                <description>Delete Group</description>
-                                               <width>230</width>
+                                               <width>200</width>
                                                <include>ButtonInfoDialogsCommonValues</include>
                                                <label>31505</label>
                                        </control>
                                        <control type="button" id="29">
                                                <description>OK</description>
-                                               <width>230</width>
+                                               <width>200</width>
                                                <include>ButtonInfoDialogsCommonValues</include>
                                                <label>186</label>
                                        </control>
                                </control>
+                               <control type="group">
+                                       <left>1065</left>
+                                       <top>405</top>
+                                       <control type="image">
+                                               <left>0</left>
+                                               <top>0</top>
+                                               <width>210</width>
+                                               <height>210</height>
+                                               <texture border="5">button-nofocus.png</texture>
+                                       </control>
+                                       <control type="image">
+                                               <left>5</left>
+                                               <top>5</top>
+                                               <width>200</width>
+                                               <height>200</height>
+                                               <aspectratio>keep</aspectratio>
+                                               <texture background="true">$INFO[Container(11).ListItem.Icon]</texture>
+                                               <visible>Control.HasFocus(11) | Control.HasFocus(71)</visible>
+                                       </control>
+                                       <control type="image">
+                                               <left>5</left>
+                                               <top>5</top>
+                                               <width>200</width>
+                                               <height>200</height>
+                                               <aspectratio>keep</aspectratio>
+                                               <texture background="true">$INFO[Container(12).ListItem.Icon]</texture>
+                                               <visible>Control.HasFocus(12) | Control.HasFocus(72)</visible>
+                                       </control>
+                               </control>
                        </control>
                </control>
                <include>Clock</include>
index 9d9247f..2c9825b 100644 (file)
@@ -4,7 +4,7 @@
        <defaultcontrol always="true">3</defaultcontrol>
        <coordinates>
                <system>1</system>
-               <left>335</left>
+               <left>215</left>
                <top>35</top>
        </coordinates>
        <include>dialogeffect</include>
@@ -13,8 +13,8 @@
                        <description>background image</description>
                        <left>0</left>
                        <top>0</top>
-                       <width>610</width>
-                       <height>650</height>
+                       <width>850</width>
+                       <height>600</height>
                        <texture border="40">DialogBack.png</texture>
                        <visible>![Window.IsVisible(FullscreenVideo) | Window.IsVisible(Visualisation)]</visible>
                </control>
@@ -22,8 +22,8 @@
                        <description>background image</description>
                        <left>0</left>
                        <top>0</top>
-                       <width>610</width>
-                       <height>650</height>
+                       <width>850</width>
+                       <height>600</height>
                        <texture border="40">DialogBack2.png</texture>
                        <visible>Window.IsVisible(FullscreenVideo) | Window.IsVisible(Visualisation)</visible>
                </control>
@@ -31,7 +31,7 @@
                        <description>Dialog Header image</description>
                        <left>40</left>
                        <top>16</top>
-                       <width>530</width>
+                       <width>770</width>
                        <height>40</height>
                        <texture>dialogheader.png</texture>
                </control>
@@ -39,7 +39,7 @@
                        <description>header label</description>
                        <left>40</left>
                        <top>20</top>
-                       <width>530</width>
+                       <width>770</width>
                        <height>30</height>
                        <font>font13_title</font>
                        <label>$LOCALIZE[13406]</label>
@@ -50,7 +50,7 @@
                </control>
                <control type="button">
                        <description>Close Window button</description>
-                       <left>520</left>
+                       <left>760</left>
                        <top>15</top>
                        <width>64</width>
                        <height>32</height>
                        <textureslidernib>ScrollBarNib.png</textureslidernib>
                        <textureslidernibfocus>ScrollBarNib.png</textureslidernibfocus>
                        <onleft>3</onleft>
-                       <onright>3</onright>
+                       <onright>5</onright>
                        <ondown>61</ondown>
                        <onup>61</onup>
                        <showonepage>false</showonepage>
                </control>
                <control type="label">
                        <description>number of files/pages in list text label</description>
-                       <left>280</left>
-                       <top>587</top>
-                       <width>300</width>
+                       <left>595</left>
+                       <top>542</top>
+                       <width>230</width>
                        <height>35</height>
                        <font>font12</font>
                        <align>right</align>
                        <scroll>true</scroll>
                        <textcolor>grey</textcolor>
                        <label>([COLOR=blue]$INFO[Container(6).NumItems][/COLOR]) $LOCALIZE[31025] - $LOCALIZE[31024] ([COLOR=blue]$INFO[Container(6).CurrentPage]/$INFO[Container(6).NumPages][/COLOR])</label>
+                       <wrapmultiline>true</wrapmultiline>
                        <visible>Control.IsVisible(6)</visible>
                </control>
                <control type="button" id="5">
                        <description>Manual button</description>
-                       <left>20</left>
-                       <top>585</top>
+                       <left>615</left>
+                       <top>107</top>
                        <width>200</width>
                        <height>40</height>
                        <label>186</label>
                        <textcolor>white</textcolor>
                        <focusedcolor>white</focusedcolor>
                        <align>center</align>
-                       <onleft>61</onleft>
+                       <onleft>3</onleft>
                        <onright>3</onright>
-                       <onup>3</onup>
-                       <ondown>3</ondown>
+               </control>
+               <control type="group">
+                       <left>610</left>
+                       <top>320</top>
+                       <visible>Control.IsVisible(6)</visible>
+                       <control type="image">
+                               <left>0</left>
+                               <top>0</top>
+                               <width>210</width>
+                               <height>210</height>
+                               <texture border="5">button-nofocus.png</texture>
+                       </control>
+                       <control type="image">
+                               <left>5</left>
+                               <top>5</top>
+                               <width>200</width>
+                               <height>200</height>
+                               <aspectratio>keep</aspectratio>
+                               <texture background="true">$INFO[Container(6).ListItem.Icon]</texture>
+                       </control> 
                </control>
        </controls>
 </window>
index fc1e23c..fdafbac 100644 (file)
@@ -59,8 +59,8 @@
                                        <font>font30_title</font>
                                        <align>right</align>
                                        <aligny>center</aligny>
-                                       <textcolor>FFFFFFFF</textcolor>
-                                       <shadowcolor>FF000000</shadowcolor>
+                                       <textcolor>white</textcolor>
+                                       <shadowcolor>black</shadowcolor>
                                </control>
                                <control type="label">
                                        <description>Video label</description>
@@ -73,7 +73,7 @@
                                        <align>right</align>
                                        <aligny>center</aligny>
                                        <textcolor>grey</textcolor>
-                                       <shadowcolor>FF000000</shadowcolor>
+                                       <shadowcolor>black</shadowcolor>
                                </control>
                                <control type="image">
                                        <left>30</left>
@@ -97,7 +97,7 @@
                                        <width>780</width>
                                        <height>40</height>
                                        <font>font13</font>
-                                       <textcolor>FFFFFFFF</textcolor>
+                                       <textcolor>white</textcolor>
                                        <align>center</align>
                                        <aligny>center</aligny>
                                        <wrapmultiline>true</wrapmultiline>
                                                        <height>38</height>
                                                        <font>font18</font>
                                                        <aligny>center</aligny>
-                                                       <textcolor>FFFFFFFF</textcolor>
-                                                       <selectedcolor>FF0084FF</selectedcolor>
+                                                       <textcolor>white</textcolor>
+                                                       <selectedcolor>selected</selectedcolor>
                                                        <align>left</align>
                                                        <info>ListItem.Label</info>
                                                </control>
                                                        <height>38</height>
                                                        <font>font18</font>
                                                        <aligny>center</aligny>
-                                                       <textcolor>FFFFFFFF</textcolor>
-                                                       <selectedcolor>FF0084FF</selectedcolor>
+                                                       <textcolor>white</textcolor>
+                                                       <selectedcolor>selected</selectedcolor>
                                                        <align>left</align>
                                                        <info>ListItem.Label2</info>
                                                </control>
                                                        <height>38</height>
                                                        <font>font18</font>
                                                        <aligny>center</aligny>
-                                                       <textcolor>FFFFFFFF</textcolor>
-                                                       <selectedcolor>FF0084FF</selectedcolor>
+                                                       <textcolor>white</textcolor>
+                                                       <selectedcolor>selected</selectedcolor>
                                                        <align>left</align>
                                                        <info>ListItem.Label</info>
                                                </control>
                                                        <height>38</height>
                                                        <font>font18</font>
                                                        <aligny>center</aligny>
-                                                       <textcolor>FFFFFFFF</textcolor>
-                                                       <selectedcolor>FF0084FF</selectedcolor>
+                                                       <textcolor>white</textcolor>
+                                                       <selectedcolor>selected</selectedcolor>
                                                        <align>left</align>
                                                        <info>ListItem.Label2</info>
                                                </control>
                                        <align>right</align>
                                        <aligny>center</aligny>
                                        <subtype>page</subtype>
-                                       <textcolor>FFFFFFFF</textcolor>
+                                       <textcolor>white</textcolor>
                                        <onleft>120</onleft>
                                        <onright>120</onright>
                                        <ondown>120</ondown>
                                                        <width min="10" max="260">auto</width>
                                                        <height>40</height>
                                                        <font>font13</font>
-                                                       <textcolor>FFFFFFFF</textcolor>
+                                                       <textcolor>white</textcolor>
                                                        <label>31413</label>
                                                        <aligny>center</aligny>
                                                        <wrapmultiline>true</wrapmultiline>
                                        <font>font13</font>
                                        <align>center</align>
                                        <aligny>top</aligny>
-                                       <textcolor>FFEB9E17</textcolor>
-                                       <shadowcolor>FF000000</shadowcolor>
+                                       <textcolor>blue</textcolor>
+                                       <shadowcolor>black</shadowcolor>
                                        <wrapmultiline>true</wrapmultiline>
                                </control>
                                <control type="image">
                                                        <height>38</height>
                                                        <font>font18</font>
                                                        <aligny>center</aligny>
-                                                       <textcolor>FFFFFFFF</textcolor>
-                                                       <selectedcolor>FF0084FF</selectedcolor>
+                                                       <textcolor>white</textcolor>
+                                                       <selectedcolor>selected</selectedcolor>
                                                        <align>left</align>
                                                        <info>ListItem.Label</info>
                                                </control>
                                                        <height>38</height>
                                                        <font>font18</font>
                                                        <aligny>center</aligny>
-                                                       <textcolor>FFFFFFFF</textcolor>
-                                                       <selectedcolor>FF0084FF</selectedcolor>
+                                                       <textcolor>white</textcolor>
+                                                       <selectedcolor>selected</selectedcolor>
                                                        <align>left</align>
                                                        <info>ListItem.Label</info>
                                                </control>
index 255c461..7d6445a 100644 (file)
@@ -9,18 +9,35 @@
        </coordinates>
        <controls>
                <control type="group">
-                       <left>580</left>
+                       <left>360</left>
                        <animation effect="slide" start="700,0" end="0,0" time="400" tween="quadratic" easing="out" condition="![Window.IsVisible(MovieInformation) | Window.IsVisible(MusicInformation)]">WindowOpen</animation>
-                       <animation effect="slide" start="-400,0" end="0,0" time="400" tween="quadratic" easing="out" condition="[Window.IsVisible(MovieInformation) | Window.IsVisible(MusicInformation)]">WindowOpen</animation>
+                       <animation effect="slide" start="-180,0" end="0,0" time="400" tween="quadratic" easing="out" condition="[Window.IsVisible(MovieInformation) | Window.IsVisible(MusicInformation)]">WindowOpen</animation>
                        <animation effect="slide" start="0,0" end="700,0" time="400" tween="quadratic" easing="out" condition="![Window.IsVisible(MovieInformation) | Window.IsVisible(MusicInformation)]">WindowClose</animation>
                        <animation effect="slide" start="0,0" end="-400,0" time="400" tween="quadratic" easing="out" condition="[Window.IsVisible(MovieInformation) | Window.IsVisible(MusicInformation)]">WindowClose</animation>
                        <control type="image">
                                <left>0</left>
                                <top>0</top>
-                               <width>1100</width>
+                               <width>1320</width>
                                <height>720</height>
                                <texture border="15,0,0,0" flipx="true">MediaBladeSub.png</texture>
                        </control>
+                       <control type="image">
+                               <description>background image</description>
+                               <left>667</left>
+                               <top>-10</top>
+                               <width>675</width>
+                               <height>740</height>
+                               <texture border="10">KeyboardEditArea.png</texture>
+                               <animation effect="fade" end="30" time="0" condition="true">conditional</animation>
+                       </control>
+                       <control type="image">
+                               <description>Dialog Header image</description>
+                               <left>40</left>
+                               <top>16</top>
+                               <width>595</width>
+                               <height>40</height>
+                               <texture>dialogheader.png</texture>
+                       </control>
                        <control type="button">
                                <description>Close Window button</description>
                                <left>20</left>
                                <animation effect="fade" start="100" end="0" time="200">WindowClose</animation>
                                <control type="label" id="411">
                                        <description>header label</description>
-                                       <left>30</left>
-                                       <top>40</top>
-                                       <width>630</width>
+                                       <left>40</left>
+                                       <top>20</top>
+                                       <width>595</width>
                                        <height>30</height>
                                        <font>font13_title</font>
                                        <label>1023</label>
-                                       <align>right</align>
+                                       <align>center</align>
                                        <aligny>center</aligny>
                                        <textcolor>selected</textcolor>
                                        <shadowcolor>black</shadowcolor>
                                </control>
                                <control type="label" id="412">
                                        <description>Path label</description>
-                                       <left>30</left>
-                                       <top>70</top>
-                                       <width>630</width>
+                                       <left>40</left>
+                                       <top>680</top>
+                                       <width>595</width>
                                        <height>30</height>
                                        <font>font13</font>
                                        <haspath>true</haspath>
@@ -68,8 +85,8 @@
                                        <shadowcolor>black</shadowcolor>
                                </control>
                                <control type="grouplist" id="9000">
-                                       <left>20</left>
-                                       <top>460</top>
+                                       <left>685</left>
+                                       <top>130</top>
                                        <width>221</width>
                                        <height>225</height>
                                        <itemgap>5</itemgap>
                                        </control>
                                </control>
                                <control type="image">
-                                       <left>245</left>
-                                       <top>460</top>
-                                       <width>420</width>
-                                       <height>210</height>
+                                       <left>685</left>
+                                       <top>400</top>
+                                       <width>221</width>
+                                       <height>221</height>
                                        <texture border="5">button-nofocus.png</texture>
                                </control>
                                <control type="image"> 
-                                       <left>250</left> 
-                                       <top>465</top> 
-                                       <width>410</width> 
-                                       <height>200</height> 
+                                       <left>690</left> 
+                                       <top>405</top> 
+                                       <width>211</width> 
+                                       <height>211</height> 
                                        <aspectratio>keep</aspectratio> 
                                        <texture background="true">$INFO[ListItem.Icon]</texture> 
                                        <visible>!SubString(Control.GetLabel(416),*)</visible> 
                                </control>
                                <control type="panel" id="450">
                                        <left>20</left>
-                                       <top>120</top>
-                                       <width>640</width>
-                                       <height>321</height>
+                                       <top>90</top>
+                                       <width>620</width>
+                                       <height>562</height>
                                        <onleft>9000</onleft>
                                        <onright>60</onright>
                                        <onup>450</onup>
                                        <ondown>450</ondown>
                                        <pagecontrol>60</pagecontrol>
                                        <scrolltime>200</scrolltime>
-                                       <itemlayout height="40" width="640">
+                                       <itemlayout height="40" width="620">
                                                <control type="image">
                                                        <left>0</left>
                                                        <top>0</top>
-                                                       <width>640</width>
+                                                       <width>620</width>
                                                        <height>41</height>
                                                        <texture border="5">MenuItemNF.png</texture>
                                                </control>
                                                <control type="label">
                                                        <left>55</left>
                                                        <top>0</top>
-                                                       <width>580</width>
+                                                       <width>560</width>
                                                        <height>40</height>
                                                        <font>font13</font>
                                                        <align>left</align>
                                                        <info>ListItem.Label</info>
                                                </control>
                                        </itemlayout>
-                                       <focusedlayout height="40" width="640">
+                                       <focusedlayout height="40" width="620">
                                                <control type="image">
                                                        <left>0</left>
                                                        <top>0</top>
-                                                       <width>640</width>
+                                                       <width>620</width>
                                                        <height>41</height>
                                                        <visible>!Control.HasFocus(450)</visible>
                                                        <texture border="5">MenuItemNF.png</texture>
                                                <control type="image">
                                                        <left>0</left>
                                                        <top>0</top>
-                                                       <width>640</width>
+                                                       <width>620</width>
                                                        <height>41</height>
                                                        <visible>Control.HasFocus(450)</visible>
                                                        <texture border="5">MenuItemFO.png</texture>
                                                <control type="label">
                                                        <left>55</left>
                                                        <top>0</top>
-                                                       <width>580</width>
+                                                       <width>560</width>
                                                        <height>40</height>
                                                        <font>font13</font>
                                                        <align>left</align>
                                </control>
                                <control type="panel" id="451">
                                        <left>20</left>
-                                       <top>120</top>
-                                       <width>640</width>
-                                       <height>321</height>
+                                       <top>90</top>
+                                       <width>620</width>
+                                       <height>562</height>
                                        <onleft>9000</onleft>
                                        <onright>60</onright>
                                        <onup>451</onup>
                                        <ondown>451</ondown>
                                        <pagecontrol>60</pagecontrol>
                                        <scrolltime>200</scrolltime>
-                                       <itemlayout height="40" width="640">
+                                       <itemlayout height="40" width="620">
                                                <control type="image">
                                                        <left>0</left>
                                                        <top>0</top>
-                                                       <width>640</width>
+                                                       <width>620</width>
                                                        <height>41</height>
                                                        <texture border="5">MenuItemNF.png</texture>
                                                </control>
                                                <control type="label">
                                                        <left>55</left>
                                                        <top>0</top>
-                                                       <width>580</width>
+                                                       <width>560</width>
                                                        <height>40</height>
                                                        <font>font13</font>
                                                        <align>left</align>
                                                        <info>ListItem.Label</info>
                                                </control>
                                        </itemlayout>
-                                       <focusedlayout height="40" width="640">
+                                       <focusedlayout height="40" width="620">
                                                <control type="image">
                                                        <left>0</left>
                                                        <top>0</top>
-                                                       <width>640</width>
+                                                       <width>620</width>
                                                        <height>41</height>
                                                        <visible>!Control.HasFocus(451)</visible>
                                                        <texture border="5">MenuItemNF.png</texture>
                                                <control type="image">
                                                        <left>0</left>
                                                        <top>0</top>
-                                                       <width>640</width>
+                                                       <width>620</width>
                                                        <height>41</height>
                                                        <visible>Control.HasFocus(451)</visible>
                                                        <texture border="5">MenuItemFO.png</texture>
                                                <control type="label">
                                                        <left>55</left>
                                                        <top>0</top>
-                                                       <width>580</width>
+                                                       <width>560</width>
                                                        <height>40</height>
                                                        <font>font13</font>
                                                        <align>left</align>
                                </control>
 
                                <control type="scrollbar" id="60">
-                                       <left>650</left>
-                                       <top>120</top>
+                                       <left>640</left>
+                                       <top>90</top>
                                        <width>25</width>
-                                       <height>320</height>
+                                       <height>561</height>
                                        <texturesliderbackground border="0,14,0,14">ScrollBarV.png</texturesliderbackground>
                                        <texturesliderbar border="0,14,0,14">ScrollBarV_bar.png</texturesliderbar>
                                        <texturesliderbarfocus border="0,14,0,14">ScrollBarV_bar_focus.png</texturesliderbarfocus>
                                        <textureslidernib>ScrollBarNib.png</textureslidernib>
                                        <textureslidernibfocus>ScrollBarNib.png</textureslidernibfocus>
                                        <onleft>450</onleft>
-                                       <onright>450</onright>
+                                       <onright>9000</onright>
                                        <showonepage>false</showonepage>
                                        <orientation>vertical</orientation>
                                </control>
                                <control type="label">
                                        <description>Page label</description>
-                                       <left>100</left>
+                                       <left>685</left>
                                        <top>680</top>
-                                       <width>560</width>
+                                       <width>221</width>
                                        <height>30</height>
                                        <align>right</align>
                                        <aligny>center</aligny>
                                        <textcolor>grey</textcolor>
                                        <font>font12</font>
                                        <label>([COLOR=blue]$INFO[Container(450).NumItems][/COLOR]) $LOCALIZE[31025] - $LOCALIZE[31024] ([COLOR=blue]$INFO[Container(450).CurrentPage]/$INFO[Container(450).NumPages][/COLOR])</label>
+                                       <wrapmultiline>true</wrapmultiline>
                                        <visible>!Control.IsVisible(451)</visible>
                                </control>
                                <control type="label">
                                        <description>Page label</description>
-                                       <left>100</left>
+                                       <left>685</left>
                                        <top>680</top>
-                                       <width>560</width>
+                                       <width>221</width>
                                        <height>30</height>
                                        <align>right</align>
                                        <aligny>center</aligny>
                                        <textcolor>grey</textcolor>
                                        <font>font12</font>
                                        <label>([COLOR=blue]$INFO[Container(451).NumItems][/COLOR]) $LOCALIZE[31025] - $LOCALIZE[31024] ([COLOR=blue]$INFO[Container(451).CurrentPage]/$INFO[Container(451).NumPages][/COLOR])</label>
+                                       <wrapmultiline>true</wrapmultiline>
                                        <visible>Control.IsVisible(451)</visible>
                                </control>
                        </control>
index 2cb0736..94110a3 100644 (file)
                                <top>60</top>
                                <control type="label">
                                        <description>Channel header label</description>
-                                       <left>0</left>
+                                       <left>20</left>
                                        <top>20</top>
                                        <width>220</width>
                                        <height>20</height>
                                        <font>font13_title</font>
                                        <textcolor>white</textcolor>
                                        <shadowcolor>black</shadowcolor>
-                                       <align>center</align>
                                        <aligny>center</aligny>
                                        <label>19029</label>
                                </control>
                                <control type="label">
                                        <description>Title header label</description>
-                                       <left>220</left>
+                                       <left>240</left>
                                        <top>20</top>
                                        <width>300</width>
                                        <height>20</height>
                                        <font>font13_title</font>
                                        <textcolor>white</textcolor>
                                        <shadowcolor>black</shadowcolor>
-                                       <align>center</align>
                                        <aligny>center</aligny>
                                        <label>369</label>
                                </control>
                                <control type="label">
                                        <description>Schedule Time header label</description>
-                                       <left>580</left>
+                                       <left>600</left>
                                        <top>20</top>
                                        <width>300</width>
                                        <height>20</height>
                                        <font>font13_title</font>
                                        <textcolor>white</textcolor>
                                        <shadowcolor>black</shadowcolor>
-                                       <align>center</align>
                                        <aligny>center</aligny>
                                        <label>31501</label>
                                </control>
                                <control type="label">
                                        <description>Status header label</description>
-                                       <left>940</left>
+                                       <left>980</left>
                                        <top>20</top>
                                        <width>150</width>
                                        <height>20</height>
                                        <font>font13_title</font>
                                        <textcolor>white</textcolor>
                                        <shadowcolor>black</shadowcolor>
-                                       <align>center</align>
                                        <aligny>center</aligny>
                                        <label>126</label>
                                </control>
                                                        <height>41</height>
                                                        <texture border="5">MenuItemNF.png</texture>
                                                </control>
-                                               <control type="image">
-                                                       <left>220</left>
-                                                       <top>0</top>
-                                                       <width>300</width>
-                                                       <height>40</height>
-                                                       <colordiffuse>33FFFFFF</colordiffuse>
-                                                       <texture border="5">StackFO.png</texture>
-                                               </control>
-                                               <control type="image">
-                                                       <left>940</left>
-                                                       <top>0</top>
-                                                       <width>155</width>
-                                                       <height>40</height>
-                                                       <colordiffuse>33FFFFFF</colordiffuse>
-                                                       <texture border="5">StackFO.png</texture>
-                                               </control>
-                                               <control type="image">
-                                                       <left>0</left>
-                                                       <top>8</top>
-                                                       <width>50</width>
-                                                       <height>26</height>
+                                               <control type="group">
+                                                       <visible>IsEmpty(ListItem.Date)</visible>
+                                                       <control type="label">
+                                                               <left>50</left>
+                                                               <top>0</top>
+                                                               <width>150</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.Label</info>
+                                                       </control>
+                                               </control>
+                                               <control type="group">
                                                        <visible>!IsEmpty(ListItem.Date)</visible>
-                                                       <texture border="1">$INFO[ListItem.Icon]</texture>
-                                               </control>
-                                               <control type="label">
-                                                       <left>50</left>
-                                                       <top>0</top>
-                                                       <width>150</width>
-                                                       <height>40</height>
-                                                       <font>font12</font>
-                                                       <align>left</align>
-                                                       <aligny>center</aligny>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <info>ListItem.ChannelName</info>
-                                               </control>
-                                               <control type="label">
-                                                       <left>370</left>
-                                                       <top>0</top>
-                                                       <width>290</width>
-                                                       <height>40</height>
-                                                       <font>font12</font>
-                                                       <align>center</align>
-                                                       <aligny>center</aligny>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <info>ListItem.Label</info>
-                                               </control>
-                                               <control type="label">
-                                                       <left>730</left>
-                                                       <top>0</top>
-                                                       <width>400</width>
-                                                       <height>40</height>
-                                                       <font>font12</font>
-                                                       <align>center</align>
-                                                       <aligny>center</aligny>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <info>ListItem.Date</info>
-                                               </control>
-                                               <control type="label">
-                                                       <left>1018</left>
-                                                       <top>0</top>
-                                                       <width>170</width>
-                                                       <height>40</height>
-                                                       <font>font12</font>
-                                                       <align>center</align>
-                                                       <aligny>center</aligny>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <info>ListItem.Comment</info>
+                                                       <control type="image">
+                                                               <left>0</left>
+                                                               <top>8</top>
+                                                               <width>50</width>
+                                                               <height>26</height>
+                                                               <texture border="1">$INFO[ListItem.Icon]</texture>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>50</left>
+                                                               <top>0</top>
+                                                               <width>150</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.ChannelName</info>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>240</left>
+                                                               <top>0</top>
+                                                               <width>290</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.Label</info>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>600</left>
+                                                               <top>0</top>
+                                                               <width>400</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.Date</info>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>980</left>
+                                                               <top>0</top>
+                                                               <width>170</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.Comment</info>
+                                                       </control>
                                                </control>
                                        </itemlayout>
                                        <focusedlayout height="40">
                                                        <top>0</top>
                                                        <width>1100</width>
                                                        <height>41</height>
-                                                       <texture border="5">MenuItemNF.png</texture>
-                                               </control>
-                                               <control type="image">
-                                                       <left>220</left>
-                                                       <top>0</top>
-                                                       <width>300</width>
-                                                       <height>40</height>
-                                                       <colordiffuse>33FFFFFF</colordiffuse>
-                                                       <texture border="5">StackFO.png</texture>
-                                                       <visible>!Control.HasFocus(14)</visible>
+                                                       <texture border="5">MenuItemFO.png</texture>
                                                </control>
                                                <control type="image">
-                                                       <left>940</left>
+                                                       <left>0</left>
                                                        <top>0</top>
-                                                       <width>155</width>
-                                                       <height>40</height>
+                                                       <width>1100</width>
+                                                       <height>41</height>
                                                        <colordiffuse>33FFFFFF</colordiffuse>
-                                                       <texture border="5">StackFO.png</texture>
-                                                       <visible>!Control.HasFocus(14)</visible>
-                                               </control>
-                                               <control type="image">
-                                                       <left>220</left>
-                                                       <top>0</top>
-                                                       <width>300</width>
-                                                       <height>40</height>
-                                                       <colordiffuse>88FFFFFF</colordiffuse>
-                                                       <texture border="5">StackFO.png</texture>
-                                                       <visible>Control.HasFocus(14)</visible>
-                                               </control>
-                                               <control type="image">
-                                                       <left>940</left>
-                                                       <top>0</top>
-                                                       <width>155</width>
-                                                       <height>40</height>
-                                                       <colordiffuse>88FFFFFF</colordiffuse>
-                                                       <texture border="5">StackFO.png</texture>
+                                                       <texture border="5">MenuItemFO.png</texture>
                                                        <visible>Control.HasFocus(14)</visible>
                                                </control>
-                                               <control type="image">
-                                                       <left>0</left>
-                                                       <top>8</top>
-                                                       <width>50</width>
-                                                       <height>26</height>
+                                               <control type="group">
+                                                       <visible>IsEmpty(ListItem.Date)</visible>
+                                                       <control type="label">
+                                                               <left>50</left>
+                                                               <top>0</top>
+                                                               <width>150</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.Label</info>
+                                                       </control>
+                                               </control>
+                                               <control type="group">
                                                        <visible>!IsEmpty(ListItem.Date)</visible>
-                                                       <texture border="1">$INFO[ListItem.Icon]</texture>
-                                               </control>
-                                               <control type="label">
-                                                       <left>50</left>
-                                                       <top>0</top>
-                                                       <width>150</width>
-                                                       <height>40</height>
-                                                       <font>font12</font>
-                                                       <align>left</align>
-                                                       <aligny>center</aligny>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <info>ListItem.ChannelName</info>
-                                               </control>
-                                               <control type="label">
-                                                       <left>370</left>
-                                                       <top>0</top>
-                                                       <width>290</width>
-                                                       <height>40</height>
-                                                       <font>font12</font>
-                                                       <align>center</align>
-                                                       <aligny>center</aligny>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <info>ListItem.Label</info>
-                                               </control>
-                                               <control type="label">
-                                                       <left>730</left>
-                                                       <top>0</top>
-                                                       <width>400</width>
-                                                       <height>40</height>
-                                                       <font>font12</font>
-                                                       <align>center</align>
-                                                       <aligny>center</aligny>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <info>ListItem.Date</info>
-                                               </control>
-                                               <control type="label">
-                                                       <left>1018</left>
-                                                       <top>0</top>
-                                                       <width>150</width>
-                                                       <height>40</height>
-                                                       <font>font12</font>
-                                                       <align>center</align>
-                                                       <aligny>center</aligny>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <info>ListItem.Comment</info>
+                                                       <control type="image">
+                                                               <left>0</left>
+                                                               <top>8</top>
+                                                               <width>50</width>
+                                                               <height>26</height>
+                                                               <texture border="1">$INFO[ListItem.Icon]</texture>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>50</left>
+                                                               <top>0</top>
+                                                               <width>150</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.ChannelName</info>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>240</left>
+                                                               <top>0</top>
+                                                               <width>290</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.Label</info>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>600</left>
+                                                               <top>0</top>
+                                                               <width>400</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.Date</info>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>980</left>
+                                                               <top>0</top>
+                                                               <width>150</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.Comment</info>
+                                                       </control>
                                                </control>
                                        </focusedlayout>
                                </control>
                                        <description>Channel label</description>
                                        <left>0</left>
                                        <top>20</top>
-                                       <width>250</width>
+                                       <width>220</width>
                                        <height>20</height>
                                        <font>font13_title</font>
                                        <textcolor>white</textcolor>
                                        <shadowcolor>black</shadowcolor>
-                                       <align>center</align>
                                        <aligny>center</aligny>
                                        <label>19148</label>
                                </control>
                                <control type="label">
-                                       <description>Title</description>
-                                       <left>290</left>
+                                       <description>Title header label</description>
+                                       <left>240</left>
                                        <top>20</top>
-                                       <width>350</width>
+                                       <width>300</width>
                                        <height>20</height>
                                        <font>font13_title</font>
                                        <textcolor>white</textcolor>
                                        <shadowcolor>black</shadowcolor>
-                                       <align>left</align>
                                        <aligny>center</aligny>
                                        <label>369</label>
                                </control>
                                <control type="label">
                                        <description>Time label</description>
-                                       <left>620</left>
+                                       <left>700</left>
                                        <top>20</top>
                                        <width>300</width>
                                        <height>20</height>
                                        <font>font13_title</font>
                                        <textcolor>white</textcolor>
                                        <shadowcolor>black</shadowcolor>
-                                       <align>right</align>
                                        <aligny>center</aligny>
                                        <label>21820</label>
                                </control>
                                <control type="label">
                                        <description>Status header label</description>
-                                       <left>960</left>
+                                       <left>980</left>
                                        <top>20</top>
                                        <width>140</width>
                                        <height>20</height>
                                        <font>font13_title</font>
                                        <textcolor>white</textcolor>
                                        <shadowcolor>black</shadowcolor>
-                                       <align>center</align>
                                        <aligny>center</aligny>
                                        <label>126</label>
                                </control>
                                                        <height>41</height>
                                                        <texture border="5">MenuItemNF.png</texture>
                                                </control>
-                                               <control type="image">
-                                                       <left>0</left>
-                                                       <top>0</top>
-                                                       <width>250</width>
-                                                       <height>40</height>
-                                                       <colordiffuse>33FFFFFF</colordiffuse>
-                                                       <texture border="5">StackFO.png</texture>
-                                               </control>
-                                               <control type="image">
-                                                       <left>960</left>
-                                                       <top>0</top>
-                                                       <width>140</width>
-                                                       <height>40</height>
-                                                       <colordiffuse>33FFFFFF</colordiffuse>
-                                                       <texture border="5">StackFO.png</texture>
-                                               </control>
-                                               <control type="image">
-                                                       <left>10</left>
-                                                       <top>5</top>
-                                                       <width>30</width>
-                                                       <height>30</height>
-                                                       <info>ListItem.Icon</info>
-                                               </control>
-                                               <control type="label">
-                                                       <left>50</left>
-                                                       <top>0</top>
-                                                       <width>190</width>
-                                                       <height>35</height>
-                                                       <font>font12</font>
-                                                       <align>left</align>
-                                                       <aligny>center</aligny>
-                                                       <textcolor>grey2</textcolor>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <info>ListItem.ChannelName</info>
-                                               </control>
-                                               <control type="label">
-                                                       <left>260</left>
-                                                       <top>0</top>
-                                                       <width>650</width>
-                                                       <height>35</height>
-                                                       <font>font13</font>
-                                                       <align>left</align>
-                                                       <aligny>center</aligny>
-                                                       <textcolor>grey2</textcolor>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <info>ListItem.Label</info>
-                                               </control>
-                                               <control type="label">
-                                                       <left>950</left>
-                                                       <top>0</top>
-                                                       <width>500</width>
-                                                       <height>40</height>
-                                                       <font>font12</font>
-                                                       <align>right</align>
-                                                       <aligny>center</aligny>
-                                                       <textcolor>grey2</textcolor>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <info>ListItem.Date</info>
-                                               </control>
-                                               <control type="image">
-                                                       <left>970</left>
-                                                       <top>10</top>
-                                                       <width>30</width>
-                                                       <height>20</height>
-                                                       <texture>PVR-IsRecording.png</texture>
-                                                       <visible>ListItem.IsRecording</visible>
-                                               </control>
-                                               <control type="label">
-                                                       <left>1005</left>
-                                                       <top>0</top>
-                                                       <width>80</width>
-                                                       <height>40</height>
-                                                       <font>font10</font>
-                                                       <align>left</align>
-                                                       <aligny>center</aligny>
-                                                       <textcolor>grey2</textcolor>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <label>19043</label>
-                                                       <visible>ListItem.IsRecording</visible>
-                                               </control>
-                                               <control type="image">
-                                                       <left>970</left>
-                                                       <top>10</top>
-                                                       <width>20</width>
-                                                       <height>20</height>
-                                                       <texture>PVR-HasTimer.png</texture>
-                                                       <visible>ListItem.HasTimer + !ListItem.IsRecording</visible>
-                                               </control>
-                                               <control type="label">
-                                                       <left>1000</left>
-                                                       <top>0</top>
-                                                       <width>80</width>
-                                                       <height>40</height>
-                                                       <font>font10</font>
-                                                       <align>left</align>
-                                                       <aligny>center</aligny>
-                                                       <textcolor>grey2</textcolor>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <label>31510</label>
-                                                       <visible>ListItem.HasTimer</visible>
+                                               <control type="group">
+                                                       <visible>IsEmpty(ListItem.Date)</visible>
+                                                       <control type="label">
+                                                               <left>50</left>
+                                                               <top>0</top>
+                                                               <width>650</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <textcolor>grey2</textcolor>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.Label</info>
+                                                       </control>      
+                                               </control>
+                                               <control type="group">
+                                                       <visible>!IsEmpty(ListItem.Date)</visible>
+                                                       <control type="image">
+                                                               <left>0</left>
+                                                               <top>5</top>
+                                                               <width>30</width>
+                                                               <height>30</height>
+                                                               <texture border="1">$INFO[ListItem.Icon]</texture>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>50</left>
+                                                               <top>0</top>
+                                                               <width>190</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <textcolor>grey2</textcolor>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.ChannelName</info>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>240</left>
+                                                               <top>0</top>
+                                                               <width>450</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <textcolor>grey2</textcolor>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.Label</info>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>700</left>
+                                                               <top>0</top>
+                                                               <width>270</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <textcolor>grey2</textcolor>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.Date</info>
+                                                       </control>
+                                                       <control type="image">
+                                                               <left>980</left>
+                                                               <top>10</top>
+                                                               <width>30</width>
+                                                               <height>20</height>
+                                                               <texture>PVR-IsRecording.png</texture>
+                                                               <visible>ListItem.IsRecording</visible>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>1015</left>
+                                                               <top>0</top>
+                                                               <width>80</width>
+                                                               <height>40</height>
+                                                               <font>font10</font>
+                                                               <aligny>center</aligny>
+                                                               <textcolor>grey2</textcolor>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <label>19043</label>
+                                                               <visible>ListItem.IsRecording</visible>
+                                                       </control>
+                                                       <control type="image">
+                                                               <left>980</left>
+                                                               <top>10</top>
+                                                               <width>20</width>
+                                                               <height>20</height>
+                                                               <texture>PVR-HasTimer.png</texture>
+                                                               <visible>ListItem.HasTimer + !ListItem.IsRecording</visible>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>1010</left>
+                                                               <top>0</top>
+                                                               <width>80</width>
+                                                               <height>40</height>
+                                                               <font>font10</font>
+                                                               <aligny>center</aligny>
+                                                               <textcolor>grey2</textcolor>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <label>31510</label>
+                                                               <visible>ListItem.HasTimer</visible>
+                                                       </control>
                                                </control>
                                        </itemlayout>
                                        <focusedlayout height="40">
                                                <control type="image">
                                                        <left>0</left>
                                                        <top>0</top>
-                                                       <width>250</width>
-                                                       <height>40</height>
-                                                       <colordiffuse>33FFFFFF</colordiffuse>
-                                                       <texture border="5">StackFO.png</texture>
-                                                       <visible>!Control.HasFocus(17)</visible>
-                                               </control>
-                                               <control type="image">
-                                                       <left>960</left>
-                                                       <top>0</top>
-                                                       <width>140</width>
-                                                       <height>40</height>
-                                                       <colordiffuse>33FFFFFF</colordiffuse>
-                                                       <texture border="5">StackFO.png</texture>
-                                                       <visible>!Control.HasFocus(17)</visible>
-                                               </control>
-                                               <control type="image">
-                                                       <left>0</left>
-                                                       <top>0</top>
-                                                       <width>250</width>
-                                                       <height>40</height>
-                                                       <colordiffuse>88FFFFFF</colordiffuse>
-                                                       <texture border="5">StackFO.png</texture>
-                                                       <visible>Control.HasFocus(17)</visible>
-                                               </control>
-                                               <control type="image">
-                                                       <left>960</left>
-                                                       <top>0</top>
-                                                       <width>140</width>
-                                                       <height>40</height>
-                                                       <colordiffuse>88FFFFFF</colordiffuse>
-                                                       <texture border="5">StackFO.png</texture>
+                                                       <width>1100</width>
+                                                       <height>41</height>
+                                                       <texture border="5">MenuItemFO.png</texture>
                                                        <visible>Control.HasFocus(17)</visible>
                                                </control>
-                                               <control type="image">
-                                                       <left>10</left>
-                                                       <top>5</top>
-                                                       <width>30</width>
-                                                       <height>30</height>
-                                                       <info>ListItem.Icon</info>
-                                               </control>
-                                               <control type="label">
-                                                       <left>50</left>
-                                                       <top>0</top>
-                                                       <width>190</width>
-                                                       <height>35</height>
-                                                       <font>font12</font>
-                                                       <align>left</align>
-                                                       <aligny>center</aligny>
-                                                       <textcolor>grey2</textcolor>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <info>ListItem.ChannelName</info>
-                                               </control>
-                                               <control type="label">
-                                                       <left>260</left>
-                                                       <top>0</top>
-                                                       <width>650</width>
-                                                       <height>35</height>
-                                                       <font>font13</font>
-                                                       <align>left</align>
-                                                       <aligny>center</aligny>
-                                                       <textcolor>white</textcolor>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <info>ListItem.Label</info>
-                                               </control>
-                                               <control type="label">
-                                                       <left>950</left>
-                                                       <top>0</top>
-                                                       <width>500</width>
-                                                       <height>40</height>
-                                                       <font>font12</font>
-                                                       <align>right</align>
-                                                       <aligny>center</aligny>
-                                                       <textcolor>white</textcolor>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <info>ListItem.Date</info>
-                                               </control>
-                                               <control type="image">
-                                                       <left>970</left>
-                                                       <top>10</top>
-                                                       <width>30</width>
-                                                       <height>20</height>
-                                                       <texture>PVR-IsRecording.png</texture>
-                                                       <visible>ListItem.IsRecording</visible>
-                                               </control>
-                                               <control type="label">
-                                                       <left>1005</left>
-                                                       <top>0</top>
-                                                       <width>80</width>
-                                                       <height>40</height>
-                                                       <font>font10</font>
-                                                       <align>left</align>
-                                                       <aligny>center</aligny>
-                                                       <textcolor>grey2</textcolor>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <label>19043</label>
-                                                       <visible>ListItem.IsRecording</visible>
-                                               </control>
-                                               <control type="image">
-                                                       <left>970</left>
-                                                       <top>10</top>
-                                                       <width>20</width>
-                                                       <height>20</height>
-                                                       <texture>PVR-HasTimer.png</texture>
-                                                       <visible>ListItem.HasTimer + !ListItem.IsRecording</visible>
-                                               </control>
-                                               <control type="label">
-                                                       <left>1000</left>
-                                                       <top>0</top>
-                                                       <width>80</width>
-                                                       <height>40</height>
-                                                       <font>font10</font>
-                                                       <align>left</align>
-                                                       <aligny>center</aligny>
-                                                       <textcolor>grey2</textcolor>
-                                                       <selectedcolor>selected</selectedcolor>
-                                                       <label>31510</label>
-                                                       <visible>ListItem.HasTimer</visible>
+                                               <control type="group">
+                                                       <visible>IsEmpty(ListItem.Date)</visible>
+                                                       <control type="label">
+                                                               <left>50</left>
+                                                               <top>0</top>
+                                                               <width>650</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <textcolor>grey2</textcolor>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.Label</info>
+                                                       </control>      
+                                               </control>
+                                               <control type="group">
+                                                       <visible>!IsEmpty(ListItem.Date)</visible>
+                                                       <control type="image">
+                                                               <left>0</left>
+                                                               <top>5</top>
+                                                               <width>30</width>
+                                                               <height>30</height>
+                                                               <texture border="1">$INFO[ListItem.Icon]</texture>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>50</left>
+                                                               <top>0</top>
+                                                               <width>190</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <textcolor>grey2</textcolor>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.ChannelName</info>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>240</left>
+                                                               <top>0</top>
+                                                               <width>450</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <textcolor>white</textcolor>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.Label</info>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>700</left>
+                                                               <top>0</top>
+                                                               <width>270</width>
+                                                               <height>40</height>
+                                                               <font>font12</font>
+                                                               <aligny>center</aligny>
+                                                               <textcolor>white</textcolor>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <info>ListItem.Date</info>
+                                                       </control>
+                                                       <control type="image">
+                                                               <left>980</left>
+                                                               <top>10</top>
+                                                               <width>30</width>
+                                                               <height>20</height>
+                                                               <texture>PVR-IsRecording.png</texture>
+                                                               <visible>ListItem.IsRecording</visible>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>1015</left>
+                                                               <top>0</top>
+                                                               <width>80</width>
+                                                               <height>40</height>
+                                                               <font>font10</font>
+                                                               <aligny>center</aligny>
+                                                               <textcolor>grey2</textcolor>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <label>19043</label>
+                                                               <visible>ListItem.IsRecording</visible>
+                                                       </control>
+                                                       <control type="image">
+                                                               <left>980</left>
+                                                               <top>10</top>
+                                                               <width>20</width>
+                                                               <height>20</height>
+                                                               <texture>PVR-HasTimer.png</texture>
+                                                               <visible>ListItem.HasTimer + !ListItem.IsRecording</visible>
+                                                       </control>
+                                                       <control type="label">
+                                                               <left>1010</left>
+                                                               <top>0</top>
+                                                               <width>80</width>
+                                                               <height>40</height>
+                                                               <font>font10</font>
+                                                               <aligny>center</aligny>
+                                                               <textcolor>grey2</textcolor>
+                                                               <selectedcolor>selected</selectedcolor>
+                                                               <label>31510</label>
+                                                               <visible>ListItem.HasTimer</visible>
+                                                       </control>
                                                </control>
                                        </focusedlayout>
                                </control>
index 175c285..1fd1b0c 100644 (file)
                                        <height>20</height>
                                        <label>[B]$LOCALIZE[284][/B]</label>
                                        <font>font16caps</font>
-                                       <textcolor>FFFFFFFF</textcolor>
+                                       <textcolor>white</textcolor>
                                        <align>center</align>
                                        <aligny>center</aligny>
                                </control>
                                        <height>10</height>
                                        <label>-</label>
                                        <font>font10</font>
-                                       <textcolor>FFFFFFFF</textcolor>
+                                       <textcolor>white</textcolor>
                                        <align>center</align>
                                        <aligny>center</aligny>
                                        <texturefocus border="5">button-focus.png</texturefocus>
index 0cb5e05..640a7b5 100755 (executable)
@@ -7145,7 +7145,12 @@ msgctxt "#16325"
 msgid "VDPAU - Bob"
 msgstr ""
 
-#empty strings from id 16326 to 16399
+#: xbmc/cores/VideoRenderers/BaseRenderer.cpp
+msgctxt "#16326"
+msgid "DXVA-HD"
+msgstr ""
+
+#empty strings from id 16327 to 16399
 
 #: xbmc/video/dialogs/GUIDialogVideoSettings.cpp
 msgctxt "#16400"
@@ -14866,7 +14871,17 @@ msgctxt "#36544"
 msgid "Enable hardware decoding of video files."
 msgstr ""
 
-#empty strings from id 36545 to 36999
+#: system/settings/settings.xml
+msgctxt "#36545"
+msgid "Subtitle stereoscopic depth"
+msgstr ""
+
+#: system/settings/settings.xml
+msgctxt "#36546"
+msgid "Sets the visual depth of subtitles for stereoscopic videos. The higher the value, the closer the subtitles will appear to the viewer."
+msgstr ""
+
+#empty strings from id 36547 to 36999
 #reserved strings 365XX
 
 #: xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp
index 7de6059..2bfb680 100644 (file)
@@ -105,6 +105,7 @@ typedef struct HLSContext {
     AVIOInterruptCB *interrupt_callback;
     char *user_agent;                    ///< holds HTTP user agent set as an AVOption to the HTTP protocol context
     char *cookies;                       ///< holds HTTP cookie values set in either the initial response or as an AVOption to the HTTP protocol context
+    char *headers;                       ///< holds HTTP headers set as an AVOption to the HTTP protocol context (kow|mitm)
 } HLSContext;
 
 static int read_chomp_line(AVIOContext *s, char *buf, int maxlen)
@@ -224,6 +225,7 @@ static int parse_playlist(HLSContext *c, const char *url,
         // broker prior HTTP options that should be consistent across requests
         av_dict_set(&opts, "user-agent", c->user_agent, 0);
         av_dict_set(&opts, "cookies", c->cookies, 0);
+        av_dict_set(&opts, "headers", c->headers, 0); // (kow|mitm)
 
         ret = avio_open2(&in, url, AVIO_FLAG_READ,
                          c->interrupt_callback, &opts);
@@ -346,6 +348,7 @@ static int open_input(HLSContext *c, struct variant *var)
     // broker prior HTTP options that should be consistent across requests
     av_dict_set(&opts, "user-agent", c->user_agent, 0);
     av_dict_set(&opts, "cookies", c->cookies, 0);
+    av_dict_set(&opts, "headers", c->headers, 0); // (kow|mitm)
     av_dict_set(&opts, "seekable", "0", 0);
 
     if (seg->key_type == KEY_NONE) {
@@ -494,6 +497,12 @@ static int hls_read_header(AVFormatContext *s)
         av_opt_get(u->priv_data, "cookies", 0, (uint8_t**)&(c->cookies));
         if (c->cookies && !strlen(c->cookies))
             av_freep(&c->cookies);
+            
+        // get the previous headers & set back to null if string size is zero (kow|mitm)
+        av_freep(&c->headers);
+        av_opt_get(u->priv_data, "headers", 0, (uint8_t**)&(c->headers));
+        if (c->headers && !strlen(c->headers))
+            av_freep(&c->headers);
     }
 
     if ((ret = parse_playlist(c, s->filename, NULL, s->pb)) < 0)
diff --git a/lib/ffmpeg/patches/0058-backport-fixed-not-keeping-custom-http-headers.patch b/lib/ffmpeg/patches/0058-backport-fixed-not-keeping-custom-http-headers.patch
new file mode 100644 (file)
index 0000000..d57b5b5
--- /dev/null
@@ -0,0 +1,53 @@
+From 9fb6300b1cc36c8111cee017fbb8a3e37b0c4e68 Mon Sep 17 00:00:00 2001
+From: siriuzwhite <siriuz@gmx.net>
+Date: Sun, 10 Nov 2013 23:26:16 +0100
+Subject: [PATCH] [backport] fixed ffmpeg not keep custom http headers when
+ playing hls stream
+
+---
+ lib/ffmpeg/libavformat/hls.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/lib/ffmpeg/libavformat/hls.c b/lib/ffmpeg/libavformat/hls.c
+index 7de6059..2e3fd00 100644
+--- a/lib/ffmpeg/libavformat/hls.c
++++ b/lib/ffmpeg/libavformat/hls.c
+@@ -105,6 +105,7 @@ struct variant {
+     AVIOInterruptCB *interrupt_callback;
+     char *user_agent;                    ///< holds HTTP user agent set as an AVOption to the HTTP protocol context
+     char *cookies;                       ///< holds HTTP cookie values set in either the initial response or as an AVOption to the HTTP protocol context
++    char *headers;                                 ///< holds HTTP headers set as an AVOption to the HTTP protocol context (kow|mitm)
+ } HLSContext;
+ static int read_chomp_line(AVIOContext *s, char *buf, int maxlen)
+@@ -224,6 +225,7 @@ static int parse_playlist(HLSContext *c, const char *url,
+         // broker prior HTTP options that should be consistent across requests
+         av_dict_set(&opts, "user-agent", c->user_agent, 0);
+         av_dict_set(&opts, "cookies", c->cookies, 0);
++        av_dict_set(&opts, "headers", c->headers, 0); // (kow|mitm)
+         ret = avio_open2(&in, url, AVIO_FLAG_READ,
+                          c->interrupt_callback, &opts);
+@@ -346,6 +348,7 @@ static int open_input(HLSContext *c, struct variant *var)
+     // broker prior HTTP options that should be consistent across requests
+     av_dict_set(&opts, "user-agent", c->user_agent, 0);
+     av_dict_set(&opts, "cookies", c->cookies, 0);
++    av_dict_set(&opts, "headers", c->headers, 0); // (kow|mitm)
+     av_dict_set(&opts, "seekable", "0", 0);
+     if (seg->key_type == KEY_NONE) {
+@@ -494,6 +497,12 @@ static int hls_read_header(AVFormatContext *s)
+         av_opt_get(u->priv_data, "cookies", 0, (uint8_t**)&(c->cookies));
+         if (c->cookies && !strlen(c->cookies))
+             av_freep(&c->cookies);
++            
++        // get the previous headers & set back to null if string size is zero (kow|mitm)
++        av_freep(&c->headers);
++        av_opt_get(u->priv_data, "headers", 0, (uint8_t**)&(c->headers));
++        if (c->headers && !strlen(c->headers))
++            av_freep(&c->headers);
+     }
+     if ((ret = parse_playlist(c, s->filename, NULL, s->pb)) < 0)
+-- 
+1.8.4
index 3e6c859..d4f6f03 100644 (file)
@@ -16,7 +16,7 @@ libjpeg-turbo-1.2.0-win32.7z
 libnfs-1.6.1-win32.7z
 libshairplay-c159ca7-win32.7z
 libssh-0.5.0-1-win32.zip
-pcre-8.33-win32.zip
+pcre-8.33_1-win32.7z
 python-2.7.5-2-win32.7z
 sqlite-3.7.16.1-win32.7z
 taglib-1.8-win32.7z
index 96cf3ce..3d3b73f 100644 (file)
     <ClCompile Include="..\..\xbmc\interfaces\Builtins.cpp" />
     <ClCompile Include="..\..\xbmc\interfaces\generic\LanguageInvokerThread.cpp" />
     <ClCompile Include="..\..\xbmc\interfaces\generic\ScriptInvocationManager.cpp" />
-    <ClCompile Include="..\..\xbmc\interfaces\info\InfoBool.cpp" />
+    <ClCompile Include="..\..\xbmc\interfaces\info\InfoExpression.cpp" />
     <ClCompile Include="..\..\xbmc\interfaces\info\SkinVariable.cpp" />
     <ClCompile Include="..\..\xbmc\interfaces\json-rpc\AddonsOperations.cpp" />
     <ClCompile Include="..\..\xbmc\interfaces\json-rpc\ApplicationOperations.cpp" />
     <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\DVDVideoCodecLibMpeg2.cpp" />
     <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\DVDVideoPPFFmpeg.cpp" />
     <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\DXVA.cpp" />
+    <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\DXVAHD.cpp" />
     <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Overlay\DVDOverlayCodec.cpp" />
     <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Overlay\DVDOverlayCodecCC.cpp" />
     <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Overlay\DVDOverlayCodecFFmpeg.cpp" />
     <ClInclude Include="..\..\xbmc\interfaces\Builtins.h" />
     <ClInclude Include="..\..\xbmc\interfaces\IAnnouncer.h" />
     <ClInclude Include="..\..\xbmc\interfaces\info\InfoBool.h" />
+    <ClInclude Include="..\..\xbmc\interfaces\info\InfoExpression.h" />
     <ClInclude Include="..\..\xbmc\interfaces\info\SkinVariable.h" />
     <ClInclude Include="..\..\xbmc\interfaces\json-rpc\ApplicationOperations.h" />
     <ClInclude Include="..\..\xbmc\interfaces\json-rpc\AudioLibrary.h" />
     <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\DVDVideoCodecLibMpeg2.h" />
     <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\DVDVideoPPFFmpeg.h" />
     <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\DXVA.h" />
+    <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\DXVAHD.h" />
     <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Overlay\DVDOverlay.h" />
     <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Overlay\DVDOverlayCodec.h" />
     <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Overlay\DVDOverlayCodecCC.h" />
     </VisualStudio>
   </ProjectExtensions>
   <Import Project="$(SolutionDir)\$(ProjectFileName).targets.user" Condition="Exists('$(SolutionDir)\$(ProjectFileName).targets.user')" />
-</Project>
\ No newline at end of file
+</Project>
index d35c005..007ffb9 100644 (file)
     <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\DXVA.cpp">
       <Filter>cores\dvdplayer\DVDCodecs\Video</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\DXVAHD.cpp">
+      <Filter>cores\dvdplayer\DVDCodecs\Video</Filter>
+    </ClCompile>
     <ClCompile Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Overlay\DVDOverlayCodec.cpp">
       <Filter>cores\dvdplayer\DVDCodecs\Overlay</Filter>
     </ClCompile>
     <ClCompile Include="..\..\xbmc\input\InertialScrollingHandler.cpp">
       <Filter>input</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\xbmc\interfaces\info\InfoBool.cpp">
+    <ClCompile Include="..\..\xbmc\interfaces\info\InfoExpression.cpp">
       <Filter>interfaces\info</Filter>
     </ClCompile>
     <ClCompile Include="..\..\xbmc\guilib\GUIAction.cpp">
     <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\DXVA.h">
       <Filter>cores\dvdplayer\DVDCodecs\Video</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Video\DXVAHD.h">
+      <Filter>cores\dvdplayer\DVDCodecs\Video</Filter>
+    </ClInclude>
     <ClInclude Include="..\..\xbmc\cores\dvdplayer\DVDCodecs\Overlay\DVDOverlay.h">
       <Filter>cores\dvdplayer\DVDCodecs\Overlay</Filter>
     </ClInclude>
     <ClInclude Include="..\..\xbmc\interfaces\info\InfoBool.h">
       <Filter>interfaces\info</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\xbmc\interfaces\info\InfoExpression.h">
+      <Filter>interfaces\info</Filter>
+    </ClInclude>
     <ClInclude Include="..\..\xbmc\guilib\GUIAction.h">
       <Filter>guilib</Filter>
     </ClInclude>
       <Filter>interfaces\swig</Filter>
     </None>
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
index 4b69b38..ab1d267 100644 (file)
           <control type="toggle" />
         </setting>
       </group>
+      <group id="3">
+        <setting id="subtitles.stereoscopicdepth" type="integer" label="36545" help="36546">
+          <level>0</level>
+          <default>0</default>
+          <constraints>
+            <minimum>0</minimum>
+            <step>1</step>
+            <maximum>10</maximum>
+          </constraints>
+          <control type="spinner" format="integer" delayed="true"/>
+        </setting>
+      </group>
     </category>
     <category id="dvds" label="14087" help="36193">
       <group id="1">
           <level>2</level>
           <default>false</default>
           <dependencies>
-            <dependency type="visible" setting="audiooutput.channels" operator="!is">1</dependency>
+            <dependency type="visible">
+              <or>
+                <condition on="property" name="aesettingvisible" setting="audiooutput.channels">audiooutput.stereoupmix</condition>
+                <condition on="property" name="aesettingvisible" setting="audiooutput.passthrough">audiooutput.stereoupmix</condition>
+                <condition on="property" name="aesettingvisible" setting="audiooutput.ac3passthrough">audiooutput.stereoupmix</condition>
+              </or>    
+            </dependency>
           </dependencies>
           <control type="toggle" />
         </setting>
index 01fa7e5..1e98df0 100644 (file)
@@ -153,6 +153,11 @@ public class Helper
             ret += newline
           else if (it.name() == 'ndash')
             ret += "--"
+          else if (it.name() == 'emphasis')
+          {
+            ret += '*'
+            it.children().each handleDoc
+          }
           else
             System.out.println("WARNING: Cannot parse the following as part of the doxygen processing:" + XmlUtil.serialize(it))
         }
index effc7a1..08bfba0 100644 (file)
@@ -4351,7 +4351,7 @@ void CApplication::UpdateFileState()
             m_progressTrackingItem->GetVideoInfoTag()->m_streamDetails = details;
 
           if (m_progressTrackingItem->IsStack())
-            m_progressTrackingItem->GetVideoInfoTag()->m_streamDetails.SetVideoDuration(0, GetTotalTime()); // Overwrite with CApp's totaltime as it takes into account total stack time
+            m_progressTrackingItem->GetVideoInfoTag()->m_streamDetails.SetVideoDuration(0, (int)GetTotalTime()); // Overwrite with CApp's totaltime as it takes into account total stack time
         }
 
         // Update bookmark for save
index 2f3ad2f..3d4cd86 100644 (file)
@@ -59,6 +59,7 @@
 #include "utils/SeekHandler.h"
 #include "URL.h"
 #include "addons/Skin.h"
+#include "boost/make_shared.hpp"
 
 // stuff for current song
 #include "music/MusicInfoLoader.h"
@@ -85,6 +86,7 @@
 #include "cores/IPlayer.h"
 #include "cores/AudioEngine/Utils/AEUtil.h"
 #include "cores/VideoRenderers/BaseRenderer.h"
+#include "interfaces/info/InfoExpression.h"
 
 #if defined(TARGET_DARWIN_OSX)
 #include "osx/smc.h"
@@ -118,7 +120,6 @@ CGUIInfoManager::CGUIInfoManager(void) :
   m_currentSlide = new CFileItem;
   m_frameCounter = 0;
   m_lastFPSTime = 0;
-  m_updateTime = 1;
   m_playerShowTime = false;
   m_playerShowCodec = false;
   m_playerShowInfo = false;
@@ -798,6 +799,18 @@ void CGUIInfoManager::SplitInfoString(const CStdString &infoString, vector<Prope
 /// efficient retrieval of data.
 int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
 {
+  bool listItemDependent;
+  return TranslateSingleString(strCondition, listItemDependent);
+}
+
+int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition, bool &listItemDependent)
+{
+  /* We need to disable caching in INFO::InfoBool::Get if either of the following are true:
+   *  1. if condition is between LISTITEM_START and LISTITEM_END
+   *  2. if condition is STRING_IS_EMPTY, STRING_COMPARE, STRING_STR, INTEGER_GREATER_THAN and the
+   *     corresponding label is between LISTITEM_START and LISTITEM_END
+   *  This is achieved by setting the bool pointed at by listItemDependent, either here or in a recursive call
+   */
   // trim whitespaces
   CStdString strTest = strCondition;
   StringUtils::Trim(strTest);
@@ -816,11 +829,11 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
     else if (cat.name == "true" || cat.name == "yes" || cat.name == "on")
       return SYSTEM_ALWAYS_TRUE;
     if (cat.name == "isempty" && cat.num_params() == 1)
-      return AddMultiInfo(GUIInfo(STRING_IS_EMPTY, TranslateSingleString(cat.param())));
+      return AddMultiInfo(GUIInfo(STRING_IS_EMPTY, TranslateSingleString(cat.param(), listItemDependent)));
     else if (cat.name == "stringcompare" && cat.num_params() == 2)
     {
-      int info = TranslateSingleString(cat.param(0));
-      int info2 = TranslateSingleString(cat.param(1));
+      int info = TranslateSingleString(cat.param(0), listItemDependent);
+      int info2 = TranslateSingleString(cat.param(1), listItemDependent);
       if (info2 > 0)
         return AddMultiInfo(GUIInfo(STRING_COMPARE, info, -info2));
       // pipe our original string through the localize parsing then make it lowercase (picks up $LBRACKET etc.)
@@ -831,13 +844,13 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
     }
     else if (cat.name == "integergreaterthan" && cat.num_params() == 2)
     {
-      int info = TranslateSingleString(cat.param(0));
+      int info = TranslateSingleString(cat.param(0), listItemDependent);
       int compareInt = atoi(cat.param(1).c_str());
       return AddMultiInfo(GUIInfo(INTEGER_GREATER_THAN, info, compareInt));
     }
     else if (cat.name == "substring" && cat.num_params() >= 2)
     {
-      int info = TranslateSingleString(cat.param(0));
+      int info = TranslateSingleString(cat.param(0), listItemDependent);
       CStdString label = CGUIInfoLabel::GetLabel(cat.param(1));
       StringUtils::ToLower(label);
       int compareString = ConditionalStringParameter(label);
@@ -930,7 +943,7 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
         }
         else if (prop.name == "addontitle")
         {
-          int infoLabel = TranslateSingleString(param);
+          int infoLabel = TranslateSingleString(param, listItemDependent);
           if (infoLabel > 0)
             return AddMultiInfo(GUIInfo(SYSTEM_ADDON_TITLE, infoLabel, 0));
           CStdString label = CGUIInfoLabel::GetLabel(param);
@@ -939,7 +952,7 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
         }
         else if (prop.name == "addonicon")
         {
-          int infoLabel = TranslateSingleString(param);
+          int infoLabel = TranslateSingleString(param, listItemDependent);
           if (infoLabel > 0)
             return AddMultiInfo(GUIInfo(SYSTEM_ADDON_ICON, infoLabel, 0));
           CStdString label = CGUIInfoLabel::GetLabel(param);
@@ -948,7 +961,7 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
         }
         else if (prop.name == "addonversion")
         {
-          int infoLabel = TranslateSingleString(param);
+          int infoLabel = TranslateSingleString(param, listItemDependent);
           if (infoLabel > 0)
             return AddMultiInfo(GUIInfo(SYSTEM_ADDON_VERSION, infoLabel, 0));
           CStdString label = CGUIInfoLabel::GetLabel(param);
@@ -1087,6 +1100,8 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
     {
       int offset = atoi(cat.param().c_str());
       int ret = TranslateListItem(prop);
+      if (ret)
+        listItemDependent = true;
       if (offset)
         return AddMultiInfo(GUIInfo(ret, 0, offset, INFOFLAG_LISTITEM_WRAP));
       return ret;
@@ -1095,6 +1110,8 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
     {
       int offset = atoi(cat.param().c_str());
       int ret = TranslateListItem(prop);
+      if (ret)
+        listItemDependent = true;
       if (offset)
         return AddMultiInfo(GUIInfo(ret, 0, offset, INFOFLAG_LISTITEM_POSITION));
       return ret;
@@ -1103,6 +1120,8 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
     {
       int offset = atoi(cat.param().c_str());
       int ret = TranslateListItem(prop);
+      if (ret)
+        listItemDependent = true;
       if (offset)
         return AddMultiInfo(GUIInfo(ret, 0, offset));
       return ret;
@@ -1263,11 +1282,20 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition)
       int id = atoi(info[0].param().c_str());
       int offset = atoi(info[1].param().c_str());
       if (info[1].name == "listitemnowrap")
+      {
+        listItemDependent = true;
         return AddMultiInfo(GUIInfo(TranslateListItem(info[2]), id, offset));
+      }
       else if (info[1].name == "listitemposition")
+      {
+        listItemDependent = true;
         return AddMultiInfo(GUIInfo(TranslateListItem(info[2]), id, offset, INFOFLAG_LISTITEM_POSITION));
+      }
       else if (info[1].name == "listitem")
+      {
+        listItemDependent = true;
         return AddMultiInfo(GUIInfo(TranslateListItem(info[2]), id, offset, INFOFLAG_LISTITEM_WRAP));
+      }
     }
   }
 
@@ -2122,65 +2150,46 @@ bool CGUIInfoManager::GetInt(int &value, int info, int contextWindow, const CGUI
   return false;
 }
 
-unsigned int CGUIInfoManager::Register(const CStdString &expression, int context)
+// functor for comparison InfoPtr's
+struct InfoBoolFinder
+{
+  InfoBoolFinder(const std::string &expression, int context) : m_bool(expression, context) {};
+  bool operator() (const InfoPtr &right) const { return m_bool == *right; };
+  InfoBool m_bool;
+};
+
+INFO::InfoPtr CGUIInfoManager::Register(const CStdString &expression, int context)
 {
   CStdString condition(CGUIInfoLabel::ReplaceLocalize(expression));
   StringUtils::Trim(condition);
+  StringUtils::ToLower(condition);
 
   if (condition.empty())
-    return 0;
+    return INFO::InfoPtr();
 
   CSingleLock lock(m_critInfo);
   // do we have the boolean expression already registered?
-  InfoBool test(condition, context);
-  for (unsigned int i = 0; i < m_bools.size(); ++i)
-  {
-    if (*m_bools[i] == test)
-      return i+1;
-  }
+  vector<InfoPtr>::const_iterator i = find_if(m_bools.begin(), m_bools.end(), InfoBoolFinder(condition, context));
+  if (i != m_bools.end())
+    return *i;
 
   if (condition.find_first_of("|+[]!") != condition.npos)
-    m_bools.push_back(new InfoExpression(condition, context));
+    m_bools.push_back(boost::make_shared<InfoExpression>(condition, context));
   else
-    m_bools.push_back(new InfoSingle(condition, context));
+    m_bools.push_back(boost::make_shared<InfoSingle>(condition, context));
 
-  return m_bools.size();
+  return m_bools.back();
 }
 
 bool CGUIInfoManager::EvaluateBool(const CStdString &expression, int contextWindow)
 {
   bool result = false;
-  unsigned int info = Register(expression, contextWindow);
+  INFO::InfoPtr info = Register(expression, contextWindow);
   if (info)
-    result = GetBoolValue(info);
+    result = info->Get();
   return result;
 }
 
-/*
- TODO: what to do with item-based infobools...
- these crop up:
- 1. if condition is between LISTITEM_START and LISTITEM_END
- 2. if condition is STRING_IS_EMPTY, STRING_COMPARE, STRING_STR, INTEGER_GREATER_THAN and the
-    corresponding label is between LISTITEM_START and LISTITEM_END
-
- In both cases they shouldn't be in our cache as they depend on items outside of our control atm.
-
- We only pass a listitem object in for controls inside a listitemlayout, so I think it's probably OK
- to not cache these, as they're "pushed" out anyway.
-
- The problem is how do we avoid these?  The only thing we have to go on is the expression here, so I
- guess what we have to do is call through via Update.  One thing we don't handle, however, is that the
- majority of conditions (even inside lists) don't depend on the listitem at all.
-
- Advantage is that we know this at creation time I think, so could perhaps signal it in IsDirty()?
- */
-bool CGUIInfoManager::GetBoolValue(unsigned int expression, const CGUIListItem *item)
-{
-  if (expression && --expression < m_bools.size())
-    return m_bools[expression]->Get(m_updateTime, item);
-  return false;
-}
-
 // checks the condition and returns it as necessary.  Currently used
 // for toggle button controls and visibility of images.
 bool CGUIInfoManager::GetBool(int condition1, int contextWindow, const CGUIListItem *item)
@@ -4233,11 +4242,22 @@ bool CGUIInfoManager::GetDisplayAfterSeek()
 void CGUIInfoManager::Clear()
 {
   CSingleLock lock(m_critInfo);
-  for (unsigned int i = 0; i < m_bools.size(); ++i)
-    delete m_bools[i];
-  m_bools.clear();
-
   m_skinVariableStrings.clear();
+
+  /*
+    Erase any info bools that are unused. We do this repeatedly as each run
+    will remove those bools that are no longer dependencies of other bools
+    in the vector.
+   */
+  vector<InfoPtr>::iterator i = remove_if(m_bools.begin(), m_bools.end(), std::mem_fun_ref(&InfoPtr::unique));
+  while (i != m_bools.end())
+  {
+    m_bools.erase(i, m_bools.end());
+    i = remove_if(m_bools.begin(), m_bools.end(), std::mem_fun_ref(&InfoPtr::unique));
+  }
+  // log which ones are used - they should all be gone by now
+  for (vector<InfoPtr>::const_iterator i = m_bools.begin(); i != m_bools.end(); ++i)
+    CLog::Log(LOGDEBUG, "Infobool '%s' still used by %u instances", (*i)->GetExpression().c_str(), (unsigned int) i->use_count());
 }
 
 void CGUIInfoManager::UpdateFPS()
@@ -5182,7 +5202,10 @@ void CGUIInfoManager::ResetCache()
 {
   // reset any animation triggers as well
   m_containerMoves.clear();
-  m_updateTime++;
+  // mark our infobools as dirty
+  CSingleLock lock(m_critInfo);
+  for (vector<InfoPtr>::iterator i = m_bools.begin(); i != m_bools.end(); ++i)
+    (*i)->SetDirty();
 }
 
 // Called from tuxbox service thread to update current status
@@ -5502,11 +5525,11 @@ CStdString CGUIInfoManager::GetSkinVariableString(int info,
   return "";
 }
 
-bool CGUIInfoManager::ConditionsChangedValues(const std::map<int, bool>& map)
+bool CGUIInfoManager::ConditionsChangedValues(const std::map<INFO::InfoPtr, bool>& map)
 {
-  for (std::map<int, bool>::const_iterator it = map.begin() ; it != map.end() ; it++)
+  for (std::map<INFO::InfoPtr, bool>::const_iterator it = map.begin() ; it != map.end() ; it++)
   {
-    if (GetBoolValue(it->first) != it->second)
+    if (it->first->Get() != it->second)
       return true;
   }
   return false;
index ab9a461..1c1e34c 100644 (file)
@@ -32,6 +32,7 @@
 #include "inttypes.h"
 #include "XBDateTime.h"
 #include "utils/Observer.h"
+#include "interfaces/info/InfoBool.h"
 #include "interfaces/info/SkinVariable.h"
 #include "cores/IPlayer.h"
 
@@ -48,7 +49,6 @@ class CGUIListItem;
 class CDateTime;
 namespace INFO
 {
-  class InfoBool;
   class InfoSingle;
 }
 
@@ -723,22 +723,14 @@ public:
    \param expression the boolean condition or expression
    \param context the context window
    \return an identifier used to reference this expression
-
-   \sa GetBoolValue
    */
-  unsigned int Register(const CStdString &expression, int context = 0);
-
-  /*! \brief Get a previously registered boolean expression's value
-   Checks the cache and evaluates the boolean expression if required.
-   \sa Register
-   */
-  bool GetBoolValue(unsigned int expression, const CGUIListItem *item = NULL);
+  INFO::InfoPtr Register(const CStdString &expression, int context = 0);
 
   /*! \brief Evaluate a boolean expression
    \param expression the expression to evaluate
    \param context the context in which to evaluate the expression (currently windows)
    \return the value of the evaluated expression.
-   \sa Register, GetBoolValue
+   \sa Register
    */
   bool EvaluateBool(const CStdString &expression, int context = 0);
 
@@ -845,13 +837,14 @@ public:
   CStdString GetSkinVariableString(int info, bool preferImage = false, const CGUIListItem *item=NULL);
 
   /// \brief iterates through boolean conditions and compares their stored values to current values. Returns true if any condition changed value.
-  bool ConditionsChangedValues(const std::map<int, bool>& map);
+  bool ConditionsChangedValues(const std::map<INFO::InfoPtr, bool>& map);
 
   bool m_AVInfoValid;
 
 protected:
   friend class INFO::InfoSingle;
   bool GetBool(int condition, int contextWindow = 0, const CGUIListItem *item=NULL);
+  int TranslateSingleString(const CStdString &strCondition, bool &listItemDependent);
 
   // routines for window retrieval
   bool CheckWindowCondition(CGUIWindow *window, int condition) const;
@@ -942,9 +935,8 @@ protected:
   int m_nextWindowID;
   int m_prevWindowID;
 
-  std::vector<INFO::InfoBool*> m_bools;
+  std::vector<INFO::InfoPtr> m_bools;
   std::vector<INFO::CSkinVariableString> m_skinVariableStrings;
-  unsigned int m_updateTime;
 
   int m_libraryHasMusic;
   int m_libraryHasMovies;
index 770fc21..690c565 100644 (file)
@@ -195,7 +195,7 @@ void CSkinInfo::LoadIncludes()
   m_includes.LoadIncludes(includesPath);
 }
 
-void CSkinInfo::ResolveIncludes(TiXmlElement *node, std::map<int, bool>* xmlIncludeConditions /* = NULL */)
+void CSkinInfo::ResolveIncludes(TiXmlElement *node, std::map<INFO::InfoPtr, bool>* xmlIncludeConditions /* = NULL */)
 {
   if(xmlIncludeConditions)
     xmlIncludeConditions->clear();
index 218a0b7..aa1635f 100644 (file)
@@ -95,7 +95,7 @@ public:
    */
   static bool TranslateResolution(const CStdString &name, RESOLUTION_INFO &res);
 
-  void ResolveIncludes(TiXmlElement *node, std::map<int, bool>* xmlIncludeConditions = NULL);
+  void ResolveIncludes(TiXmlElement *node, std::map<INFO::InfoPtr, bool>* xmlIncludeConditions = NULL);
 
   float GetEffectsSlowdown() const { return m_effectsSlowDown; };
 
index a3a6164..c977c37 100644 (file)
@@ -865,6 +865,14 @@ void CActiveAE::Configure(AEAudioFormat *desiredFmt)
     initSink = true;
     m_stats.Reset(m_sinkFormat.m_sampleRate);
     m_sink.m_controlPort.SendOutMessage(CSinkControlProtocol::VOLUME, &m_volume, sizeof(float));
+
+    // limit buffer size in case of sink returns large buffer
+    unsigned int buffertime = (m_sinkFormat.m_frames*1000) / m_sinkFormat.m_sampleRate;
+    if (buffertime > 80)
+    {
+      CLog::Log(LOGWARNING, "ActiveAE::%s - sink returned large buffer of %d ms, reducing to 80 ms", __FUNCTION__, buffertime);
+      m_sinkFormat.m_frames = 80 * m_sinkFormat.m_sampleRate / 1000;
+    }
   }
 
   if (m_silenceBuffers)
@@ -877,8 +885,6 @@ void CActiveAE::Configure(AEAudioFormat *desiredFmt)
   if (m_streams.empty())
   {
     inputFormat = m_sinkFormat;
-    inputFormat.m_channelLayout = m_sinkRequestFormat.m_channelLayout;
-    inputFormat.m_channelLayout.ResolveChannels(m_sinkFormat.m_channelLayout);
     inputFormat.m_dataFormat = AE_FMT_FLOAT;
     inputFormat.m_frameSize = inputFormat.m_channelLayout.Count() *
                               (CAEUtil::DataFormatToBits(inputFormat.m_dataFormat) >> 3);
@@ -967,8 +973,6 @@ void CActiveAE::Configure(AEAudioFormat *desiredFmt)
     else
     {
       outputFormat = m_sinkFormat;
-      outputFormat.m_channelLayout = m_sinkRequestFormat.m_channelLayout;
-      outputFormat.m_channelLayout.ResolveChannels(m_sinkFormat.m_channelLayout);
       outputFormat.m_dataFormat = AE_FMT_FLOAT;
       outputFormat.m_frameSize = outputFormat.m_channelLayout.Count() *
                                  (CAEUtil::DataFormatToBits(outputFormat.m_dataFormat) >> 3);
@@ -997,6 +1001,7 @@ void CActiveAE::Configure(AEAudioFormat *desiredFmt)
         // create buffer pool
         (*it)->m_inputBuffers = new CActiveAEBufferPool((*it)->m_format);
         (*it)->m_inputBuffers->Create(MAX_CACHE_LEVEL*1000);
+        (*it)->m_streamSpace = (*it)->m_format.m_frameSize * (*it)->m_format.m_frames;
       }
       if (initSink && (*it)->m_resampleBuffers)
       {
@@ -1325,7 +1330,7 @@ void CActiveAE::ApplySettingsToFormat(AEAudioFormat &format, AudioSettings &sett
       if (m_settings.config == AE_CONFIG_FIXED || (settings.stereoupmix && format.m_channelLayout.Count() <= 2))
         format.m_channelLayout = stdLayout;
       else
-        format.m_channelLayout.ResolveChannels(stdLayout);;
+        format.m_channelLayout.ResolveChannels(stdLayout);
     }
     // don't change from multi to stereo in AUTO mode
     else if ((settings.config == AE_CONFIG_AUTO) &&
@@ -1999,7 +2004,7 @@ void CActiveAE::LoadSettings()
   m_settings.channels = (m_sink.GetDeviceType(m_settings.device) == AE_DEVTYPE_IEC958) ? AE_CH_LAYOUT_2_0 : CSettings::Get().GetInt("audiooutput.channels");
   m_settings.samplerate = CSettings::Get().GetInt("audiooutput.samplerate");
 
-  m_settings.stereoupmix = (m_settings.channels > AE_CH_LAYOUT_2_0) ? CSettings::Get().GetBool("audiooutput.stereoupmix") : false;
+  m_settings.stereoupmix = IsSettingVisible("audiooutput.stereoupmix") ? CSettings::Get().GetBool("audiooutput.stereoupmix") : false;
   m_settings.normalizelevels = CSettings::Get().GetBool("audiooutput.normalizelevels");
 
   m_settings.passthrough = m_settings.config == AE_CONFIG_FIXED ? false : CSettings::Get().GetBool("audiooutput.passthrough");
@@ -2146,6 +2151,21 @@ bool CActiveAE::IsSettingVisible(const std::string &settingId)
         m_sink.GetDeviceType(CSettings::Get().GetString("audiooutput.passthroughdevice")) == AE_DEVTYPE_HDMI)
       return true;
   }
+  else if (settingId == "audiooutput.stereoupmix")
+  {
+    if (m_sink.GetDeviceType(CSettings::Get().GetString("audiooutput.audiodevice")) != AE_DEVTYPE_IEC958)
+    {
+      if (CSettings::Get().GetInt("audiooutput.channels") > AE_CH_LAYOUT_2_0)
+        return true;
+    }
+    else
+    {
+      if (m_sink.HasPassthroughDevice() &&
+          CSettings::Get().GetBool("audiooutput.passthrough") &&
+          CSettings::Get().GetBool("audiooutput.ac3passthrough"))
+        return true;
+    }
+  }
   return false;
 }
 
index d57dd5a..71458ee 100644 (file)
@@ -530,6 +530,11 @@ bool CCoreAudioAE::IsSettingVisible(const std::string &settingId)
     else
       return false;
   }
+  else if (settingId == "audiooutput.stereoupmix")
+  {
+    if (CSettings::Get().GetInt("audiooutput.channels") > AE_CH_LAYOUT_2_0)
+      return true;
+  }
 
   return true;
 }
index 4f63535..f1e5401 100644 (file)
@@ -45,12 +45,24 @@ static enum AEChannel ALSAChannelMap[ALSA_MAX_CHANNELS + 1] = {
   AE_CH_NULL
 };
 
-static enum AEChannel ALSAChannelMapWide[ALSA_MAX_CHANNELS + 1] = {
+static enum AEChannel ALSAChannelMap51Wide[ALSA_MAX_CHANNELS + 1] = {
   AE_CH_FL      , AE_CH_FR      , AE_CH_SL      , AE_CH_SR      , AE_CH_FC      , AE_CH_LFE     , AE_CH_BL      , AE_CH_BR      ,
   AE_CH_UNKNOWN1, AE_CH_UNKNOWN2, AE_CH_UNKNOWN3, AE_CH_UNKNOWN4, AE_CH_UNKNOWN5, AE_CH_UNKNOWN6, AE_CH_UNKNOWN7, AE_CH_UNKNOWN8, /* for p16v devices */
   AE_CH_NULL
 };
 
+static enum AEChannel ALSAChannelMap71Wide[ALSA_MAX_CHANNELS + 1] = {
+  AE_CH_FLOC    , AE_CH_FROC    , AE_CH_BL      , AE_CH_BR      , AE_CH_FC      , AE_CH_LFE     , AE_CH_FL        , AE_CH_FR        ,
+  AE_CH_UNKNOWN1, AE_CH_UNKNOWN2, AE_CH_UNKNOWN3, AE_CH_UNKNOWN4, AE_CH_UNKNOWN5, AE_CH_UNKNOWN6, AE_CH_UNKNOWN7, AE_CH_UNKNOWN8, /* for p16v devices */
+  AE_CH_NULL
+};
+
+static enum AEChannel ALSAChannelMapPassthrough[ALSA_MAX_CHANNELS + 1] = {
+  AE_CH_RAW     , AE_CH_RAW     , AE_CH_RAW     , AE_CH_RAW     , AE_CH_RAW     , AE_CH_RAW     , AE_CH_RAW      , AE_CH_RAW      ,
+  AE_CH_UNKNOWN1, AE_CH_UNKNOWN2, AE_CH_UNKNOWN3, AE_CH_UNKNOWN4, AE_CH_UNKNOWN5, AE_CH_UNKNOWN6, AE_CH_UNKNOWN7, AE_CH_UNKNOWN8, /* for p16v devices */
+  AE_CH_NULL
+};
+
 static unsigned int ALSASampleRateList[] =
 {
   5512,
@@ -87,25 +99,37 @@ CAESinkALSA::~CAESinkALSA()
   Deinitialize();
 }
 
-inline CAEChannelInfo CAESinkALSA::GetChannelLayout(AEAudioFormat format)
+inline CAEChannelInfo CAESinkALSA::GetChannelLayout(AEAudioFormat format, unsigned int maxChannels)
 {
+  enum AEChannel* channelMap = ALSAChannelMap;
   unsigned int count = 0;
 
-       if (format.m_dataFormat == AE_FMT_AC3 ||
-           format.m_dataFormat == AE_FMT_DTS ||
-           format.m_dataFormat == AE_FMT_EAC3)
-           count = 2;
+  if (format.m_dataFormat == AE_FMT_AC3 ||
+      format.m_dataFormat == AE_FMT_DTS ||
+      format.m_dataFormat == AE_FMT_EAC3)
+  {
+    count = 2;
+    channelMap = ALSAChannelMapPassthrough;
+  }
   else if (format.m_dataFormat == AE_FMT_TRUEHD ||
            format.m_dataFormat == AE_FMT_DTSHD)
-           count = 8;
+  {
+    count = 8;
+    channelMap = ALSAChannelMapPassthrough;
+  }
   else
   {
     // According to CEA-861-D only RL and RR are known. In case of a format having SL and SR channels
     // but no BR BL channels, we use the wide map in order to open only the num of channels really
     // needed.
-    enum AEChannel* channelMap = ALSAChannelMap;
     if (format.m_channelLayout.HasChannel(AE_CH_SL) && !format.m_channelLayout.HasChannel(AE_CH_BL))
-      channelMap = ALSAChannelMapWide;
+    {
+      channelMap = ALSAChannelMap51Wide;
+    }
+    else if (maxChannels >= 8 && format.m_channelLayout.HasChannel(AE_CH_FLOC) && !format.m_channelLayout.HasChannel(AE_CH_SL))
+    {
+      channelMap = ALSAChannelMap71Wide;
+    }
     for (unsigned int c = 0; c < 8; ++c)
       for (unsigned int i = 0; i < format.m_channelLayout.Count(); ++i)
         if (format.m_channelLayout[i] == channelMap[c])
@@ -116,8 +140,12 @@ inline CAEChannelInfo CAESinkALSA::GetChannelLayout(AEAudioFormat format)
   }
 
   CAEChannelInfo info;
-  for (unsigned int i = 0; i < count; ++i)
-    info += ALSAChannelMap[i];
+  for (unsigned int i = 0; i < count && i < maxChannels+1; ++i)
+    info += channelMap[i];
+
+  CLog::Log(LOGDEBUG, "CAESinkALSA::GetChannelLayout - Input Channel Count: %d Output Channel Count: %d", format.m_channelLayout.Count(), count);
+  CLog::Log(LOGDEBUG, "CAESinkALSA::GetChannelLayout - Requested Layout: %s", std::string(format.m_channelLayout).c_str());
+  CLog::Log(LOGDEBUG, "CAESinkALSA::GetChannelLayout - Got Layout: %s", std::string(info).c_str());
 
   return info;
 }
@@ -143,20 +171,22 @@ void CAESinkALSA::GetAESParams(AEAudioFormat format, std::string& params)
 
 bool CAESinkALSA::Initialize(AEAudioFormat &format, std::string &device)
 {
-  CAEChannelInfo channelLayout;
+  CAEChannelInfo channelLayout = GetChannelLayout(format, 8);
   m_initDevice = device;
   m_initFormat = format;
+  ALSAConfig inconfig, outconfig;
+  inconfig.format = format.m_dataFormat;
+  inconfig.sampleRate = format.m_sampleRate;
+  inconfig.channels = channelLayout.Count();
 
   /* if we are raw, correct the data format */
   if (AE_IS_RAW(format.m_dataFormat))
   {
-    channelLayout     = GetChannelLayout(format);
-    format.m_dataFormat = AE_FMT_S16NE;
-    m_passthrough       = true;
+    inconfig.format   = AE_FMT_S16NE;
+    m_passthrough     = true;
   }
   else
   {
-    channelLayout = GetChannelLayout(format);
     m_passthrough   = false;
   }
 #if defined(HAS_LIBAMCODEC)
@@ -167,14 +197,12 @@ bool CAESinkALSA::Initialize(AEAudioFormat &format, std::string &device)
   }
 #endif
 
-  if (channelLayout.Count() == 0)
+  if (inconfig.channels == 0)
   {
     CLog::Log(LOGERROR, "CAESinkALSA::Initialize - Unable to open the requested channel layout");
     return false;
   }
 
-  format.m_channelLayout = channelLayout;
-
   AEDeviceType devType = AEDeviceTypeFromName(device);
 
   std::string AESParams;
@@ -189,7 +217,7 @@ bool CAESinkALSA::Initialize(AEAudioFormat &format, std::string &device)
   snd_config_t *config;
   snd_config_copy(&config, snd_config);
 
-  if (!OpenPCMDevice(device, AESParams, channelLayout.Count(), &m_pcm, config))
+  if (!OpenPCMDevice(device, AESParams, inconfig.channels, &m_pcm, config))
   {
     CLog::Log(LOGERROR, "CAESinkALSA::Initialize - failed to initialize device \"%s\"", device.c_str());
     snd_config_delete(config);
@@ -205,13 +233,26 @@ bool CAESinkALSA::Initialize(AEAudioFormat &format, std::string &device)
   /* free the sound config */
   snd_config_delete(config);
 
-  if (!InitializeHW(format) || !InitializeSW(format))
+  if (!InitializeHW(inconfig, outconfig) || !InitializeSW(outconfig))
     return false;
 
   // we want it blocking
   snd_pcm_nonblock(m_pcm, 0);
   snd_pcm_prepare (m_pcm);
 
+  if (m_passthrough && inconfig.channels != outconfig.channels)
+  {
+    CLog::Log(LOGINFO, "CAESinkALSA::Initialize - could not open required number of channels");
+    return false;
+  }
+  // adjust format to the configuration we got
+  format.m_channelLayout = GetChannelLayout(format, outconfig.channels);
+  format.m_sampleRate = outconfig.sampleRate;
+  format.m_frames = outconfig.periodSize;
+  format.m_frameSize = outconfig.frameSize;
+  format.m_frameSamples = outconfig.periodSize * outconfig.channels;
+  format.m_dataFormat = outconfig.format;
+
   m_format              = format;
   m_formatSampleRateMul = 1.0 / (double)m_format.m_sampleRate;
 
@@ -255,7 +296,7 @@ snd_pcm_format_t CAESinkALSA::AEFormatToALSAFormat(const enum AEDataFormat forma
   }
 }
 
-bool CAESinkALSA::InitializeHW(AEAudioFormat &format)
+bool CAESinkALSA::InitializeHW(const ALSAConfig &inconfig, ALSAConfig &outconfig)
 {
   snd_pcm_hw_params_t *hw_params;
 
@@ -265,35 +306,35 @@ bool CAESinkALSA::InitializeHW(AEAudioFormat &format)
   snd_pcm_hw_params_any(m_pcm, hw_params);
   snd_pcm_hw_params_set_access(m_pcm, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED);
 
-  unsigned int sampleRate   = format.m_sampleRate;
-  unsigned int channelCount = format.m_channelLayout.Count();
+  unsigned int sampleRate   = inconfig.sampleRate;
+  unsigned int channelCount = inconfig.channels;
   snd_pcm_hw_params_set_rate_near    (m_pcm, hw_params, &sampleRate, NULL);
   snd_pcm_hw_params_set_channels_near(m_pcm, hw_params, &channelCount);
 
   /* ensure we opened X channels or more */
-  if (format.m_channelLayout.Count() > channelCount)
+  if (inconfig.channels > channelCount)
   {
     CLog::Log(LOGINFO, "CAESinkALSA::InitializeHW - Unable to open the required number of channels");
   }
 
-  /* update the channelLayout to what we managed to open */
-  format.m_channelLayout.Reset();
-  for (unsigned int i = 0; i < channelCount; ++i)
-    format.m_channelLayout += ALSAChannelMap[i];
+  /* update outconfig */
+  outconfig.channels = channelCount;
+
+  snd_pcm_format_t fmt = AEFormatToALSAFormat(inconfig.format);
+  outconfig.format = inconfig.format;
 
-  snd_pcm_format_t fmt = AEFormatToALSAFormat(format.m_dataFormat);
   if (fmt == SND_PCM_FORMAT_UNKNOWN)
   {
     /* if we dont support the requested format, fallback to float */
-    format.m_dataFormat = AE_FMT_FLOAT;
-    fmt                 = SND_PCM_FORMAT_FLOAT;
+    fmt = SND_PCM_FORMAT_FLOAT;
+    outconfig.format = AE_FMT_FLOAT;
   }
 
   /* try the data format */
   if (snd_pcm_hw_params_set_format(m_pcm, hw_params, fmt) < 0)
   {
     /* if the chosen format is not supported, try each one in decending order */
-    CLog::Log(LOGINFO, "CAESinkALSA::InitializeHW - Your hardware does not support %s, trying other formats", CAEUtil::DataFormatToStr(format.m_dataFormat));
+    CLog::Log(LOGINFO, "CAESinkALSA::InitializeHW - Your hardware does not support %s, trying other formats", CAEUtil::DataFormatToStr(outconfig.format));
     for (enum AEDataFormat i = AE_FMT_MAX; i > AE_FMT_INVALID; i = (enum AEDataFormat)((int)i - 1))
     {
       if (AE_IS_RAW(i) || i == AE_FMT_MAX)
@@ -322,8 +363,8 @@ bool CAESinkALSA::InitializeHW(AEAudioFormat &format)
       }
 
       /* record that the format fell back to X */
-      format.m_dataFormat = i;
-      CLog::Log(LOGINFO, "CAESinkALSA::InitializeHW - Using data format %s", CAEUtil::DataFormatToStr(format.m_dataFormat));
+      outconfig.format = i;
+      CLog::Log(LOGINFO, "CAESinkALSA::InitializeHW - Using data format %s", CAEUtil::DataFormatToStr(outconfig.format));
       break;
     }
 
@@ -418,10 +459,9 @@ bool CAESinkALSA::InitializeHW(AEAudioFormat &format)
   CLog::Log(LOGDEBUG, "CAESinkALSA::InitializeHW - Got: periodSize %lu, bufferSize %lu", periodSize, bufferSize);
 
   /* set the format parameters */
-  format.m_sampleRate   = sampleRate;
-  format.m_frames       = periodSize;
-  format.m_frameSamples = periodSize * format.m_channelLayout.Count();
-  format.m_frameSize    = snd_pcm_frames_to_bytes(m_pcm, 1);
+  outconfig.sampleRate   = sampleRate;
+  outconfig.periodSize   = periodSize;
+  outconfig.frameSize    = snd_pcm_frames_to_bytes(m_pcm, 1);
 
   m_bufferSize = (unsigned int)bufferSize;
   m_timeout    = std::ceil((double)(bufferSize * 1000) / (double)sampleRate);
@@ -431,7 +471,7 @@ bool CAESinkALSA::InitializeHW(AEAudioFormat &format)
   return true;
 }
 
-bool CAESinkALSA::InitializeSW(AEAudioFormat &format)
+bool CAESinkALSA::InitializeSW(const ALSAConfig &inconfig)
 {
   snd_pcm_sw_params_t *sw_params;
   snd_pcm_uframes_t boundary;
@@ -444,7 +484,7 @@ bool CAESinkALSA::InitializeSW(AEAudioFormat &format)
   snd_pcm_sw_params_set_silence_threshold(m_pcm, sw_params, 0);
   snd_pcm_sw_params_get_boundary         (sw_params, &boundary);
   snd_pcm_sw_params_set_silence_size     (m_pcm, sw_params, boundary);
-  snd_pcm_sw_params_set_avail_min        (m_pcm, sw_params, format.m_frames);
+  snd_pcm_sw_params_set_avail_min        (m_pcm, sw_params, inconfig.periodSize);
 
   if (snd_pcm_sw_params(m_pcm, sw_params) < 0)
   {
index d920fdb..2fafacc 100644 (file)
@@ -52,7 +52,7 @@ public:
 
   static void EnumerateDevicesEx(AEDeviceInfoList &list, bool force = false);
 private:
-  CAEChannelInfo GetChannelLayout(AEAudioFormat format);
+  CAEChannelInfo GetChannelLayout(AEAudioFormat format, unsigned int maxChannels);
   void           GetAESParams(const AEAudioFormat format, std::string& params);
   void           HandleError(const char* name, int err);
 
@@ -66,10 +66,19 @@ private:
   snd_pcm_t        *m_pcm;
   int               m_timeout;
 
+  struct ALSAConfig
+  {
+    unsigned int sampleRate;
+    unsigned int periodSize;
+    unsigned int frameSize;
+    unsigned int channels;
+    AEDataFormat format;
+  };
+
   static snd_pcm_format_t AEFormatToALSAFormat(const enum AEDataFormat format);
 
-  bool InitializeHW(AEAudioFormat &format);
-  bool InitializeSW(AEAudioFormat &format);
+  bool InitializeHW(const ALSAConfig &inconfig, ALSAConfig &outconfig);
+  bool InitializeSW(const ALSAConfig &inconfig);
 
   static void AppendParams(std::string &device, const std::string &params);
   static bool TryDevice(const std::string &name, snd_pcm_t **pcmp, snd_config_t *lconf);
index 2e774b4..6619e5f 100644 (file)
@@ -1017,9 +1017,18 @@ bool CAESinkWASAPI::InitializeExclusive(AEAudioFormat &format)
 {
   WAVEFORMATEXTENSIBLE_IEC61937 wfxex_iec61937;
   WAVEFORMATEXTENSIBLE &wfxex = wfxex_iec61937.FormatExt;
+  bool obsolete71Wide = false;
 
   if (format.m_dataFormat <= AE_FMT_FLOAT)
+  {
     BuildWaveFormatExtensible(format, wfxex);
+    // handle obsolete 7.1 wide
+    if (wfxex.dwChannelMask == KSAUDIO_SPEAKER_7POINT1)
+    {
+      obsolete71Wide = true;
+      wfxex.dwChannelMask = KSAUDIO_SPEAKER_7POINT1_SURROUND;
+    }
+  }
   else
     BuildWaveFormatExtensibleIEC61397(format, wfxex_iec61937);
 
@@ -1060,51 +1069,72 @@ bool CAESinkWASAPI::InitializeExclusive(AEAudioFormat &format)
   CLog::Log(LOGERROR, __FUNCTION__": IsFormatSupported failed (%s) - trying to find a compatible format", WASAPIErrToStr(hr));
 
   int closestMatch;
+  unsigned int requestedChannels = wfxex.Format.nChannels;
+  unsigned int noOfCh;
 
   /* The requested format is not supported by the device.  Find something that works */
-  for (int j = 0; j < sizeof(testFormats)/sizeof(sampleFormat); j++)
+  for (int layout = -1; layout <= (int)ARRAYSIZE(layoutsList); layout++)
   {
-    closestMatch = -1;
-
-    wfxex.Format.wFormatTag           = WAVE_FORMAT_EXTENSIBLE;
-    wfxex.SubFormat                   = testFormats[j].subFormat;
-    wfxex.Format.wBitsPerSample       = testFormats[j].bitsPerSample;
-    wfxex.Samples.wValidBitsPerSample = testFormats[j].validBitsPerSample;
-    wfxex.Format.nBlockAlign          = wfxex.Format.nChannels * (wfxex.Format.wBitsPerSample >> 3);
+    // if requested layout is not suppported, try standard layouts with at least
+    // the number of channels as requested
+    // as the last resort try stereo
+    if (layout == ARRAYSIZE(layoutsList))
+    {
+      wfxex.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT;
+      wfxex.Format.nChannels = 2;
+    }
+    else if (layout >= 0)
+    {
+      wfxex.dwChannelMask = ChLayoutToChMask(layoutsList[layout], &noOfCh);
+      wfxex.Format.nChannels = noOfCh;
+      if (noOfCh < requestedChannels)
+        continue;
+    }
 
-    for (int i = 0 ; i < WASAPISampleRateCount; i++)
+    for (int j = 0; j < sizeof(testFormats)/sizeof(sampleFormat); j++)
     {
-      wfxex.Format.nSamplesPerSec    = WASAPISampleRates[i];
-      wfxex.Format.nAvgBytesPerSec   = wfxex.Format.nSamplesPerSec * wfxex.Format.nBlockAlign;
-
-      /* Trace format match iteration loop via log */
-      #if 0
-      CLog::Log(LOGDEBUG, "WASAPI: Trying Format: %s, %d, %d, %d", CAEUtil::DataFormatToStr(testFormats[j].subFormatType),
-                                                                   wfxex.Format.nSamplesPerSec,
-                                                                   wfxex.Format.wBitsPerSample,
-                                                                   wfxex.Samples.wValidBitsPerSample);
-      #endif
+      closestMatch = -1;
 
-      hr = m_pAudioClient->IsFormatSupported(AUDCLNT_SHAREMODE_EXCLUSIVE, &wfxex.Format, NULL);
+      wfxex.Format.wFormatTag           = WAVE_FORMAT_EXTENSIBLE;
+      wfxex.SubFormat                   = testFormats[j].subFormat;
+      wfxex.Format.wBitsPerSample       = testFormats[j].bitsPerSample;
+      wfxex.Samples.wValidBitsPerSample = testFormats[j].validBitsPerSample;
+      wfxex.Format.nBlockAlign          = wfxex.Format.nChannels * (wfxex.Format.wBitsPerSample >> 3);
 
-      if (SUCCEEDED(hr))
+      for (int i = 0 ; i < WASAPISampleRateCount; i++)
       {
-        /* If the current sample rate matches the source then stop looking and use it */
-        if ((WASAPISampleRates[i] == format.m_sampleRate) && (testFormats[j].subFormatType <= format.m_dataFormat))
-          goto initialize;
-        /* If this rate is closer to the source then the previous one, save it */
-        else if (closestMatch < 0 || abs((int)WASAPISampleRates[i] - (int)format.m_sampleRate) < abs((int)WASAPISampleRates[closestMatch] - (int)format.m_sampleRate))
-          closestMatch = i;
-      }
-      else if (hr != AUDCLNT_E_UNSUPPORTED_FORMAT)
+        wfxex.Format.nSamplesPerSec    = WASAPISampleRates[i];
+        wfxex.Format.nAvgBytesPerSec   = wfxex.Format.nSamplesPerSec * wfxex.Format.nBlockAlign;
+
+        /* Trace format match iteration loop via log */
+#if 0
+        CLog::Log(LOGDEBUG, "WASAPI: Trying Format: %s, %d, %d, %d", CAEUtil::DataFormatToStr(testFormats[j].subFormatType),
+          wfxex.Format.nSamplesPerSec,
+          wfxex.Format.wBitsPerSample,
+          wfxex.Samples.wValidBitsPerSample);
+#endif
+
+        hr = m_pAudioClient->IsFormatSupported(AUDCLNT_SHAREMODE_EXCLUSIVE, &wfxex.Format, NULL);
+
+        if (SUCCEEDED(hr))
+        {
+          /* If the current sample rate matches the source then stop looking and use it */
+          if ((WASAPISampleRates[i] == format.m_sampleRate) && (testFormats[j].subFormatType <= format.m_dataFormat))
+            goto initialize;
+          /* If this rate is closer to the source then the previous one, save it */
+          else if (closestMatch < 0 || abs((int)WASAPISampleRates[i] - (int)format.m_sampleRate) < abs((int)WASAPISampleRates[closestMatch] - (int)format.m_sampleRate))
+            closestMatch = i;
+        }
+        else if (hr != AUDCLNT_E_UNSUPPORTED_FORMAT)
           CLog::Log(LOGERROR, __FUNCTION__": IsFormatSupported failed (%s)", WASAPIErrToStr(hr));
-    }
+      }
 
-    if (closestMatch >= 0)
-    {
-      wfxex.Format.nSamplesPerSec    = WASAPISampleRates[closestMatch];
-      wfxex.Format.nAvgBytesPerSec   = wfxex.Format.nSamplesPerSec * wfxex.Format.nBlockAlign;
-      goto initialize;
+      if (closestMatch >= 0)
+      {
+        wfxex.Format.nSamplesPerSec    = WASAPISampleRates[closestMatch];
+        wfxex.Format.nAvgBytesPerSec   = wfxex.Format.nSamplesPerSec * wfxex.Format.nBlockAlign;
+        goto initialize;
+      }
     }
   }
 
@@ -1116,7 +1146,22 @@ bool CAESinkWASAPI::InitializeExclusive(AEAudioFormat &format)
 
 initialize:
 
-  AEChannelsFromSpeakerMask(wfxex.dwChannelMask);
+  // check if 7.1 wide was requested and we were able to open 8 channels
+  if (obsolete71Wide && (wfxex.dwChannelMask == KSAUDIO_SPEAKER_7POINT1_SURROUND))
+  {
+    // build layout for 7.1 Wide and map it into KSAUDIO_SPEAKER_7POINT1_SURROUND
+    m_channelLayout.Reset();
+    m_channelLayout += AE_CH_FLOC;  // FLOC/FROC go into FL/FR
+    m_channelLayout += AE_CH_FROC;
+    m_channelLayout += AE_CH_FC;
+    m_channelLayout += AE_CH_LFE;
+    m_channelLayout += AE_CH_FL;    // FL/FR go into SL/SR
+    m_channelLayout += AE_CH_FR;
+    m_channelLayout += AE_CH_BL;
+    m_channelLayout += AE_CH_BR;
+  }
+  else
+    AEChannelsFromSpeakerMask(wfxex.dwChannelMask);
   format.m_channelLayout = m_channelLayout;
 
   /* When the stream is raw, the values in the format structure are set to the link    */
index 69b37b4..5d48571 100644 (file)
@@ -55,11 +55,13 @@ void CAEChannelInfo::ResolveChannels(const CAEChannelInfo& rhs)
   bool srcHasSR = false;
   bool srcHasRL = false;
   bool srcHasRR = false;
+  bool srcHasBC = false;
 
   bool dstHasSL = false;
   bool dstHasSR = false;
   bool dstHasRL = false;
   bool dstHasRR = false;
+  bool dstHasBC = false;
 
   for (unsigned int c = 0; c < rhs.m_channelCount; ++c)
     switch(rhs.m_channels[c])
@@ -68,6 +70,7 @@ void CAEChannelInfo::ResolveChannels(const CAEChannelInfo& rhs)
       case AE_CH_SR: dstHasSR = true; break;
       case AE_CH_BL: dstHasRL = true; break;
       case AE_CH_BR: dstHasRR = true; break;
+      case AE_CH_BC: dstHasBC = true; break;
       default:
         break;
     }
@@ -81,6 +84,7 @@ void CAEChannelInfo::ResolveChannels(const CAEChannelInfo& rhs)
       case AE_CH_SR: srcHasSR = true; break;
       case AE_CH_BL: srcHasRL = true; break;
       case AE_CH_BR: srcHasRR = true; break;
+      case AE_CH_BC: srcHasBC = true; break;
       default:
         break;
     }
@@ -97,6 +101,10 @@ void CAEChannelInfo::ResolveChannels(const CAEChannelInfo& rhs)
       newInfo += m_channels[i];
   }
 
+  // we let the sink do the mapping later on
+  if (m_channelCount == 8 && m_channelCount == rhs.Count())
+    return;
+
   /* we need to ensure we end up with rear or side channels for downmix to work */
   if (srcHasSL && !dstHasSL && dstHasRL)
     newInfo += AE_CH_BL;
@@ -107,6 +115,21 @@ void CAEChannelInfo::ResolveChannels(const CAEChannelInfo& rhs)
   if (srcHasRR && !dstHasRR && dstHasSR)
     newInfo += AE_CH_SR;
 
+  // mix back center if not available in destination layout
+  // prefer mixing into backs if available
+  if (srcHasBC && !dstHasBC)
+  {
+    if (dstHasRL && !newInfo.HasChannel(AE_CH_BL))
+      newInfo += AE_CH_BL;
+    else if (dstHasSL && !newInfo.HasChannel(AE_CH_SL))
+      newInfo += AE_CH_SL;
+
+    if (dstHasRR && !newInfo.HasChannel(AE_CH_BR))
+      newInfo += AE_CH_BR;
+    else if (dstHasSR && !newInfo.HasChannel(AE_CH_SR))
+      newInfo += AE_CH_SR;
+  }
+
   *this = newInfo;
 }
 
index 85dde4a..40a2a80 100644 (file)
@@ -731,6 +731,8 @@ void CBaseRenderer::SettingOptionsRenderMethodsFiller(const CSetting *setting, s
   list.push_back(make_pair(g_localizeStrings.Get(13416), RENDER_METHOD_AUTO));
 
 #ifdef HAS_DX
+  if (CSysInfo::IsWindowsVersionAtLeast(CSysInfo::WindowsVersionWin7))
+    list.push_back(make_pair(g_localizeStrings.Get(16326), RENDER_METHOD_DXVAHD));
   list.push_back(make_pair(g_localizeStrings.Get(16319), RENDER_METHOD_DXVA));
   list.push_back(make_pair(g_localizeStrings.Get(13431), RENDER_METHOD_D3D_PS));
   list.push_back(make_pair(g_localizeStrings.Get(13419), RENDER_METHOD_SOFTWARE));
index a61d3cf..5a21fec 100644 (file)
@@ -63,6 +63,7 @@ enum RenderMethods
   RENDER_METHOD_SOFTWARE,
   RENDER_METHOD_D3D_PS,
   RENDER_METHOD_DXVA,
+  RENDER_METHOD_DXVAHD,
   RENDER_OVERLAYS        = 99   // to retain compatibility
 };
 
index 600ffa7..801ecb2 100644 (file)
@@ -523,81 +523,6 @@ void CLinuxRendererGL::LoadPlane( YUVPLANE& plane, int type, unsigned flipindex
   plane.flipindex = flipindex;
 }
 
-bool CLinuxRendererGL::UploadYV12Texture(int source)
-{
-  YUVBUFFER& buf    =  m_buffers[source];
-  YV12Image* im     = &buf.image;
-  YUVFIELDS& fields =  buf.fields;
-
-  if (!(im->flags&IMAGE_FLAG_READY))
-    return false;
-  bool deinterlacing;
-  if (m_currentField == FIELD_FULL)
-    deinterlacing = false;
-  else
-    deinterlacing = true;
-
-  glEnable(m_textureTarget);
-  VerifyGLState();
-
-  glPixelStorei(GL_UNPACK_ALIGNMENT,1);
-
-  if (deinterlacing)
-  {
-    // Load Even Y Field
-    LoadPlane( fields[FIELD_TOP][0] , GL_LUMINANCE, buf.flipindex
-             , im->width, im->height >> 1
-             , im->stride[0]*2, im->bpp, im->plane[0] );
-
-    //load Odd Y Field
-    LoadPlane( fields[FIELD_BOT][0], GL_LUMINANCE, buf.flipindex
-             , im->width, im->height >> 1
-             , im->stride[0]*2, im->bpp, im->plane[0] + im->stride[0]) ;
-
-    // Load Even U & V Fields
-    LoadPlane( fields[FIELD_TOP][1], GL_LUMINANCE, buf.flipindex
-             , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
-             , im->stride[1]*2, im->bpp, im->plane[1] );
-
-    LoadPlane( fields[FIELD_TOP][2], GL_ALPHA, buf.flipindex
-             , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
-             , im->stride[2]*2, im->bpp, im->plane[2] );
-
-    // Load Odd U & V Fields
-    LoadPlane( fields[FIELD_BOT][1], GL_LUMINANCE, buf.flipindex
-             , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
-             , im->stride[1]*2, im->bpp, im->plane[1] + im->stride[1] );
-
-    LoadPlane( fields[FIELD_BOT][2], GL_ALPHA, buf.flipindex
-             , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
-             , im->stride[2]*2, im->bpp, im->plane[2] + im->stride[2] );
-  }
-  else
-  {
-    //Load Y plane
-    LoadPlane( fields[FIELD_FULL][0], GL_LUMINANCE, buf.flipindex
-             , im->width, im->height
-             , im->stride[0], im->bpp, im->plane[0] );
-
-    //load U plane
-    LoadPlane( fields[FIELD_FULL][1], GL_LUMINANCE, buf.flipindex
-             , im->width >> im->cshift_x, im->height >> im->cshift_y
-             , im->stride[1], im->bpp, im->plane[1] );
-
-    //load V plane
-    LoadPlane( fields[FIELD_FULL][2], GL_ALPHA, buf.flipindex
-             , im->width >> im->cshift_x, im->height >> im->cshift_y
-             , im->stride[2], im->bpp, im->plane[2] );
-  }
-
-  VerifyGLState();
-
-  CalculateTextureSourceRects(source, 3);
-
-  glDisable(m_textureTarget);
-  return true;
-}
-
 void CLinuxRendererGL::Reset()
 {
   for(int i=0; i<m_NumYV12Buffers; i++)
@@ -1611,7 +1536,6 @@ void CLinuxRendererGL::RenderVDPAU(int index, int field)
 
   // make sure we know the correct texture size
   GetPlaneTextureSize(plane);
-  CalculateTextureSourceRects(index, 1);
 
   // Try some clamping or wrapping
   glTexParameteri(m_textureTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
@@ -1658,10 +1582,10 @@ void CLinuxRendererGL::RenderVDPAU(int index, int field)
   }
   else
   {
-    glTexCoord2f(m_rotatedDestCoords[0].x, m_rotatedDestCoords[0].y); glVertex4f(m_rotatedDestCoords[0].x, m_rotatedDestCoords[0].y, 0.0f, 0.0f);
-    glTexCoord2f(m_rotatedDestCoords[1].x, m_rotatedDestCoords[1].y); glVertex4f(m_rotatedDestCoords[1].x, m_rotatedDestCoords[1].y, 1.0f, 0.0f);
-    glTexCoord2f(m_rotatedDestCoords[2].x, m_rotatedDestCoords[2].y); glVertex4f(m_rotatedDestCoords[2].x, m_rotatedDestCoords[2].y, 1.0f, 1.0f);
-    glTexCoord2f(m_rotatedDestCoords[3].x, m_rotatedDestCoords[3].y); glVertex4f(m_rotatedDestCoords[3].x, m_rotatedDestCoords[3].y, 0.0f, 1.0f);
+    glTexCoord2f(plane.rect.x1, plane.rect.y1); glVertex4f(m_rotatedDestCoords[0].x, m_rotatedDestCoords[0].y, 0.0f, 0.0f);
+    glTexCoord2f(plane.rect.x2, plane.rect.y1); glVertex4f(m_rotatedDestCoords[1].x, m_rotatedDestCoords[1].y, 1.0f, 0.0f);
+    glTexCoord2f(plane.rect.x2, plane.rect.y2); glVertex4f(m_rotatedDestCoords[2].x, m_rotatedDestCoords[2].y, 1.0f, 1.0f);
+    glTexCoord2f(plane.rect.x1, plane.rect.y2); glVertex4f(m_rotatedDestCoords[3].x, m_rotatedDestCoords[3].y, 0.0f, 1.0f);
   }
   glEnd();
   VerifyGLState();
@@ -1846,6 +1770,81 @@ bool CLinuxRendererGL::RenderCapture(CRenderCapture* capture)
 //********************************************************************************************************
 // YV12 Texture creation, deletion, copying + clearing
 //********************************************************************************************************
+bool CLinuxRendererGL::UploadYV12Texture(int source)
+{
+  YUVBUFFER& buf    =  m_buffers[source];
+  YV12Image* im     = &buf.image;
+  YUVFIELDS& fields =  buf.fields;
+
+  if (!(im->flags&IMAGE_FLAG_READY))
+    return false;
+  bool deinterlacing;
+  if (m_currentField == FIELD_FULL)
+    deinterlacing = false;
+  else
+    deinterlacing = true;
+
+  glEnable(m_textureTarget);
+  VerifyGLState();
+
+  glPixelStorei(GL_UNPACK_ALIGNMENT,1);
+
+  if (deinterlacing)
+  {
+    // Load Even Y Field
+    LoadPlane( fields[FIELD_TOP][0] , GL_LUMINANCE, buf.flipindex
+             , im->width, im->height >> 1
+             , im->stride[0]*2, im->bpp, im->plane[0] );
+
+    //load Odd Y Field
+    LoadPlane( fields[FIELD_BOT][0], GL_LUMINANCE, buf.flipindex
+             , im->width, im->height >> 1
+             , im->stride[0]*2, im->bpp, im->plane[0] + im->stride[0]) ;
+
+    // Load Even U & V Fields
+    LoadPlane( fields[FIELD_TOP][1], GL_LUMINANCE, buf.flipindex
+             , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
+             , im->stride[1]*2, im->bpp, im->plane[1] );
+
+    LoadPlane( fields[FIELD_TOP][2], GL_ALPHA, buf.flipindex
+             , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
+             , im->stride[2]*2, im->bpp, im->plane[2] );
+
+    // Load Odd U & V Fields
+    LoadPlane( fields[FIELD_BOT][1], GL_LUMINANCE, buf.flipindex
+             , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
+             , im->stride[1]*2, im->bpp, im->plane[1] + im->stride[1] );
+
+    LoadPlane( fields[FIELD_BOT][2], GL_ALPHA, buf.flipindex
+             , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
+             , im->stride[2]*2, im->bpp, im->plane[2] + im->stride[2] );
+  }
+  else
+  {
+    //Load Y plane
+    LoadPlane( fields[FIELD_FULL][0], GL_LUMINANCE, buf.flipindex
+             , im->width, im->height
+             , im->stride[0], im->bpp, im->plane[0] );
+
+    //load U plane
+    LoadPlane( fields[FIELD_FULL][1], GL_LUMINANCE, buf.flipindex
+             , im->width >> im->cshift_x, im->height >> im->cshift_y
+             , im->stride[1], im->bpp, im->plane[1] );
+
+    //load V plane
+    LoadPlane( fields[FIELD_FULL][2], GL_ALPHA, buf.flipindex
+             , im->width >> im->cshift_x, im->height >> im->cshift_y
+             , im->stride[2], im->bpp, im->plane[2] );
+  }
+
+  VerifyGLState();
+
+  CalculateTextureSourceRects(source, 3);
+
+  glDisable(m_textureTarget);
+  return true;
+}
+
 void CLinuxRendererGL::DeleteYV12Texture(int index)
 {
   YV12Image &im     = m_buffers[index].image;
@@ -1895,6 +1894,25 @@ void CLinuxRendererGL::DeleteYV12Texture(int index)
   }
 }
 
+static GLint GetInternalFormat(GLint format, int bpp)
+{
+  if(bpp == 2)
+  {
+    switch (format)
+    {
+#ifdef GL_ALPHA16
+      case GL_ALPHA:     return GL_ALPHA16;
+#endif
+#ifdef GL_LUMINANCE16
+      case GL_LUMINANCE: return GL_LUMINANCE16;
+#endif
+      default:           return format;
+    }
+  }
+  else
+    return format;
+}
+
 bool CLinuxRendererGL::CreateYV12Texture(int index)
 {
   /* since we also want the field textures, pitch must be texture aligned */
@@ -2039,21 +2057,10 @@ bool CLinuxRendererGL::CreateYV12Texture(int index)
         GLenum format;
         GLint internalformat;
         if (p == 2) //V plane needs an alpha texture
-        {
           format = GL_ALPHA;
-          if(im.bpp == 2)
-            internalformat = GL_ALPHA16;
-          else
-            internalformat = GL_ALPHA;
-        }
         else
-        {
           format = GL_LUMINANCE;
-          if(im.bpp == 2)
-            internalformat = GL_LUMINANCE16;
-          else
-            internalformat = GL_LUMINANCE;
-        }
+        internalformat = GetInternalFormat(format, im.bpp);
 
         glTexImage2D(m_textureTarget, 0, internalformat, plane.texwidth, plane.texheight, 0, format, GL_UNSIGNED_BYTE, NULL);
       }
@@ -2399,23 +2406,27 @@ bool CLinuxRendererGL::UploadVDPAUTexture(int index)
 
   plane.id = vdpau->texture[0];
 
+  // in stereoscopic mode sourceRect may only
+  // be a part of the source video surface
   plane.rect = m_sourceRect;
-  plane.width  = im.width;
-  plane.height = im.height;
 
-  plane.height  /= plane.pixpertex_y;
-  plane.rect.y1 /= plane.pixpertex_y;
-  plane.rect.y2 /= plane.pixpertex_y;
-  plane.width   /= plane.pixpertex_x;
-  plane.rect.x1 /= plane.pixpertex_x;
-  plane.rect.x2 /= plane.pixpertex_x;
+  // clip rect
+  if (vdpau->crop.x1 > plane.rect.x1)
+    plane.rect.x1 = vdpau->crop.x1;
+  if (vdpau->crop.x2 < plane.rect.x2)
+    plane.rect.x2 = vdpau->crop.x2;
+  if (vdpau->crop.y1 > plane.rect.y1)
+    plane.rect.y1 = vdpau->crop.y1;
+  if (vdpau->crop.y2 < plane.rect.y2)
+    plane.rect.y2 = vdpau->crop.y2;
+
+  plane.texheight = vdpau->texHeight;
+  plane.texwidth  = vdpau->texWidth;
 
   if (m_textureTarget == GL_TEXTURE_2D)
   {
-    plane.height  /= plane.texheight;
     plane.rect.y1 /= plane.texheight;
     plane.rect.y2 /= plane.texheight;
-    plane.width   /= plane.texwidth;
     plane.rect.x1 /= plane.texwidth;
     plane.rect.x2 /= plane.texwidth;
   }
index 136588d..4d4a8a6 100644 (file)
@@ -376,6 +376,20 @@ void CLinuxRendererGLES::CalculateTextureSourceRects(int source, int num_planes)
         p.rect.y2 /= 1 << im->cshift_y;
       }
 
+      // protect against division by zero
+      if (p.texheight == 0 || p.texwidth == 0 ||
+          p.pixpertex_x == 0 || p.pixpertex_y == 0)
+      {
+        continue;
+      }
+
+      p.height  /= p.pixpertex_y;
+      p.rect.y1 /= p.pixpertex_y;
+      p.rect.y2 /= p.pixpertex_y;
+      p.width   /= p.pixpertex_x;
+      p.rect.x1 /= p.pixpertex_x;
+      p.rect.x2 /= p.pixpertex_x;
+
       if (m_textureTarget == GL_TEXTURE_2D)
       {
         p.height  /= p.texheight;
@@ -391,14 +405,20 @@ void CLinuxRendererGLES::CalculateTextureSourceRects(int source, int num_planes)
 
 void CLinuxRendererGLES::LoadPlane( YUVPLANE& plane, int type, unsigned flipindex
                                 , unsigned width, unsigned height
-                                , unsigned int stride, void* data )
+                                , unsigned int stride, int bpp, void* data )
 {
   if(plane.flipindex == flipindex)
     return;
 
   const GLvoid *pixelData = data;
 
-  int bps = glFormatElementByteCount(type);
+  int bps = bpp * glFormatElementByteCount(type);
+
+  unsigned datatype;
+  if(bpp == 2)
+    datatype = GL_UNSIGNED_SHORT;
+  else
+    datatype = GL_UNSIGNED_BYTE;
 
   glBindTexture(m_textureTarget, plane.id);
 
@@ -407,22 +427,22 @@ void CLinuxRendererGLES::LoadPlane( YUVPLANE& plane, int type, unsigned flipinde
   {
     unsigned char* src = (unsigned char*)data;
     for (unsigned int y = 0; y < height;++y, src += stride)
-      glTexSubImage2D(m_textureTarget, 0, 0, y, width, 1, type, GL_UNSIGNED_BYTE, src);
+      glTexSubImage2D(m_textureTarget, 0, 0, y, width, 1, type, datatype, src);
   } else {
-    glTexSubImage2D(m_textureTarget, 0, 0, 0, width, height, type, GL_UNSIGNED_BYTE, pixelData);
+    glTexSubImage2D(m_textureTarget, 0, 0, 0, width, height, type, datatype, pixelData);
   }
 
   /* check if we need to load any border pixels */
   if(height < plane.texheight)
     glTexSubImage2D( m_textureTarget, 0
                    , 0, height, width, 1
-                   , type, GL_UNSIGNED_BYTE
+                   , type, datatype
                    , (unsigned char*)pixelData + stride * (height-1));
 
   if(width  < plane.texwidth)
     glTexSubImage2D( m_textureTarget, 0
                    , width, 0, 1, height
-                   , type, GL_UNSIGNED_BYTE
+                   , type, datatype
                    , (unsigned char*)pixelData + bps * (width-1));
 
   glBindTexture(m_textureTarget, 0);
@@ -1132,8 +1152,8 @@ void CLinuxRendererGLES::RenderMultiPass(int index, int field)
 //  float imgheight = planes[0].rect.y2 - planes[0].rect.y1;
 //  if (m_textureTarget == GL_TEXTURE_2D)
 //  {
-//    imgwidth  *= planes[0].texwidth;
-//    imgheight *= planes[0].texheight;
+//    imgwidth  *= planes[0].pixpertex_x;
+//    imgheight *= planes[0].pixpertex_y;
 //  }
 //  
 //  glBegin(GL_QUADS);
@@ -1688,17 +1708,17 @@ void CLinuxRendererGLES::UploadYV12Texture(int source)
     {
       LoadPlane( fields[FIELD_TOP][0] , GL_RGBA, buf.flipindex
                , im->width, im->height >> 1
-               , m_sourceWidth*8, m_rgbBuffer );
+               , m_sourceWidth*8, im->bpp, m_rgbBuffer );
 
       LoadPlane( fields[FIELD_BOT][0], GL_RGBA, buf.flipindex
                , im->width, im->height >> 1
-               , m_sourceWidth*8, m_rgbBuffer + m_sourceWidth*4);
+               , m_sourceWidth*8, im->bpp, m_rgbBuffer + m_sourceWidth*4);
     }
     else
     {
       LoadPlane( fields[FIELD_FULL][0], GL_RGBA, buf.flipindex
                , im->width, im->height
-               , m_sourceWidth*4, m_rgbBuffer );
+               , m_sourceWidth*4, im->bpp, m_rgbBuffer );
     }
   }
   else
@@ -1707,62 +1727,55 @@ void CLinuxRendererGLES::UploadYV12Texture(int source)
 
     if (deinterlacing)
     {
-      // Load Y fields
+      // Load Even Y Field
       LoadPlane( fields[FIELD_TOP][0] , GL_LUMINANCE, buf.flipindex
                , im->width, im->height >> 1
-               , im->stride[0]*2, im->plane[0] );
+               , im->stride[0]*2, im->bpp, im->plane[0] );
 
+      // Load Odd Y fields
       LoadPlane( fields[FIELD_BOT][0], GL_LUMINANCE, buf.flipindex
                , im->width, im->height >> 1
-               , im->stride[0]*2, im->plane[0] + im->stride[0]) ;
-    }
-    else
-    {
-      // Load Y plane
-      LoadPlane( fields[FIELD_FULL][0], GL_LUMINANCE, buf.flipindex
-               , im->width, im->height
-               , im->stride[0], im->plane[0] );
-    }
-  }
+               , im->stride[0]*2, im->bpp, im->plane[0] + im->stride[0]) ;
 
-  VerifyGLState();
-
-  if (!(m_renderMethod & RENDER_SW))
-  {
-    glPixelStorei(GL_UNPACK_ALIGNMENT,1);
-
-    if (deinterlacing)
-    {
       // Load Even U & V Fields
       LoadPlane( fields[FIELD_TOP][1], GL_LUMINANCE, buf.flipindex
                , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
-               , im->stride[1]*2, im->plane[1] );
+               , im->stride[1]*2, im->bpp, im->plane[1] );
 
       LoadPlane( fields[FIELD_TOP][2], GL_ALPHA, buf.flipindex
                , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
-               , im->stride[2]*2, im->plane[2] );
+               , im->stride[2]*2, im->bpp, im->plane[2] );
 
       // Load Odd U & V Fields
       LoadPlane( fields[FIELD_BOT][1], GL_LUMINANCE, buf.flipindex
                , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
-               , im->stride[1]*2, im->plane[1] + im->stride[1] );
+               , im->stride[1]*2, im->bpp, im->plane[1] + im->stride[1] );
 
       LoadPlane( fields[FIELD_BOT][2], GL_ALPHA, buf.flipindex
                , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
-               , im->stride[2]*2, im->plane[2] + im->stride[2] );
-
+               , im->stride[2]*2, im->bpp, im->plane[2] + im->stride[2] );
     }
     else
     {
+      // Load Y plane
+      LoadPlane( fields[FIELD_FULL][0], GL_LUMINANCE, buf.flipindex
+               , im->width, im->height
+               , im->stride[0], im->bpp, im->plane[0] );
+
+      //load U plane
       LoadPlane( fields[FIELD_FULL][1], GL_LUMINANCE, buf.flipindex
                , im->width >> im->cshift_x, im->height >> im->cshift_y
-               , im->stride[1], im->plane[1] );
+               , im->stride[1], im->bpp, im->plane[1] );
 
+      //load V plane
       LoadPlane( fields[FIELD_FULL][2], GL_ALPHA, buf.flipindex
                , im->width >> im->cshift_x, im->height >> im->cshift_y
-               , im->stride[2], im->plane[2] );
+               , im->stride[2], im->bpp, im->plane[2] );
     }
   }
+
+  VerifyGLState();
+
   CalculateTextureSourceRects(source, 3);
 
   glDisable(m_textureTarget);
@@ -1801,6 +1814,25 @@ void CLinuxRendererGLES::DeleteYV12Texture(int index)
   }
 }
 
+static GLint GetInternalFormat(GLint format, int bpp)
+{
+  if(bpp == 2)
+  {
+    switch (format)
+    {
+#ifdef GL_ALPHA16
+      case GL_ALPHA:     return GL_ALPHA16;
+#endif
+#ifdef GL_LUMINANCE16
+      case GL_LUMINANCE: return GL_LUMINANCE16;
+#endif
+      default:           return format;
+    }
+  }
+  else
+    return format;
+}
+
 bool CLinuxRendererGLES::CreateYV12Texture(int index)
 {
   /* since we also want the field textures, pitch must be texture aligned */
@@ -1814,11 +1846,18 @@ bool CLinuxRendererGLES::CreateYV12Texture(int index)
   im.cshift_x = 1;
   im.cshift_y = 1;
 
-  im.stride[0] = im.width;
-  im.stride[1] = im.width >> im.cshift_x;
-  im.stride[2] = im.width >> im.cshift_x;
 
-  im.planesize[0] = im.stride[0] * im.height;
+  if(m_format == RENDER_FMT_YUV420P16
+  || m_format == RENDER_FMT_YUV420P10)
+    im.bpp = 2;
+  else
+    im.bpp = 1;
+
+  im.stride[0] = im.bpp *   im.width;
+  im.stride[1] = im.bpp * ( im.width >> im.cshift_x );
+  im.stride[2] = im.bpp * ( im.width >> im.cshift_x );
+
+  im.planesize[0] = im.stride[0] *   im.height;
   im.planesize[1] = im.stride[1] * ( im.height >> im.cshift_y );
   im.planesize[2] = im.stride[2] * ( im.height >> im.cshift_y );
 
@@ -1862,6 +1901,12 @@ bool CLinuxRendererGLES::CreateYV12Texture(int index)
       planes[2].texheight = planes[0].texheight >> im.cshift_y;
     }
 
+    for (int p = 0; p < 3; p++)
+    {
+      planes[p].pixpertex_x = 1;
+      planes[p].pixpertex_y = 1;
+    }
+
     if(m_renderMethod & RENDER_POT)
     {
       for(int p = 0; p < 3; p++)
@@ -1893,15 +1938,10 @@ bool CLinuxRendererGLES::CreateYV12Texture(int index)
         GLenum format;
         GLint internalformat;
         if (p == 2) //V plane needs an alpha texture
-        {
           format = GL_ALPHA;
-          internalformat = GL_ALPHA;
-        }
         else
-        {
           format = GL_LUMINANCE;
-          internalformat = GL_LUMINANCE;
-        }
+        internalformat = GetInternalFormat(format, im.bpp);
 
         if(m_renderMethod & RENDER_POT)
           CLog::Log(LOGDEBUG, "GL: Creating YUV POT texture of size %d x %d",  plane.texwidth, plane.texheight);
@@ -1949,22 +1989,22 @@ void CLinuxRendererGLES::UploadNV12Texture(int source)
     // Load Odd Y field
     LoadPlane( fields[FIELD_TOP][0] , GL_LUMINANCE, buf.flipindex
              , im->width, im->height >> 1
-             , im->stride[0]*2, im->plane[0] );
+             , im->stride[0]*2, im->bpp, im->plane[0] );
 
     // Load Even Y field
     LoadPlane( fields[FIELD_BOT][0], GL_LUMINANCE, buf.flipindex
              , im->width, im->height >> 1
-             , im->stride[0]*2, im->plane[0] + im->stride[0]) ;
+             , im->stride[0]*2, im->bpp, im->plane[0] + im->stride[0]) ;
 
     // Load Odd UV Fields
     LoadPlane( fields[FIELD_TOP][1], GL_LUMINANCE_ALPHA, buf.flipindex
              , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
-             , im->stride[1]*2, im->plane[1] );
+             , im->stride[1]*2, im->bpp, im->plane[1] );
 
     // Load Even UV Fields
     LoadPlane( fields[FIELD_BOT][1], GL_LUMINANCE_ALPHA, buf.flipindex
              , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1)
-             , im->stride[1]*2, im->plane[1] + im->stride[1] );
+             , im->stride[1]*2, im->bpp, im->plane[1] + im->stride[1] );
 
   }
   else
@@ -1972,12 +2012,12 @@ void CLinuxRendererGLES::UploadNV12Texture(int source)
     // Load Y plane
     LoadPlane( fields[FIELD_FULL][0], GL_LUMINANCE, buf.flipindex
              , im->width, im->height
-             , im->stride[0], im->plane[0] );
+             , im->stride[0], im->bpp, im->plane[0] );
 
     // Load UV plane
     LoadPlane( fields[FIELD_FULL][1], GL_LUMINANCE_ALPHA, buf.flipindex
              , im->width >> im->cshift_x, im->height >> im->cshift_y
-             , im->stride[1], im->plane[1] );
+             , im->stride[1], im->bpp, im->plane[1] );
   }
 
   VerifyGLState();
@@ -2059,6 +2099,12 @@ bool CLinuxRendererGLES::CreateNV12Texture(int index)
       planes[2].texheight = planes[1].texheight;
     }
 
+    for (int p = 0; p < 3; p++)
+    {
+      planes[p].pixpertex_x = 1;
+      planes[p].pixpertex_y = 1;
+    }
+
     if(m_renderMethod & RENDER_POT)
     {
       for(int p = 0; p < 3; p++)
@@ -2189,6 +2235,8 @@ void CLinuxRendererGLES::UploadCVRefTexture(int index)
 
     plane.flipindex = m_buffers[index].flipindex;
   }
+
+  CalculateTextureSourceRects(index, 1);
 #endif
 }
 void CLinuxRendererGLES::DeleteCVRefTexture(int index)
@@ -2222,6 +2270,8 @@ bool CLinuxRendererGLES::CreateCVRefTexture(int index)
 
   plane.texwidth  = im.width;
   plane.texheight = im.height;
+  plane.pixpertex_x = 1;
+  plane.pixpertex_y = 1;
 
   if(m_renderMethod & RENDER_POT)
   {
@@ -2300,6 +2350,8 @@ void CLinuxRendererGLES::UploadEGLIMGTexture(int index)
     plane.flipindex = m_buffers[index].flipindex;
   }
 
+  CalculateTextureSourceRects(index, 1);
+
 #ifdef DEBUG_VERBOSE
   CLog::Log(LOGDEBUG, "UploadEGLIMGTexture %d: img:%p, tm:%d\n", index, m_buffers[index].eglimg, XbmcThreads::SystemClockMillis() - time);
 #endif
@@ -2336,6 +2388,8 @@ bool CLinuxRendererGLES::CreateEGLIMGTexture(int index)
 
   plane.texwidth  = im.width;
   plane.texheight = im.height;
+  plane.pixpertex_x = 1;
+  plane.pixpertex_y = 1;
 
   if(m_renderMethod & RENDER_POT)
   {
@@ -2385,6 +2439,8 @@ void CLinuxRendererGLES::UploadSurfaceTexture(int index)
     SAFE_RELEASE(buf.mediacodec);
   }
 
+  CalculateTextureSourceRects(index, 1);
+
 #ifdef DEBUG_VERBOSE
   CLog::Log(LOGDEBUG, "UploadSurfaceTexture %d: img: %d tm:%d", index, mindex, XbmcThreads::SystemClockMillis() - time);
 #endif
index 15f7d7b..01db517 100644 (file)
@@ -256,6 +256,10 @@ protected:
     unsigned texwidth;
     unsigned texheight;
 
+    //pixels per texel
+    unsigned pixpertex_x;
+    unsigned pixpertex_y;
+
     unsigned flipindex;
   };
 
@@ -295,7 +299,7 @@ protected:
 
   void LoadPlane( YUVPLANE& plane, int type, unsigned flipindex
                 , unsigned width,  unsigned height
-                , unsigned int stride, void* data );
+                , unsigned int stride, int bpp, void* data );
 
   Shaders::BaseYUV2RGBShader     *m_pYUVShader;
   Shaders::BaseVideoFilterShader *m_pVideoFilterShader;
index 0a29482..bd56d8b 100644 (file)
@@ -33,6 +33,7 @@
 #include "guilib/GUIFont.h"
 #include "cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h"
 #include "cores/VideoRenderers/RenderManager.h"
+#include "cores/VideoRenderers/OverlayRendererUtil.h"
 
 using namespace OVERLAY;
 
@@ -165,7 +166,7 @@ void COverlayText::Render(OVERLAY::SRenderState &state)
   mat.m[0][3] = rd.x1;
   mat.m[1][3] = rd.y1;
 
-  float x = state.x, y = state.y;
+  float x = state.x + GetStereoscopicDepth(), y = state.y;
   mat.InverseTransformPosition(x, y);
 
   g_graphicsContext.SetTransform(mat, 1.0f, 1.0f);
index 14203d9..07e1ca1 100644 (file)
@@ -25,6 +25,8 @@
 #include "cores/dvdplayer/DVDCodecs/Overlay/DVDOverlaySpu.h"
 #include "cores/dvdplayer/DVDCodecs/Overlay/DVDOverlaySSA.h"
 #include "windowing/WindowingFactory.h"
+#include "guilib/GraphicContext.h"
+#include "settings/Settings.h"
 
 namespace OVERLAY {
 
@@ -295,4 +297,13 @@ bool convert_quad(ASS_Image* images, SQuads& quads)
   return true;
 }
 
+int GetStereoscopicDepth()
+{
+  int depth = CSettings::Get().GetInt("subtitles.stereoscopicdepth");
+  if (depth && g_graphicsContext.GetStereoMode() && g_graphicsContext.GetStereoMode() != RENDER_STEREO_MODE_MONO)
+    depth *= (g_graphicsContext.GetStereoView() == RENDER_STEREO_VIEW_LEFT ? 1 : -1);
+
+  return depth;
+}
+
 }
index 394994f..a132149 100644 (file)
@@ -64,5 +64,6 @@ namespace OVERLAY {
                        , int& min_x, int& max_x
                        , int& min_y, int& max_y);
   bool      convert_quad(ASS_Image* images, SQuads& quads);
+  int       GetStereoscopicDepth();
 
 }
index 28146ee..f619cba 100644 (file)
@@ -81,7 +81,7 @@ D3DXMATRIX* CYUV2RGBMatrix::Matrix()
     m_mat._31 = matrix.m[0][2];
     m_mat._32 = matrix.m[1][2];
     m_mat._33 = matrix.m[2][2];
-    m_mat._44 = 0.0f;
+    m_mat._34 = 0.0f;
     m_mat._41 = matrix.m[0][3];
     m_mat._42 = matrix.m[1][3];
     m_mat._43 = matrix.m[2][3];
index 599f3f4..525027d 100644 (file)
 
 #ifdef HAS_DX
 
-#include "WinRenderer.h"
+#include "DllSwScale.h"
 #include "Util.h"
+#include "WinRenderer.h"
+#include "cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h"
+#include "dialogs/GUIDialogKaiToast.h"
+#include "filesystem/File.h"
+#include "guilib/LocalizeStrings.h"
+#include "guilib/Texture.h"
+#include "settings/AdvancedSettings.h"
 #include "settings/DisplaySettings.h"
 #include "settings/MediaSettings.h"
 #include "settings/Settings.h"
-#include "guilib/Texture.h"
-#include "windowing/WindowingFactory.h"
-#include "settings/AdvancedSettings.h"
 #include "threads/SingleLock.h"
 #include "utils/log.h"
-#include "filesystem/File.h"
 #include "utils/MathUtils.h"
+#include "utils/SystemInfo.h"
 #include "VideoShaders/WinVideoFilter.h"
-#include "DllSwScale.h"
-#include "guilib/LocalizeStrings.h"
-#include "dialogs/GUIDialogKaiToast.h"
 #include "win32/WIN32Util.h"
-#include "cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h"
+#include "windowing/WindowingFactory.h"
 
 typedef struct {
   RenderMethod  method;
@@ -91,6 +92,7 @@ CWinRenderer::CWinRenderer()
   m_bConfigured = false;
   m_clearColour = 0;
   m_format = RENDER_FMT_NONE;
+  m_processor = NULL;
 }
 
 CWinRenderer::~CWinRenderer()
@@ -135,12 +137,12 @@ void CWinRenderer::SelectRenderMethod()
   // Force dxva renderer after dxva decoding: PS and SW renderers have performance issues after dxva decode.
   if (g_advancedSettings.m_DXVAForceProcessorRenderer && m_format == RENDER_FMT_DXVA)
   {
-    CLog::Log(LOGNOTICE, "D3D: rendering method forced to DXVA2 processor");
+    CLog::Log(LOGNOTICE, "D3D: rendering method forced to DXVA processor");
     m_renderMethod = RENDER_DXVA;
-    if (!m_processor.Open(m_sourceWidth, m_sourceHeight, m_iFlags, m_format, m_extended_format))
+    if (!m_processor->Open(m_sourceWidth, m_sourceHeight, m_iFlags, m_format, m_extended_format))
     {
-      CLog::Log(LOGNOTICE, "D3D: unable to open DXVA2 processor");
-      m_processor.Close();
+      CLog::Log(LOGNOTICE, "D3D: unable to open DXVA processor");
+      m_processor->Close();
       m_renderMethod = RENDER_INVALID;
     }
   }
@@ -150,14 +152,15 @@ void CWinRenderer::SelectRenderMethod()
 
     switch(m_iRequestedMethod)
     {
+      case RENDER_METHOD_DXVAHD:
       case RENDER_METHOD_DXVA:
         m_renderMethod = RENDER_DXVA;
-        if (m_processor.Open(m_sourceWidth, m_sourceHeight, m_iFlags, m_format, m_extended_format))
+        if (m_processor->Open(m_sourceWidth, m_sourceHeight, m_iFlags, m_format, m_extended_format))
             break;
         else
         {
-          CLog::Log(LOGNOTICE, "D3D: unable to open DXVA2 processor");
-          m_processor.Close();
+          CLog::Log(LOGNOTICE, "D3D: unable to open DXVA processor");
+          m_processor->Close();
         }
       // Drop through to pixel shader
       case RENDER_METHOD_AUTO:
@@ -277,7 +280,7 @@ bool CWinRenderer::AddVideoPicture(DVDVideoPicture* picture, int index)
       return false;
 
     DXVABuffer *buf = (DXVABuffer*)m_VideoBuffers[source];
-    buf->id = m_processor.Add(picture);
+    buf->id = m_processor->Add(picture);
     return true;
   }
   return false;
@@ -388,11 +391,6 @@ unsigned int CWinRenderer::PreInit()
 
   g_Windowing.Get3DDevice()->GetDeviceCaps(&m_deviceCaps);
 
-  m_iRequestedMethod = CSettings::Get().GetInt("videoplayer.rendermethod");
-
-  if ((g_advancedSettings.m_DXVAForceProcessorRenderer || m_iRequestedMethod == RENDER_METHOD_DXVA) && !m_processor.PreInit())
-    CLog::Log(LOGNOTICE, "CWinRenderer::Preinit - could not init DXVA2 processor - skipping");
-
   m_formats.push_back(RENDER_FMT_YUV420P);
   if(g_Windowing.IsTextureFormatOk(D3DFMT_L16, 0))
   {
@@ -403,6 +401,29 @@ unsigned int CWinRenderer::PreInit()
   m_formats.push_back(RENDER_FMT_YUYV422);
   m_formats.push_back(RENDER_FMT_UYVY422);
 
+  m_iRequestedMethod = CSettings::Get().GetInt("videoplayer.rendermethod");
+
+  if (g_advancedSettings.m_DXVAForceProcessorRenderer || m_iRequestedMethod == RENDER_METHOD_DXVA
+      || m_iRequestedMethod == RENDER_METHOD_DXVAHD)
+  {
+    if (m_iRequestedMethod != RENDER_METHOD_DXVA && CSysInfo::IsWindowsVersionAtLeast(CSysInfo::WindowsVersionWin7))
+    {
+      m_processor = new DXVA::CProcessorHD();
+      if (!m_processor->PreInit())
+      {
+        CLog::Log(LOGNOTICE, "CWinRenderer::Preinit - could not init DXVA-HD processor - skipping");
+        SAFE_DELETE(m_processor);
+        m_processor = new DXVA::CProcessor();
+      }
+      else
+        return 0;
+    }
+    else
+      m_processor = new DXVA::CProcessor();
+
+    if (!m_processor->PreInit())
+      CLog::Log(LOGNOTICE, "CWinRenderer::Preinit - could not init DXVA2 processor - skipping");
+  }
 
   return 0;
 }
@@ -435,7 +456,11 @@ void CWinRenderer::UnInit()
   }
   SAFE_DELETE(m_dllSwScale);
 
-  m_processor.UnInit();
+  if (m_processor)
+  {
+    m_processor->UnInit();
+    SAFE_DELETE(m_processor);
+  }
 }
 
 bool CWinRenderer::CreateIntermediateRenderTarget(unsigned int width, unsigned int height)
@@ -982,7 +1007,7 @@ void CWinRenderer::RenderProcessor(DWORD flags)
     }
   }
 
-  m_processor.Render(m_sourceRect, destRect, target, image->id, flags);
+  m_processor->Render(m_sourceRect, destRect, target, image->id, flags);
 
   target->Release();
 
@@ -1217,8 +1242,8 @@ EINTERLACEMETHOD CWinRenderer::AutoInterlaceMethod()
 
 unsigned int CWinRenderer::GetProcessorSize()
 {
-  if (m_format == RENDER_FMT_DXVA)
-    return m_processor.Size();
+  if (m_format == RENDER_FMT_DXVA && m_processor)
+    return m_processor->Size();
   else
     return 0;
 }
index 045a010..ca0d788 100644 (file)
@@ -30,6 +30,7 @@
 #include "RenderCapture.h"
 #include "settings/VideoSettings.h"
 #include "cores/dvdplayer/DVDCodecs/Video/DXVA.h"
+#include "cores/dvdplayer/DVDCodecs/Video/DXVAHD.h"
 #include "cores/VideoRenderers/RenderFlags.h"
 #include "cores/VideoRenderers/RenderFormats.h"
 
@@ -203,7 +204,7 @@ protected:
   bool                 m_bConfigured;
   SVideoBuffer        *m_VideoBuffers[NUM_BUFFERS];
   RenderMethod         m_renderMethod;
-  DXVA::CProcessor     m_processor;
+  DXVA::CProcessor    *m_processor;
   std::vector<ERenderFormat> m_formats;
 
   // software scale libraries (fallback if required pixel shaders version is not available)
@@ -226,7 +227,7 @@ protected:
   ESCALINGMETHOD       m_scalingMethod;
   ESCALINGMETHOD       m_scalingMethodGui;
 
-  D3DCAPS9 m_deviceCaps;
+  D3DCAPS9             m_deviceCaps;
 
   bool                 m_bFilterInitialized;
 
index f950a34..64af921 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 5cdf0a1..930d445 100644 (file)
@@ -1,7 +1,7 @@
 #pragma once
 /*
  *      Copyright (C) 2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 263e672..3bafe92 100644 (file)
@@ -119,13 +119,13 @@ public:
   CProcessor();
  ~CProcessor();
 
-  bool           PreInit();
-  void           UnInit();
-  bool           Open(UINT width, UINT height, unsigned int flags, unsigned int format, unsigned int extended_format);
-  void           Close();
-  REFERENCE_TIME Add(DVDVideoPicture* picture);
-  bool           Render(CRect src, CRect dst, IDirect3DSurface9* target, const REFERENCE_TIME time, DWORD flags);
-  unsigned       Size() { if (m_service) return m_size; return 0; }
+  virtual bool           PreInit();
+  virtual void           UnInit();
+  virtual bool           Open(UINT width, UINT height, unsigned int flags, unsigned int format, unsigned int extended_format);
+  virtual void           Close();
+  virtual REFERENCE_TIME Add(DVDVideoPicture* picture);
+  virtual bool           Render(CRect src, CRect dst, IDirect3DSurface9* target, const REFERENCE_TIME time, DWORD flags);
+  virtual unsigned       Size() { if (m_service) return m_size; return 0; }
 
   virtual void OnCreateDevice()  {}
   virtual void OnDestroyDevice() { CSingleLock lock(m_section); Close(); }
@@ -133,11 +133,11 @@ public:
   virtual void OnResetDevice()   { CSingleLock lock(m_section); Close(); }
 
 protected:
-  bool UpdateSize(const DXVA2_VideoDesc& dsc);
-  bool CreateSurfaces();
-  bool OpenProcessor();
-  bool SelectProcessor();
-  void EvaluateQuirkNoDeintProcForProg();
+  virtual bool UpdateSize(const DXVA2_VideoDesc& dsc);
+  virtual bool CreateSurfaces();
+  virtual bool OpenProcessor();
+  virtual bool SelectProcessor();
+  virtual void EvaluateQuirkNoDeintProcForProg();
 
   IDirectXVideoProcessorService* m_service;
   IDirectXVideoProcessor*        m_process;
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVAHD.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVAHD.cpp
new file mode 100644 (file)
index 0000000..b59ce46
--- /dev/null
@@ -0,0 +1,701 @@
+/*
+ *      Copyright (C) 2005-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/>.
+ *
+ */
+
+#ifdef HAS_DX
+
+// setting that here because otherwise SampleFormat is defined to AVSampleFormat
+// which we don't use here
+#define FF_API_OLD_SAMPLE_FMT 0
+
+#include <windows.h>
+#include <d3d9.h>
+#include <Initguid.h>
+#include <dxva.h>
+#include <dxva2api.h>
+#include "libavcodec/dxva2.h"
+#include "../DVDCodecUtils.h"
+
+#include "DXVAHD.h"
+#include "windowing/WindowingFactory.h"
+#include "../../../VideoRenderers/WinRenderer.h"
+#include "settings/Settings.h"
+#include "settings/MediaSettings.h"
+#include "boost/shared_ptr.hpp"
+#include "utils/AutoPtrHandle.h"
+#include "utils/StringUtils.h"
+#include "settings/AdvancedSettings.h"
+#include "settings/MediaSettings.h"
+#include "cores/VideoRenderers/RenderManager.h"
+#include "win32/WIN32Util.h"
+
+#define ALLOW_ADDING_SURFACES 0
+
+using namespace DXVA;
+using namespace AUTOPTR;
+using namespace std;
+
+typedef HRESULT (__stdcall *DXVAHDCreateVideoServicePtr)(IDirect3DDevice9Ex *pD3DDevice, const DXVAHD_CONTENT_DESC *pContentDesc, DXVAHD_DEVICE_USAGE Usage, PDXVAHDSW_Plugin pPlugin, IDXVAHD_Device **ppDevice);
+static DXVAHDCreateVideoServicePtr g_DXVAHDCreateVideoService;
+
+#define CHECK(a) \
+do { \
+  HRESULT res = a; \
+  if(FAILED(res)) \
+  { \
+    CLog::Log(LOGERROR, __FUNCTION__" - failed executing "#a" at line %d with error %x", __LINE__, res); \
+    return false; \
+  } \
+} while(0);
+
+#define LOGIFERROR(a) \
+do { \
+  HRESULT res = a; \
+  if(FAILED(res)) \
+  { \
+    CLog::Log(LOGERROR, __FUNCTION__" - failed executing "#a" at line %d with error %x", __LINE__, res); \
+  } \
+} while(0);
+
+static bool LoadDXVAHD()
+{
+  static CCriticalSection g_section;
+  static HMODULE          g_handle;
+
+  CSingleLock lock(g_section);
+  if(g_handle == NULL)
+  {
+    g_handle = LoadLibraryEx("dxva2.dll", NULL, 0);
+  }
+  if(g_handle == NULL)
+  {
+    return false;
+  }
+  g_DXVAHDCreateVideoService = (DXVAHDCreateVideoServicePtr)GetProcAddress(g_handle, "DXVAHD_CreateDevice");
+  if(g_DXVAHDCreateVideoService == NULL)
+  {
+    return false;
+  }
+  return true;
+}
+
+static std::string GUIDToString(const GUID& guid)
+{
+  std::string buffer = StringUtils::Format("%08X-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x"
+                                          , guid.Data1, guid.Data2, guid.Data3
+                                          , guid.Data4[0], guid.Data4[1]
+                                          , guid.Data4[2], guid.Data4[3], guid.Data4[4]
+                                          , guid.Data4[5], guid.Data4[6], guid.Data4[7]);
+  return buffer;
+}
+
+CProcessorHD::CProcessorHD()
+{
+  m_pDXVAHD = NULL;
+  m_pDXVAVP = NULL;
+  m_index   = 0;
+  m_frame   = 0;
+  g_Windowing.Register(this);
+
+  m_surfaces = NULL;
+  m_context  = NULL;
+}
+
+CProcessorHD::~CProcessorHD()
+{
+  g_Windowing.Unregister(this);
+  UnInit();
+}
+
+void CProcessorHD::UnInit()
+{
+  CSingleLock lock(m_section);
+  Close();
+  SAFE_RELEASE(m_pDXVAHD);
+}
+
+void CProcessorHD::Close()
+{
+  CSingleLock lock(m_section);
+  SAFE_RELEASE(m_pDXVAVP);
+
+  for(unsigned i = 0; i < m_frames.size(); i++)
+  {
+    SAFE_RELEASE(m_frames[i].context);
+    SAFE_RELEASE(m_frames[i].pSurface);
+  }
+  m_frames.clear();
+
+  SAFE_RELEASE(m_context);
+  if (m_surfaces)
+  {
+    for (unsigned i = 0; i < m_size; i++)
+    {
+      SAFE_RELEASE(m_surfaces[i]);
+    }
+    free(m_surfaces);
+    m_surfaces = NULL;
+  }
+}
+
+bool CProcessorHD::UpdateSize(const DXVA2_VideoDesc& dsc)
+{
+  return true;
+}
+
+bool CProcessorHD::PreInit()
+{
+  if (!LoadDXVAHD())
+  {
+    CLog::Log(LOGWARNING, __FUNCTION__" - DXVAHD not loaded.");
+    return false;
+  }
+
+  UnInit();
+
+  CSingleLock lock(m_section);
+
+  DXVAHD_RATIONAL fps = { 60, 1 }; 
+  DXVAHD_CONTENT_DESC desc;
+  desc.InputFrameFormat = DXVAHD_FRAME_FORMAT_PROGRESSIVE;
+  desc.InputFrameRate = fps;
+  desc.InputWidth = 640;
+  desc.InputHeight = 480;
+  desc.OutputFrameRate = fps;
+  desc.OutputWidth = 640;
+  desc.OutputHeight = 480;
+
+  HRESULT cvres = g_DXVAHDCreateVideoService( (IDirect3DDevice9Ex*)g_Windowing.Get3DDevice()
+                                              , &desc
+                                              , DXVAHD_DEVICE_USAGE_OPTIMAL_QUALITY
+                                              , NULL
+                                              , &m_pDXVAHD );
+
+  if(FAILED(cvres))
+  {
+    if(cvres == E_NOINTERFACE)
+      CLog::Log(LOGNOTICE, __FUNCTION__" - The Direct3d device doesn't support DXVA-HD.");
+    else
+      CLog::Log(LOGERROR, __FUNCTION__" - failed to create DXVAHD device %x", cvres);
+
+    return false;
+  }
+
+  CHECK(m_pDXVAHD->GetVideoProcessorDeviceCaps( &m_VPDevCaps ));
+
+  if (m_VPDevCaps.VideoProcessorCount == 0)
+  {
+    CLog::Log(LOGWARNING, __FUNCTION__" - unable to find any video processor. GPU drivers doesn't support DXVA-HD.");
+    return false;
+  }
+
+  // Create the array of video processor caps. 
+  DXVAHD_VPCAPS* pVPCaps = new (std::nothrow) DXVAHD_VPCAPS[ m_VPDevCaps.VideoProcessorCount ];
+  if (pVPCaps == NULL)
+  {
+    CLog::Log(LOGERROR, __FUNCTION__" - unable to create video processor caps array. Out of memory.");
+    return false;
+  }
+
+  HRESULT hr = m_pDXVAHD->GetVideoProcessorCaps( m_VPDevCaps.VideoProcessorCount, pVPCaps );
+  if(FAILED(hr))
+  {
+    CLog::Log(LOGERROR, __FUNCTION__" - failed get processor caps with error %x.", hr);
+
+    delete [] pVPCaps;
+    return false;
+  }
+
+  m_max_back_refs = 0;
+  m_max_fwd_refs = 0;
+
+  for (unsigned int i = 0; i < m_VPDevCaps.VideoProcessorCount; i++)
+  {
+    if (pVPCaps[i].FutureFrames > m_max_fwd_refs)
+    {
+      m_max_fwd_refs = pVPCaps[i].FutureFrames;
+    }
+
+    if (pVPCaps[i].PastFrames > m_max_back_refs)
+    {
+      m_max_back_refs = pVPCaps[i].PastFrames;
+    }
+  }
+
+  m_size = m_max_back_refs + 1 + m_max_fwd_refs + 2;  // refs + 1 display + 2 safety frames
+
+  // Get the image filtering capabilities.
+  for (long i = 0; i < NUM_FILTERS; i++)
+  {
+    if (m_VPDevCaps.FilterCaps & (1 << i))
+    {
+      m_pDXVAHD->GetVideoProcessorFilterRange(PROCAMP_FILTERS[i], &m_Filters[i].Range);
+      m_Filters[i].bSupported = true;
+    }
+    else
+    {
+      m_Filters[i].bSupported = false;
+    }
+  }
+
+  m_VPCaps = pVPCaps[0];
+  m_device = m_VPCaps.VPGuid;
+
+  delete [] pVPCaps;
+
+  return true;
+}
+
+bool CProcessorHD::Open(UINT width, UINT height, unsigned int flags, unsigned int format, unsigned int extended_format)
+{
+  Close();
+
+  CSingleLock lock(m_section);
+
+  if (!m_pDXVAHD)
+  {
+    return false;
+  }
+
+  m_width = width;
+  m_height = height;
+  m_flags = flags;
+  m_renderFormat = format;
+
+  if (g_advancedSettings.m_DXVANoDeintProcForProgressive)
+  {
+    CLog::Log(LOGNOTICE, __FUNCTION__" - Auto deinterlacing mode workaround activated. Deinterlacing processor will be used only for interlaced frames.");
+  }
+
+  if (format == RENDER_FMT_DXVA)
+  {
+    m_format = (D3DFORMAT)extended_format;
+  }
+  else
+  {
+    // Only NV12 software colorspace conversion is implemented for now
+    m_format = (D3DFORMAT)MAKEFOURCC('N','V','1','2');
+    if (!CreateSurfaces())
+      return false;
+  }
+
+  if (!OpenProcessor())
+  {
+    return false;
+  }
+
+  m_frame = 0;
+
+  return true;
+}
+
+bool CProcessorHD::ReInit()
+{
+  return PreInit() && (m_renderFormat == RENDER_FMT_DXVA || CreateSurfaces());
+}
+
+bool CProcessorHD::OpenProcessor()
+{
+  // restore the device if it was lost
+  if (!m_pDXVAHD && !ReInit())
+  {
+    return false;
+  }
+
+  SAFE_RELEASE(m_pDXVAVP);
+
+  CLog::Log(LOGDEBUG, __FUNCTION__" - processor selected %s.", GUIDToString(m_device).c_str());
+
+  CHECK(m_pDXVAHD->CreateVideoProcessor(&m_device, &m_pDXVAVP));
+
+  DXVAHD_STREAM_STATE_D3DFORMAT_DATA d3dformat = { m_format };
+  LOGIFERROR(m_pDXVAVP->SetVideoProcessStreamState( 0, DXVAHD_STREAM_STATE_D3DFORMAT
+                                                  , sizeof(d3dformat), &d3dformat ));
+
+  DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA data =
+  {
+    0,                                          // Type: 0=Video, 1=Graphics
+    m_flags & CONF_FLAGS_YUV_FULLRANGE ? 0 : 1, // RGB_Range: 0=Full, 1=Limited
+    m_flags & CONF_FLAGS_YUVCOEF_BT709 ? 1 : 0, // YCbCr_Matrix: 0=BT.601, 1=BT.709
+    1                                           // YCbCr_xvYCC: 0=Conventional YCbCr, 1=xvYCC
+  };
+  LOGIFERROR(m_pDXVAVP->SetVideoProcessStreamState( 0, DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE
+                                                  , sizeof(data), &data ));
+
+  DXVAHD_COLOR_YCbCrA bgColor = { 0.0625f, 0.5f, 0.5f, 1.0f }; // black color
+  DXVAHD_COLOR backgroundColor;
+  backgroundColor.YCbCr = bgColor; 
+  DXVAHD_BLT_STATE_BACKGROUND_COLOR_DATA backgroundData = { true, backgroundColor }; // {YCbCr, DXVAHD_COLOR}
+  LOGIFERROR(m_pDXVAVP->SetVideoProcessBltState( DXVAHD_BLT_STATE_BACKGROUND_COLOR
+                                               , sizeof (backgroundData), &backgroundData ));
+
+  DXVAHD_STREAM_STATE_ALPHA_DATA alpha = { true, 1.0f };
+  LOGIFERROR(m_pDXVAVP->SetVideoProcessStreamState( 0, DXVAHD_STREAM_STATE_ALPHA
+                                                  , sizeof(alpha), &alpha ));
+
+  return true;
+}
+
+bool CProcessorHD::CreateSurfaces()
+{
+  LPDIRECT3DDEVICE9 pD3DDevice = g_Windowing.Get3DDevice();
+  m_surfaces = (LPDIRECT3DSURFACE9*)calloc(m_size, sizeof(LPDIRECT3DSURFACE9));
+  for (unsigned idx = 0; idx < m_size; idx++)
+    CHECK(pD3DDevice->CreateOffscreenPlainSurface(
+                                (m_width + 15) & ~15,
+                                (m_height + 15) & ~15,
+                                m_format,
+                                m_VPDevCaps.InputPool,
+                                &m_surfaces[idx],
+                                NULL));
+
+  m_context = new CSurfaceContext();
+
+  return true;
+}
+
+REFERENCE_TIME CProcessorHD::Add(DVDVideoPicture* picture)
+{
+  CSingleLock lock(m_section);
+
+  IDirect3DSurface9* surface = NULL;
+  CSurfaceContext* context = NULL;
+
+  if (picture->iFlags & DVP_FLAG_DROPPED)
+  {
+    return 0;
+  }
+
+  switch (picture->format)
+  {
+    case RENDER_FMT_DXVA:
+    {
+      surface = (IDirect3DSurface9*)picture->data[3];
+      context = picture->context;
+      break;
+    }
+
+    case RENDER_FMT_YUV420P:
+    {
+      if (!m_surfaces)
+      {
+        CLog::Log(LOGWARNING, __FUNCTION__" - not initialized.");
+        return 0;
+      }
+
+      surface = m_surfaces[m_index];
+      m_index = (m_index + 1) % m_size;
+
+      context = m_context;
+  
+      D3DLOCKED_RECT rectangle;
+      if (FAILED(surface->LockRect(&rectangle, NULL, 0)))
+      {
+        return 0;
+      }
+
+      // Convert to NV12 - Luma
+      // TODO: Optimize this later using shaders/swscale/etc.
+      uint8_t *s = picture->data[0];
+      uint8_t* bits = (uint8_t*)(rectangle.pBits);
+      for (unsigned y = 0; y < picture->iHeight; y++)
+      {
+        memcpy(bits, s, picture->iWidth);
+        s += picture->iLineSize[0];
+        bits += rectangle.Pitch;
+      }
+
+      D3DSURFACE_DESC desc;
+      if (FAILED(surface->GetDesc(&desc)))
+      {
+        return 0;
+      }
+
+      // Convert to NV12 - Chroma
+      uint8_t *s_u, *s_v, *d_uv;
+      for (unsigned y = 0; y < picture->iHeight/2; y++)
+      {
+        s_u = picture->data[1] + (y * picture->iLineSize[1]);
+        s_v = picture->data[2] + (y * picture->iLineSize[2]);
+        d_uv = ((uint8_t*)(rectangle.pBits)) + (desc.Height + y) * rectangle.Pitch;
+        for (unsigned x = 0; x < picture->iWidth/2; x++)
+        {
+          *d_uv++ = *s_u++;
+          *d_uv++ = *s_v++;
+        }
+      }
+  
+      if (FAILED(surface->UnlockRect()))
+      {
+        return 0;
+      }
+      break;
+    }
+    
+    default:
+    {
+      CLog::Log(LOGWARNING, __FUNCTION__" - colorspace not supported by processor, skipping frame.");
+      return 0;
+    }
+  }
+
+  if (!surface || !context)
+  {
+    return 0;
+  }
+  m_frame += 2;
+
+  surface->AddRef();
+  context->Acquire();
+
+  SFrame frame = {};
+  frame.index       = m_frame;
+  frame.pSurface    = surface; 
+  frame.context     = context;
+  frame.format      = DXVAHD_FRAME_FORMAT_PROGRESSIVE;
+
+  if (picture->iFlags & DVP_FLAG_INTERLACED)
+  {
+    frame.format = picture->iFlags & DVP_FLAG_TOP_FIELD_FIRST
+                     ? DXVAHD_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST
+                     : DXVAHD_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST;
+  }
+
+  m_frames.push_back(frame);
+
+  if (m_frames.size() > m_size)
+  {
+    SAFE_RELEASE(m_frames.front().context);
+    SAFE_RELEASE(m_frames.front().pSurface);
+
+    m_frames.pop_front();
+  }
+
+  return m_frame;
+}
+
+bool CProcessorHD::ApplyFilter(DXVAHD_FILTER filter, int value, int min, int max, int def)
+{
+  if (filter > NUM_FILTERS)
+  {
+    return false;
+  }
+  // Unsupported filter. Ignore.
+  if (!m_Filters[filter].bSupported)
+  {
+    return false;
+  }
+
+  DXVAHD_FILTER_RANGE_DATA range = m_Filters[filter].Range;
+  int val;
+
+  if(value > def)
+  {
+    val = range.Default + (range.Maximum - range.Default) * (value - def) / (max - def);
+  }
+  else if(value < def)
+  {
+    val = range.Default + (range.Minimum - range.Default) * (value - def) / (min - def);
+  }
+  else
+  {
+    val = range.Default;
+  }
+
+  DXVAHD_STREAM_STATE_FILTER_DATA data = { true, val };
+  DXVAHD_STREAM_STATE state = static_cast<DXVAHD_STREAM_STATE>(DXVAHD_STREAM_STATE_FILTER_BRIGHTNESS + filter);
+
+  return !FAILED( m_pDXVAVP->SetVideoProcessStreamState( 0, state, sizeof(data), &data ) );
+}
+
+bool CProcessorHD::Render(CRect src, CRect dst, IDirect3DSurface9* target, REFERENCE_TIME frame, DWORD flags)
+{
+  CSingleLock lock(m_section);
+
+  // buffering frames
+  frame -= m_VPCaps.FutureFrames * 2;
+  if (frame <= 0)
+  {
+       return false;
+  }
+
+  // restore processor if it was lost
+  if(!m_pDXVAVP && !OpenProcessor())
+  {
+    return false;
+  }
+  
+  EDEINTERLACEMODE deinterlace_mode = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode;
+  if (g_advancedSettings.m_DXVANoDeintProcForProgressive)
+    deinterlace_mode = (flags & RENDER_FLAG_FIELD0 || flags & RENDER_FLAG_FIELD1) ? VS_DEINTERLACEMODE_FORCE : VS_DEINTERLACEMODE_OFF;
+  EINTERLACEMETHOD interlace_method = g_renderManager.AutoInterlaceMethod(CMediaSettings::Get().GetCurrentVideoSettings().m_InterlaceMethod);
+
+  bool progressive = deinterlace_mode == VS_DEINTERLACEMODE_OFF
+                  || (   interlace_method != VS_INTERLACEMETHOD_DXVA_BOB
+                      && interlace_method != VS_INTERLACEMETHOD_DXVA_BEST);
+
+  // minFrame is the first samples to keep. Delete the rest.
+  REFERENCE_TIME minFrame = frame - m_max_back_refs * 2;
+
+  SFrames::iterator it = m_frames.begin();
+  while (it != m_frames.end())
+  {
+    if (it->index < minFrame)
+    {
+      SAFE_RELEASE(it->context);
+      SAFE_RELEASE(it->pSurface);
+      it = m_frames.erase(it);
+    }
+    else
+      ++it;
+  }
+
+  if(m_frames.empty())
+  {
+    return false;
+  }
+
+  D3DSURFACE_DESC desc;
+  CHECK(target->GetDesc(&desc));
+  CRect rectTarget(0, 0, desc.Width, desc.Height);
+  CWIN32Util::CropSource(src, dst, rectTarget);
+  RECT sourceRECT = { src.x1, src.y1, src.x2, src.y2 };
+  RECT dstRECT    = { dst.x1, dst.y1, dst.x2, dst.y2 };
+
+  // MinTime and MaxTime are now the first and last samples to feed the processor.
+  minFrame = frame - m_VPCaps.PastFrames * 2;
+  REFERENCE_TIME maxFrame = frame + m_VPCaps.FutureFrames * 2;
+
+  bool isValid(false);
+  DXVAHD_FRAME_FORMAT dxvaFrameFormat = DXVAHD_FRAME_FORMAT_PROGRESSIVE;
+
+  DXVAHD_STREAM_DATA stream_data = { 0 };
+  stream_data.Enable = TRUE;
+  stream_data.PastFrames = 0;
+  stream_data.FutureFrames = 0;
+  stream_data.ppPastSurfaces = new IDirect3DSurface9*[m_VPCaps.PastFrames];
+  stream_data.ppFutureSurfaces = new IDirect3DSurface9*[m_VPCaps.FutureFrames];
+
+  for(it = m_frames.begin(); it != m_frames.end(); ++it)
+  {
+    if (it->index >= minFrame && it->index <= maxFrame)
+    {
+      if (it->index < frame)
+      {
+        // frames order should be { .., T-3, T-2, T-1 }
+        stream_data.ppPastSurfaces[m_VPCaps.PastFrames - (frame - it->index)/2] = it->pSurface;
+        stream_data.PastFrames++;
+      }
+      else if (it->index == frame)
+      {
+        stream_data.pInputSurface = it->pSurface;
+        dxvaFrameFormat = (DXVAHD_FRAME_FORMAT) it->format;
+        isValid = true;
+      }
+      else if (it->index > frame)
+      {
+        // frames order should be { T+1, T+2, T+3, .. }
+        stream_data.ppFutureSurfaces[(it->index - frame)/2 - 1] = it->pSurface;
+        stream_data.FutureFrames++;
+      }
+    }
+  }
+
+  // no present frame, skip
+  if (!isValid)
+  {
+    CLog::Log(LOGWARNING, __FUNCTION__" - uncomplete stream data, skipping frame.");
+    return false;
+  }
+
+  // rewind uncomplete array
+  if (stream_data.PastFrames < m_VPCaps.PastFrames)
+  {
+    stream_data.ppPastSurfaces += (m_VPCaps.PastFrames - stream_data.PastFrames);
+  }
+
+  // Override the sample format when the processor doesn't need to deinterlace or when deinterlacing is forced and flags are missing.
+  if (progressive)
+  {
+    dxvaFrameFormat = DXVAHD_FRAME_FORMAT_PROGRESSIVE;
+  }
+  else if (deinterlace_mode == VS_DEINTERLACEMODE_FORCE 
+        && dxvaFrameFormat  == DXVAHD_FRAME_FORMAT_PROGRESSIVE)
+  {
+    dxvaFrameFormat = DXVAHD_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST;
+  }
+
+  bool frameProgressive = dxvaFrameFormat == DXVAHD_FRAME_FORMAT_PROGRESSIVE;
+
+  // Progressive or Interlaced video at normal rate.
+  stream_data.InputFrameOrField = frame + (flags & RENDER_FLAG_FIELD1 ? 1 : 0);
+  stream_data.OutputIndex = flags & RENDER_FLAG_FIELD1 && !frameProgressive ? 1 : 0;
+
+  DXVAHD_STREAM_STATE_FRAME_FORMAT_DATA frame_format = { dxvaFrameFormat };
+  LOGIFERROR( m_pDXVAVP->SetVideoProcessStreamState( 0, DXVAHD_STREAM_STATE_FRAME_FORMAT
+                                                   , sizeof(frame_format), &frame_format ) );
+
+  DXVAHD_STREAM_STATE_DESTINATION_RECT_DATA dstRect = { true, dstRECT };
+  LOGIFERROR( m_pDXVAVP->SetVideoProcessStreamState( 0, DXVAHD_STREAM_STATE_DESTINATION_RECT
+                                                   , sizeof(dstRect), &dstRect));
+
+  DXVAHD_STREAM_STATE_SOURCE_RECT_DATA srcRect = { true, sourceRECT };
+  LOGIFERROR( m_pDXVAVP->SetVideoProcessStreamState( 0, DXVAHD_STREAM_STATE_SOURCE_RECT
+                                                   , sizeof(srcRect), &srcRect));
+
+  ApplyFilter( DXVAHD_FILTER_BRIGHTNESS, CMediaSettings::Get().GetCurrentVideoSettings().m_Brightness
+                                             , 0, 100, 50);
+  ApplyFilter( DXVAHD_FILTER_CONTRAST, CMediaSettings::Get().GetCurrentVideoSettings().m_Contrast
+                                             , 0, 100, 50);
+
+  unsigned int uiRange = g_Windowing.UseLimitedColor() ? 1 : 0;
+  DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE_DATA colorData = 
+  {
+    0,        // 0 = playback, 1 = video processing
+    uiRange,  // 0 = 0-255, 1 = 16-235
+    1,        // 0 = BT.601, 1 = BT.709
+    1         // 0 = Conventional YCbCr, 1 = xvYCC
+  };
+
+  LOGIFERROR( m_pDXVAVP->SetVideoProcessBltState( DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE
+                                                , sizeof(colorData), &colorData ));
+
+  DXVAHD_BLT_STATE_TARGET_RECT_DATA targetRect = { true, dstRECT };
+  LOGIFERROR( m_pDXVAVP->SetVideoProcessBltState( DXVAHD_BLT_STATE_TARGET_RECT
+                                                , sizeof(targetRect), &targetRect ) );
+
+  HRESULT hr = m_pDXVAVP->VideoProcessBltHD(target, frame, 1, &stream_data);
+  if(FAILED(hr))
+  {
+    CLog::Log(LOGERROR, __FUNCTION__" - failed executing VideoProcessBltHD with error %x", hr);
+  }
+
+  // rewind back before delete
+  if (stream_data.PastFrames < m_VPCaps.PastFrames)
+  {
+    stream_data.ppPastSurfaces -= (m_VPCaps.PastFrames - stream_data.PastFrames);
+  }
+
+  delete [] stream_data.ppPastSurfaces;
+  delete [] stream_data.ppFutureSurfaces;
+
+  return !FAILED(hr);
+}
+
+#endif
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVAHD.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVAHD.h
new file mode 100644 (file)
index 0000000..22a9d39
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ *      Copyright (C) 2005-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/>.
+ *
+ */
+#pragma once
+
+#include "DllAvCodec.h"
+#include "DVDCodecs/Video/DVDVideoCodecFFmpeg.h"
+#include "guilib/D3DResource.h"
+#include "threads/Event.h"
+#include "DVDResource.h"
+#include "DXVA.h"
+#include <dxva2api.h>
+#include <deque>
+#include <vector>
+#include "settings/VideoSettings.h"
+#include "guilib/Geometry.h"
+#include <dxvahd.h>
+
+namespace DXVA {
+
+// ProcAmp filters
+const DXVAHD_FILTER PROCAMP_FILTERS[] =
+{
+    DXVAHD_FILTER_BRIGHTNESS,
+    DXVAHD_FILTER_CONTRAST,
+    DXVAHD_FILTER_HUE,
+    DXVAHD_FILTER_SATURATION
+};
+
+const DWORD NUM_FILTERS = ARRAYSIZE(PROCAMP_FILTERS);
+
+class CProcessorHD
+  : public CProcessor
+{
+public:
+  CProcessorHD();
+ ~CProcessorHD();
+
+  virtual bool           PreInit();
+  virtual void           UnInit();
+  virtual bool           Open(UINT width, UINT height, unsigned int flags, unsigned int format, unsigned int extended_format);
+  virtual void           Close();
+  virtual REFERENCE_TIME Add(DVDVideoPicture* picture);
+  virtual bool           Render(CRect src, CRect dst, IDirect3DSurface9* target, const REFERENCE_TIME time, DWORD flags);
+  virtual unsigned       Size() { if (m_pDXVAHD) return m_size; return 0; }
+
+  virtual void OnCreateDevice()  {}
+  virtual void OnDestroyDevice() { CSingleLock lock(m_section); UnInit(); }
+  virtual void OnLostDevice()    { CSingleLock lock(m_section); UnInit(); }
+  virtual void OnResetDevice()   { CSingleLock lock(m_section); Close(); }
+
+protected:
+  virtual bool UpdateSize(const DXVA2_VideoDesc& dsc);
+  virtual bool ReInit();
+  virtual bool CreateSurfaces();
+  virtual bool OpenProcessor();
+  virtual bool ApplyFilter(DXVAHD_FILTER filter, int value, int min, int max, int def);
+
+  IDXVAHD_Device          *m_pDXVAHD;      // DXVA-HD device.
+  IDXVAHD_VideoProcessor  *m_pDXVAVP;      // DXVA-HD video processor.
+  DXVAHD_VPDEVCAPS         m_VPDevCaps;
+  DXVAHD_VPCAPS            m_VPCaps;
+  unsigned int             m_width;
+  unsigned int             m_height;
+  D3DFORMAT                m_format;
+  REFERENCE_TIME           m_frame;
+  unsigned int             m_flags;
+  unsigned int             m_renderFormat;
+
+  struct ProcAmpInfo
+  {
+    bool                      bSupported;
+    DXVAHD_FILTER_RANGE_DATA  Range;
+  };
+  ProcAmpInfo              m_Filters[NUM_FILTERS];
+
+  struct SFrame
+  {
+    IDirect3DSurface9*     pSurface;
+    CSurfaceContext*       context;
+    unsigned int           index;
+    unsigned               format;
+  };
+  typedef std::deque<SFrame> SFrames;
+  SFrames                  m_frames;
+};
+
+};
index 97dea48..277802f 100644 (file)
@@ -1682,11 +1682,6 @@ void CMixer::CreateVdpauMixer()
                                 &m_videoMixer);
   CheckStatus(vdp_st, __LINE__);
 
-  // create 3 pitches of black lines needed for clipping top
-  // and bottom lines when de-interlacing
-  m_BlackBar = new uint32_t[3*m_config.outWidth];
-  memset(m_BlackBar, 0, 3*m_config.outWidth*sizeof(uint32_t));
-
 }
 
 void CMixer::InitCSCMatrix(int Width)
@@ -2223,6 +2218,8 @@ void CMixer::Init()
   m_Sharpness = 0.0;
   m_DeintMode = 0;
   m_Deint = 0;
+  m_Upscale = 0;
+  m_SeenInterlaceFlag = false;
   m_ColorMatrix = 0;
   m_PostProc = false;
   m_vdpError = false;
@@ -2241,8 +2238,6 @@ void CMixer::Uninit()
     m_outputSurfaces.pop();
   }
   m_config.context->GetProcs().vdp_video_mixer_destroy(m_videoMixer);
-
-  delete [] m_BlackBar;
 }
 
 void CMixer::Flush()
@@ -2294,6 +2289,7 @@ void CMixer::InitCycle()
   EDEINTERLACEMODE   mode = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode;
   EINTERLACEMETHOD method = GetDeinterlacingMethod();
   bool interlaced = m_mixerInput[1].DVDPic.iFlags & DVP_FLAG_INTERLACED;
+  m_SeenInterlaceFlag |= interlaced;
 
   // TODO
   if (//!(flags & DVP_FLAG_NO_POSTPROC) &&
@@ -2377,6 +2373,12 @@ void CMixer::InitCycle()
     m_processPicture.outputSurface = m_outputSurfaces.front();
     m_mixerInput[1].DVDPic.iWidth = m_config.outWidth;
     m_mixerInput[1].DVDPic.iHeight = m_config.outHeight;
+    if (m_SeenInterlaceFlag)
+    {
+      double ratio = (double)m_mixerInput[1].DVDPic.iDisplayHeight / m_mixerInput[1].DVDPic.iHeight;
+      m_mixerInput[1].DVDPic.iHeight -= 6;
+      m_mixerInput[1].DVDPic.iDisplayHeight = lrint(ratio*m_mixerInput[1].DVDPic.iHeight);
+    }
   }
   else
   {
@@ -2511,32 +2513,6 @@ void CMixer::ProcessPicture()
                                 0,
                                 NULL);
   CheckStatus(vdp_st, __LINE__);
-
-  if (m_mixerfield != VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME)
-  {
-    // in order to clip top and bottom lines when de-interlacing
-    // we black those lines as a work around for not working
-    // background colour using the mixer
-    // pixel perfect is preferred over overscanning or zooming
-
-    VdpRect clipRect = destRect;
-    clipRect.y1 = clipRect.y0 + 2;
-    uint32_t *data[] = {m_BlackBar};
-    uint32_t pitches[] = {destRect.x1};
-    vdp_st = m_config.context->GetProcs().vdp_output_surface_put_bits_native(m_processPicture.outputSurface,
-                                            (void**)data,
-                                            pitches,
-                                            &clipRect);
-    CheckStatus(vdp_st, __LINE__);
-
-    clipRect = destRect;
-    clipRect.y0 = clipRect.y1 - 2;
-    vdp_st = m_config.context->GetProcs().vdp_output_surface_put_bits_native(m_processPicture.outputSurface,
-                                            (void**)data,
-                                            pitches,
-                                            &clipRect);
-    CheckStatus(vdp_st, __LINE__);
-  }
 }
 
 
@@ -3067,7 +3043,12 @@ CVdpauRenderPicture* COutput::ProcessMixerPicture()
       GLMapSurfaces();
       retPic->sourceIdx = procPic.outputSurface;
       retPic->texture[0] = m_bufferPool.glOutputSurfaceMap[procPic.outputSurface].texture[0];
-      retPic->crop = CRect(0,0,0,0);
+      retPic->texWidth = m_config.outWidth;
+      retPic->texHeight = m_config.outHeight;
+      retPic->crop.x1 = 0;
+      retPic->crop.y1 = (m_config.outHeight - retPic->DVDPic.iHeight) / 2;
+      retPic->crop.x2 = m_config.outWidth;
+      retPic->crop.y2 = m_config.outHeight - retPic->crop.y1;
     }
     else
     {
index abe8da2..2dd3c28 100644 (file)
@@ -330,8 +330,8 @@ protected:
   int m_DeintMode;
   int m_Deint;
   int m_Upscale;
+  bool m_SeenInterlaceFlag;
   unsigned int m_ColorMatrix       : 4;
-  uint32_t *m_BlackBar;
   VdpVideoMixerPictureStructure m_mixerfield;
   int m_mixerstep;
   int m_mixersteps;
index 09a5506..e2e2b01 100644 (file)
@@ -360,7 +360,7 @@ bool CDVDFileInfo::GetFileStreamDetails(CFileItem *pItem)
   }
 }
 
-bool CDVDFileInfo::DemuxerToStreamDetails(CDVDInputStream *pInputStream, CDVDDemux *pDemuxer, const std::vector<CStreamDetailSubtitle> subs, CStreamDetails &details)
+bool CDVDFileInfo::DemuxerToStreamDetails(CDVDInputStream *pInputStream, CDVDDemux *pDemuxer, const std::vector<CStreamDetailSubtitle> &subs, CStreamDetails &details)
 {
   bool result = DemuxerToStreamDetails(pInputStream, pDemuxer, details);
   for (unsigned int i = 0; i < subs.size(); i++)
index 3cc81da..f066736 100644 (file)
@@ -42,7 +42,7 @@ public:
   /** \brief Probe the file's internal and external streams and store the info in the StreamDetails parameter.
   *   \param[out] details The file's StreamDetails consisting of internal streams and external subtitle streams.
   */
-  static bool DemuxerToStreamDetails(CDVDInputStream *pInputStream, CDVDDemux *pDemuxer, const std::vector<CStreamDetailSubtitle> subs, CStreamDetails &details);
+  static bool DemuxerToStreamDetails(CDVDInputStream *pInputStream, CDVDDemux *pDemuxer, const std::vector<CStreamDetailSubtitle> &subs, CStreamDetails &details);
 
   static bool GetFileDuration(const CStdString &path, int &duration);
 
index dd50844..b9ce479 100644 (file)
@@ -24,6 +24,7 @@
 #include "DVDCodecs/Overlay/DVDOverlayText.h"
 #include "DVDCodecs/Overlay/DVDOverlayImage.h"
 #include "DVDCodecs/Overlay/DVDOverlaySSA.h"
+#include "cores/VideoRenderers/OverlayRendererUtil.h"
 
 #define CLAMP(a, min, max) ((a) > (max) ? (max) : ( (a) < (min) ? (min) : a ))
 
@@ -72,6 +73,8 @@ void CDVDOverlayRenderer::Render(DVDPictureRenderer* pPicture, CDVDOverlaySSA* p
 
   ASS_Image* img = pOverlay->m_libass->RenderImage(width, height, pts);
 
+  int depth = OVERLAY::GetStereoscopicDepth();
+
   while(img)
   {
     unsigned int color = img->color;
@@ -94,7 +97,7 @@ void CDVDOverlayRenderer::Render(DVDPictureRenderer* pPicture, CDVDOverlaySSA* p
     uint8_t u     = (uint8_t)(127.5 + 255 * CLAMP(-0.169 * r - 0.331 * g + 0.500 * b, -0.5, 0.5));
 
     int y = std::max(0,std::min(img->dst_y, pPicture->height-img->h));
-    int x = std::max(0,std::min(img->dst_x, pPicture->width-img->w));
+    int x = std::max(0,std::min(img->dst_x + depth, pPicture->width-img->w));
 
     for(int i=0; i<img->h; i++)
     {
index 8f8aed3..f8acfcc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2005-2010 Team XBMC
- *      http://www.xbmc.org
+ *      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
index d60b04c..a273cd1 100644 (file)
@@ -3,7 +3,7 @@
 
 /*
  *      Copyright (C) 2005-2010 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 7779112..6d3d229 100644 (file)
@@ -126,18 +126,14 @@ ICodec* CodecFactory::CreateCodecDemux(const CStdString& strFile, const CStdStri
     pcm_codec->SetMimeParams(strContent);
     return pcm_codec;
   }
-  else if( strContent.Equals("audio/aac")
-    || strContent.Equals("audio/aacp") )
+  else if( strContent.Equals("audio/aac") || strContent.Equals("audio/aacp") ||
+      strContent.Equals("audio/x-ms-wma") ||
+      strContent.Equals("audio/x-ape") || strContent.Equals("audio/ape"))
   {
     DVDPlayerCodec *pCodec = new DVDPlayerCodec;
-    if (urlFile.GetProtocol() == "shout" )
-      pCodec->SetContentType(strContent);
+    pCodec->SetContentType(strContent);
     return pCodec;
   }
-  else if( strContent.Equals("audio/x-ms-wma") )
-    return new DVDPlayerCodec();
-  else if( strContent.Equals("audio/x-ape") || strContent.Equals("audio/ape") )
-    return new DVDPlayerCodec();
   else if( strContent.Equals("application/ogg") || strContent.Equals("audio/ogg"))
     return CreateOGGCodec(strFile,filecache);
   else if (strContent.Equals("audio/x-xbmc-pcm"))
index 9a46356..4fa3bc0 100644 (file)
@@ -26,6 +26,7 @@
 #include "cores/dvdplayer/DVDDemuxers/DVDDemuxUtils.h"
 #include "cores/dvdplayer/DVDStreamInfo.h"
 #include "cores/dvdplayer/DVDCodecs/DVDFactoryCodec.h"
+#include "music/tags/TagLoaderTagLib.h"
 #include "utils/log.h"
 #include "settings/Settings.h"
 #include "URL.h"
@@ -156,6 +157,18 @@ bool DVDPlayerCodec::Init(const CStdString &strFile, unsigned int filecache)
     return false;
   }
 
+  //  Extract ReplayGain info
+  // tagLoaderTagLib.Load will try to determine tag type by file extension, so set fallback by contentType
+  CStdString strFallbackFileExtension = "";
+  if (m_strContentType.Equals("audio/aacp") || m_strContentType.Equals("audio/aacp" "audio/aac"))
+    strFallbackFileExtension = "m4a";
+  else if (m_strContentType.Equals("audio/x-ms-wma"))
+    strFallbackFileExtension = "wma";
+  else if (m_strContentType.Equals("audio/x-ape") || m_strContentType.Equals("audio/ape"))
+    strFallbackFileExtension = "ape";
+  CTagLoaderTagLib tagLoaderTagLib;
+  tagLoaderTagLib.Load(strFile, m_tag, strFallbackFileExtension);
+
   // we have to decode initial data in order to get channels/samplerate
   // for sanity - we read no more than 10 packets
   int nErrors = 0;
index 60a767f..9b37541 100644 (file)
@@ -48,8 +48,6 @@ void EpgSearchFilter::Reset()
   m_startDateTime.SetFromUTCDateTime(g_EpgContainer.GetFirstEPGDate());
   m_endDateTime.SetFromUTCDateTime(g_EpgContainer.GetLastEPGDate());
   m_bIncludeUnknownGenres    = false;
-  m_bIgnorePresentTimers     = false;
-  m_bIgnorePresentRecordings = false;
   m_bPreventRepeats          = false;
 
   /* pvr specific filters */
index 7c89586..d64acc2 100644 (file)
@@ -100,7 +100,7 @@ class CFile
 {
 public:
   CFile();
-  virtual ~CFile();
+  ~CFile();
 
   bool Open(const CStdString& strFileName, const unsigned int flags = 0);
   bool OpenForWrite(const CStdString& strFileName, bool bOverWrite = false);
index 3f04a34..11bc379 100644 (file)
@@ -95,11 +95,13 @@ std::list<std::string> CNfsConnection::GetExportList(const CURL &url)
       for(tmp = exportlist; tmp!=NULL; tmp=tmp->ex_next)
       {
         std::string exportStr = std::string(tmp->ex_dir);
-        URIUtils::AddSlashAtEnd(exportStr);
+        
         retList.push_back(exportStr);
       }      
 
       gNfsConnection.GetImpl()->mount_free_export_list(exportlist);
+      retList.sort();
+      retList.reverse();
     }
     
     return retList;
@@ -225,15 +227,20 @@ int CNfsConnection::getContextForExport(const CStdString &exportname)
 
 bool CNfsConnection::splitUrlIntoExportAndPath(const CURL& url, CStdString &exportPath, CStdString &relativePath)
 {
-    bool ret = false;
-    
-    //refresh exportlist if empty or hostname change
-    if(m_exportList.empty() || !url.GetHostName().Equals(m_hostName,false))
-    {
-      m_exportList = GetExportList(url);
-    }
+  //refresh exportlist if empty or hostname change
+  if(m_exportList.empty() || !StringUtils::EqualsNoCase(url.GetHostName(), m_hostName))
+  {
+    m_exportList = GetExportList(url);
+  }
 
-    if(!m_exportList.empty())
+  return splitUrlIntoExportAndPath(url, exportPath, relativePath, m_exportList);
+}
+
+bool CNfsConnection::splitUrlIntoExportAndPath(const CURL& url,CStdString &exportPath, CStdString &relativePath, std::list<std::string> &exportList)
+{
+    bool ret = false;
+  
+    if(!exportList.empty())
     {
       relativePath = "";
       exportPath = "";
@@ -243,26 +250,35 @@ bool CNfsConnection::splitUrlIntoExportAndPath(const CURL& url, CStdString &expo
       //GetFileName returns path without leading "/"
       //but we need it because the export paths start with "/"
       //and path.Find(*it) wouldn't work else
-      if(!path.empty() && path[0] != '/')
+      if(path[0] != '/')
       {
         path = "/" + path;
       }
       
       std::list<std::string>::iterator it;
       
-      for(it=m_exportList.begin();it!=m_exportList.end();it++)
+      for(it=exportList.begin();it!=exportList.end();it++)
       {
         //if path starts with the current export path
         if(StringUtils::StartsWith(path, *it))
         {
+          //its possible that StartsWith may not find the correct match first
+          //as an example, if /path/ & and /path/sub/ are exported, but
+          //the user specifies the path /path/subdir/ (from /path/ export).
+          //If the path is longer than the exportpath, make sure / is next.
+          if( (path.length() > (*it).length()) &&
+              (path[(*it).length()] != '/') && (*it) != "/")
+            continue;
           exportPath = *it;
           //handle special case where root is exported
           //in that case we don't want to stripp off to
           //much from the path
-          if( exportPath == "/" )
-            relativePath = "//" + path.substr(exportPath.length()-1);
-          else
+          if( exportPath == path )
+            relativePath = "//";
+          else if( exportPath == "/" )
             relativePath = "//" + path.substr(exportPath.length());
+          else
+            relativePath = "//" + path.substr(exportPath.length()+1);
           ret = true;
           break;          
         }
index 0972a7d..c2892b2 100644 (file)
@@ -75,6 +75,7 @@ public:
   std::list<std::string> GetExportList(const CURL &url);
   //this functions splits the url into the exportpath (feed to mount) and the rest of the path
   //relative to the mounted export
+  bool splitUrlIntoExportAndPath(const CURL& url, CStdString &exportPath, CStdString &relativePath, std::list<std::string> &exportList);
   bool splitUrlIntoExportAndPath(const CURL& url, CStdString &exportPath, CStdString &relativePath);
   
   //special stat which uses its own context
index 9f1b6b6..a9d6339 100644 (file)
@@ -61,16 +61,12 @@ using namespace std;
 
 CSMBDirectory::CSMBDirectory(void)
 {
-#ifdef TARGET_POSIX
   smb.AddActiveConnection();
-#endif
 }
 
 CSMBDirectory::~CSMBDirectory(void)
 {
-#ifdef TARGET_POSIX
   smb.AddIdleConnection();
-#endif
 }
 
 bool CSMBDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items)
@@ -142,11 +138,7 @@ bool CSMBDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items
         // set this here to if the stat should fail
         bIsDir = (aDir.type == SMBC_DIR);
 
-#ifdef TARGET_WINDOWS
-        struct __stat64 info = {0};
-#else
         struct stat info = {0};
-#endif
         if ((m_flags & DIR_FLAG_NO_FILE_INFO)==0 && g_advancedSettings.m_sambastatfiles)
         {
           // make sure we use the authenticated path wich contains any default username
@@ -157,10 +149,6 @@ bool CSMBDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items
           if( smbc_stat(strFullName.c_str(), &info) == 0 )
           {
 
-#ifdef TARGET_WINDOWS
-            if ((info.st_mode & S_IXOTH))
-              hidden = true;
-#else
             char value[20];
             // We poll for extended attributes which symbolizes bits but split up into a string. Where 0x02 is hidden and 0x12 is hidden directory.
             // According to the libsmbclient.h it's supposed to return 0 if ok, or the length of the string. It seems always to return the length wich is 4
@@ -172,7 +160,6 @@ bool CSMBDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items
             }
             else
               CLog::Log(LOGERROR, "Getting extended attributes for the share: '%s'\nunix_err:'%x' error: '%s'", CURL::GetRedacted(strFullName).c_str(), errno, strerror(errno));
-#endif
 
             bIsDir = (info.st_mode & S_IFDIR) ? true : false;
             lTimeDate = info.st_mtime;
@@ -247,9 +234,6 @@ int CSMBDirectory::Open(const CURL &url)
 int CSMBDirectory::OpenDir(const CURL& url, CStdString& strAuth)
 {
   int fd = -1;
-#ifdef TARGET_WINDOWS
-  int nt_error;
-#endif
 
   /* make a writeable copy */
   CURL urlIn(url);
@@ -276,29 +260,6 @@ int CSMBDirectory::OpenDir(const CURL& url, CStdString& strAuth)
   {
     CStdString cError;
 
-#ifdef TARGET_WINDOWS
-    nt_error = smb.ConvertUnixToNT(errno);
-
-    // if we have an 'invalid handle' error we don't display the error
-    // because most of the time this means there is no cdrom in the server's
-    // cdrom drive.
-    if (nt_error == NT_STATUS_INVALID_HANDLE)
-      break;
-
-    if (nt_error == NT_STATUS_ACCESS_DENIED)
-    {
-      if (m_flags & DIR_FLAG_ALLOW_PROMPT)
-        RequireAuthentication(urlIn.Get());
-      break;
-    }
-
-    if (nt_error == NT_STATUS_OBJECT_NAME_NOT_FOUND)
-      cError = StringUtils::Format(g_localizeStrings.Get(770).c_str(),nt_error);
-    else
-      cError = get_friendly_nt_error_msg(nt_error);
-
-#else
-
     if (errno == EACCES)
     {
       if (m_flags & DIR_FLAG_ALLOW_PROMPT)
@@ -311,8 +272,6 @@ int CSMBDirectory::OpenDir(const CURL& url, CStdString& strAuth)
     else
       cError = strerror(errno);
 
-#endif
-
     if (m_flags & DIR_FLAG_ALLOW_PROMPT)
       SetErrorDialog(257, cError.c_str());
     break;
@@ -321,11 +280,7 @@ int CSMBDirectory::OpenDir(const CURL& url, CStdString& strAuth)
   if (fd < 0)
   {
     // write error to logfile
-#ifdef TARGET_WINDOWS
-    CLog::Log(LOGERROR, "SMBDirectory->GetDirectory: Unable to open directory : '%s'\nunix_err:'%x' nt_err : '%x' error : '%s'", CURL::GetRedacted(strAuth).c_str(), errno, nt_error, get_friendly_nt_error_msg(nt_error));
-#else
     CLog::Log(LOGERROR, "SMBDirectory->GetDirectory: Unable to open directory : '%s'\nunix_err:'%x' error : '%s'", CURL::GetRedacted(strAuth).c_str(), errno, strerror(errno));
-#endif
   }
 
   return fd;
@@ -344,11 +299,7 @@ bool CSMBDirectory::Create(const char* strPath)
   int result = smbc_mkdir(strFileName.c_str(), 0);
   success = (result == 0 || EEXIST == errno);
   if(!success)
-#ifdef TARGET_WINDOWS
-    CLog::Log(LOGERROR, "%s - Error( %s )", __FUNCTION__, get_friendly_nt_error_msg(smb.ConvertUnixToNT(errno)));
-#else
     CLog::Log(LOGERROR, "%s - Error( %s )", __FUNCTION__, strerror(errno));
-#endif
 
   return success;
 }
@@ -366,11 +317,7 @@ bool CSMBDirectory::Remove(const char* strPath)
 
   if(result != 0 && errno != ENOENT)
   {
-#ifdef TARGET_WINDOWS
-    CLog::Log(LOGERROR, "%s - Error( %s )", __FUNCTION__, get_friendly_nt_error_msg(smb.ConvertUnixToNT(errno)));
-#else
     CLog::Log(LOGERROR, "%s - Error( %s )", __FUNCTION__, strerror(errno));
-#endif
     return false;
   }
 
@@ -386,11 +333,7 @@ bool CSMBDirectory::Exists(const char* strPath)
   CPasswordManager::GetInstance().AuthenticateURL(url);
   CStdString strFileName = smb.URLEncode(url);
 
-#ifdef TARGET_WINDOWS
-  SMB_STRUCT_STAT info;
-#else
   struct stat info;
-#endif
   if (smbc_stat(strFileName.c_str(), &info) != 0)
     return false;
 
@@ -400,7 +343,6 @@ bool CSMBDirectory::Exists(const char* strPath)
 CStdString CSMBDirectory::MountShare(const CStdString &smbPath, const CStdString &strType, const CStdString &strName,
     const CStdString &strUser, const CStdString &strPass)
 {
-#ifdef TARGET_POSIX
   UnMountShare(strType, strName);
 
   CStdString strMountPoint = GetMountPoint(strType, strName);
@@ -449,7 +391,6 @@ CStdString CSMBDirectory::MountShare(const CStdString &smbPath, const CStdString
   if (CUtil::SudoCommand(strCmd))
     return strMountPoint;
 #endif
-#endif
   return StringUtils::EmptyString;
 }
 
@@ -467,7 +408,7 @@ void CSMBDirectory::UnMountShare(const CStdString &strType, const CStdString &st
 
   // Execute command.
   CUtil::Command(args);
-#elif defined(TARGET_POSIX)
+#else
   CStdString strCmd = "umount " + GetMountPoint(strType, strName);
   CUtil::SudoCommand(strCmd);
 #endif
index 21ef81d..5d6a621 100644 (file)
@@ -58,9 +58,7 @@ SMBCSRV* xb_smbc_cache(SMBCCTX* c, const char* server, const char* share, const
 
 CSMB::CSMB()
 {
-#ifdef TARGET_POSIX
   m_IdleTimeout = 0;
-#endif
   m_context = NULL;
 }
 
@@ -95,7 +93,6 @@ void CSMB::Init()
   CSingleLock lock(*this);
   if (!m_context)
   {
-#ifdef TARGET_POSIX
     // Create ~/.smb/smb.conf. This file is used by libsmbclient.
     // http://us1.samba.org/samba/docs/man/manpages-3/libsmbclient.7.html
     // http://us1.samba.org/samba/docs/man/manpages-3/smb.conf.5.html
@@ -142,17 +139,11 @@ void CSMB::Init()
         fclose(f);
       }
     }
-#endif
 
     // reads smb.conf so this MUST be after we create smb.conf
     // multiple smbc_init calls are ignored by libsmbclient.
     smbc_init(xb_smbc_auth, 0);
 
-#ifdef TARGET_WINDOWS
-    // set the log function
-    set_log_callback(xb_smbc_log);
-#endif
-
     // setup our context
     m_context = smbc_new_context();
 #ifdef DEPRECATED_SMBC_INTERFACE
@@ -180,22 +171,6 @@ void CSMB::Init()
     {
       /* setup old interface to use this context */
       smbc_set_context(m_context);
-
-#ifdef TARGET_WINDOWS
-      // if a wins-server is set, we have to change name resolve order to
-      if ( CSettings::Get().GetString("smb.winsserver").length() > 0 && !CSettings::Get().GetString("smb.winsserver").Equals("0.0.0.0") )
-      {
-        lp_do_parameter( -1, "wins server", CSettings::Get().GetString("smb.winsserver").c_str());
-        lp_do_parameter( -1, "name resolve order", "bcast wins host");
-      }
-      else
-        lp_do_parameter( -1, "name resolve order", "bcast host");
-
-      if (g_advancedSettings.m_sambadoscodepage.length() > 0)
-        lp_do_parameter( -1, "dos charset", g_advancedSettings.m_sambadoscodepage.c_str());
-      else
-        lp_do_parameter( -1, "dos charset", "CP850");
-#endif
     }
     else
     {
@@ -203,17 +178,11 @@ void CSMB::Init()
       m_context = NULL;
     }
   }
-#ifdef TARGET_POSIX
   m_IdleTimeout = 180;
-#endif
 }
 
 void CSMB::Purge()
 {
-#ifdef TARGET_WINDOWS
-  CSingleLock lock(*this);
-  smbc_purge();
-#endif
 }
 
 /*
@@ -231,11 +200,6 @@ void CSMB::PurgeEx(const CURL& url)
   CSingleLock lock(*this);
   CStdString strShare = url.GetFileName().substr(0, url.GetFileName().find('/'));
 
-#ifdef TARGET_WINDOWS
-  if (m_strLastShare.length() > 0 && (m_strLastShare != strShare || m_strLastHost != url.GetHostName()))
-    smbc_purge();
-#endif
-
   m_strLastShare = strShare;
   m_strLastHost = url.GetHostName();
 }
@@ -285,19 +249,6 @@ CStdString CSMB::URLEncode(const CStdString &value)
   return encoded;
 }
 
-#ifdef TARGET_WINDOWS
-DWORD CSMB::ConvertUnixToNT(int error)
-{
-  DWORD nt_error;
-  if (error == ENODEV || error == ENETUNREACH || error == WSAETIMEDOUT) nt_error = NT_STATUS_INVALID_COMPUTER_NAME;
-  else if(error == WSAECONNREFUSED || error == WSAECONNABORTED) nt_error = NT_STATUS_CONNECTION_REFUSED;
-  else nt_error = map_nt_error_from_unix(error);
-
-  return nt_error;
-}
-#endif
-
-#ifdef TARGET_POSIX
 /* This is called from CApplication::ProcessSlow() and is used to tell if smbclient have been idle for too long */
 void CSMB::CheckIfIdle()
 {
@@ -343,7 +294,6 @@ void CSMB::AddIdleConnection()
      leaves the movie paused for a long while and then press stop */
   m_IdleTimeout = 180;
 }
-#endif
 
 CSMB smb;
 
@@ -351,17 +301,13 @@ CSmbFile::CSmbFile()
 {
   smb.Init();
   m_fd = -1;
-#ifdef TARGET_POSIX
   smb.AddActiveConnection();
-#endif
 }
 
 CSmbFile::~CSmbFile()
 {
   Close();
-#ifdef TARGET_POSIX
   smb.AddIdleConnection();
-#endif
 }
 
 int64_t CSmbFile::GetPosition()
@@ -405,21 +351,12 @@ bool CSmbFile::Open(const CURL& url)
   if (m_fd == -1)
   {
     // write error to logfile
-#ifdef TARGET_WINDOWS
-    int nt_error = smb.ConvertUnixToNT(errno);
-    CLog::Log(LOGINFO, "FileSmb->Open: Unable to open file : '%s'\nunix_err:'%x' nt_err : '%x' error : '%s'", CURL::GetRedacted(strFileName).c_str(), errno, nt_error, get_friendly_nt_error_msg(nt_error));
-#else
     CLog::Log(LOGINFO, "FileSmb->Open: Unable to open file : '%s'\nunix_err:'%x' error : '%s'", CURL::GetRedacted(strFileName).c_str(), errno, strerror(errno));
-#endif
     return false;
   }
 
   CSingleLock lock(smb);
-#ifdef TARGET_WINDOWS
-  struct __stat64 tmpBuffer = {0};
-#else
   struct stat tmpBuffer;
-#endif
   if (smbc_stat(strFileName, &tmpBuffer) < 0)
   {
     smbc_close(m_fd);
@@ -494,11 +431,7 @@ bool CSmbFile::Exists(const CURL& url)
   smb.Init();
   CStdString strFileName = GetAuthenticatedPath(url);
 
-#ifdef TARGET_WINDOWS
-  struct __stat64 info;
-#else
   struct stat info;
-#endif
 
   CSingleLock lock(smb);
   int iResult = smbc_stat(strFileName, &info);
@@ -512,11 +445,7 @@ int CSmbFile::Stat(struct __stat64* buffer)
   if (m_fd == -1)
     return -1;
 
-#ifdef TARGET_WINDOWS
-  struct __stat64 tmpBuffer = {0};
-#else
   struct stat tmpBuffer = {0};
-#endif
 
   CSingleLock lock(smb);
   int iResult = smbc_fstat(m_fd, &tmpBuffer);
@@ -543,11 +472,7 @@ int CSmbFile::Stat(const CURL& url, struct __stat64* buffer)
   CStdString strFileName = GetAuthenticatedPath(url);
   CSingleLock lock(smb);
 
-#ifdef TARGET_WINDOWS
-  struct __stat64 tmpBuffer = {0};
-#else
   struct stat tmpBuffer = {0};
-#endif
   int iResult = smbc_stat(strFileName, &tmpBuffer);
 
   memset(buffer, 0, sizeof(struct __stat64));
@@ -589,9 +514,7 @@ unsigned int CSmbFile::Read(void *lpBuf, int64_t uiBufSize)
 {
   if (m_fd == -1) return 0;
   CSingleLock lock(smb); // Init not called since it has to be "inited" by now
-#ifdef TARGET_POSIX
   smb.SetActivityTime();
-#endif
   /* work around stupid bug in samba */
   /* some samba servers has a bug in it where the */
   /* 17th bit will be ignored in a request of data */
@@ -612,11 +535,7 @@ unsigned int CSmbFile::Read(void *lpBuf, int64_t uiBufSize)
 
   if ( bytesRead < 0 )
   {
-#ifdef TARGET_WINDOWS
-    CLog::Log(LOGERROR, "%s - Error( %s )", __FUNCTION__, get_friendly_nt_error_msg(smb.ConvertUnixToNT(errno)));
-#else
     CLog::Log(LOGERROR, "%s - Error( %d, %d, %s )", __FUNCTION__, bytesRead, errno, strerror(errno));
-#endif
     return 0;
   }
 
@@ -628,18 +547,12 @@ int64_t CSmbFile::Seek(int64_t iFilePosition, int iWhence)
   if (m_fd == -1) return -1;
 
   CSingleLock lock(smb); // Init not called since it has to be "inited" by now
-#ifdef TARGET_POSIX
   smb.SetActivityTime();
-#endif
   int64_t pos = smbc_lseek(m_fd, iFilePosition, iWhence);
 
   if ( pos < 0 )
   {
-#ifdef TARGET_WINDOWS
-    CLog::Log(LOGERROR, "%s - Error( %s )", __FUNCTION__, get_friendly_nt_error_msg(smb.ConvertUnixToNT(errno)));
-#else
     CLog::Log(LOGERROR, "%s - Error( %"PRId64", %d, %s )", __FUNCTION__, pos, errno, strerror(errno));
-#endif
     return -1;
   }
 
@@ -680,11 +593,7 @@ bool CSmbFile::Delete(const CURL& url)
   int result = smbc_unlink(strFile.c_str());
 
   if(result != 0)
-#ifdef TARGET_WINDOWS
-    CLog::Log(LOGERROR, "%s - Error( %s )", __FUNCTION__, get_friendly_nt_error_msg(smb.ConvertUnixToNT(errno)));
-#else
     CLog::Log(LOGERROR, "%s - Error( %s )", __FUNCTION__, strerror(errno));
-#endif
 
   return (result == 0);
 }
@@ -699,11 +608,7 @@ bool CSmbFile::Rename(const CURL& url, const CURL& urlnew)
   int result = smbc_rename(strFile.c_str(), strFileNew.c_str());
 
   if(result != 0)
-#ifdef TARGET_WINDOWS
-    CLog::Log(LOGERROR, "%s - Error( %s )", __FUNCTION__, get_friendly_nt_error_msg(smb.ConvertUnixToNT(errno)));
-#else
     CLog::Log(LOGERROR, "%s - Error( %s )", __FUNCTION__, strerror(errno));
-#endif
 
   return (result == 0);
 }
@@ -734,12 +639,7 @@ bool CSmbFile::OpenForWrite(const CURL& url, bool bOverWrite)
   if (m_fd == -1)
   {
     // write error to logfile
-#ifdef TARGET_WINDOWS
-    int nt_error = map_nt_error_from_unix(errno);
-    CLog::Log(LOGERROR, "FileSmb->Open: Unable to open file : '%s'\nunix_err:'%x' nt_err : '%x' error : '%s'", strFileName.c_str(), errno, nt_error, get_friendly_nt_error_msg(nt_error));
-#else
     CLog::Log(LOGERROR, "FileSmb->Open: Unable to open file : '%s'\nunix_err:'%x' error : '%s'", strFileName.c_str(), errno, strerror(errno));
-#endif
     return false;
   }
 
index dd8923f..c4bff72 100644 (file)
@@ -1,3 +1,5 @@
+#pragma once
+
 /*
  *      Copyright (C) 2005-2013 Team XBMC
  *      http://xbmc.org
 //////////////////////////////////////////////////////////////////////
 
 
-
-#if !defined(AFX_FILESMB_H__2C4AB5BC_0742_458D_95EA_E9C77BA5663D__INCLUDED_)
-
-#define AFX_FILESMB_H__2C4AB5BC_0742_458D_95EA_E9C77BA5663D__INCLUDED_
-
-
-#if _MSC_VER > 1000
-
-#pragma once
-
-#endif // _MSC_VER > 1000
-
 #include "IFile.h"
 #include "URL.h"
 #include "threads/CriticalSection.h"
@@ -45,9 +35,7 @@
 #define NT_STATUS_INVALID_HANDLE long(0xC0000000 | 0x0008)
 #define NT_STATUS_ACCESS_DENIED long(0xC0000000 | 0x0022)
 #define NT_STATUS_OBJECT_NAME_NOT_FOUND long(0xC0000000 | 0x0034)
-#ifdef TARGET_POSIX
 #define NT_STATUS_INVALID_COMPUTER_NAME long(0xC0000000 | 0x0122)
-#endif
 
 struct _SMBCCTX;
 typedef _SMBCCTX SMBCCTX;
@@ -61,12 +49,10 @@ public:
   void Deinit();
   void Purge();
   void PurgeEx(const CURL& url);
-#ifdef TARGET_POSIX
   void CheckIfIdle();
   void SetActivityTime();
   void AddActiveConnection();
   void AddIdleConnection();
-#endif
   CStdString URLEncode(const CStdString &value);
   CStdString URLEncode(const CURL &url);
 
@@ -117,4 +103,3 @@ protected:
 };
 }
 
-#endif // !defined(AFX_FILESMB_H__2C4AB5BC_0742_458D_95EA_E9C77BA5663D__INCLUDED_)
index 70ec722..1ec84bd 100644 (file)
@@ -71,36 +71,7 @@ bool CDirectoryNodeSeasons::GetContent(CFileItemList& items) const
   CQueryParams params;
   CollectQueryParams(params);
 
-  int iFlatten = CSettings::Get().GetInt("videolibrary.flattentvshows");
   bool bSuccess=videodatabase.GetSeasonsNav(BuildPath(), items, params.GetActorId(), params.GetDirectorId(), params.GetGenreId(), params.GetYear(), params.GetTvShowId());
-  bool bFlatten = (items.GetObjectCount() == 1 && iFlatten == 1) || iFlatten == 2;
-  if (items.GetObjectCount() == 2 && iFlatten == 1)
-    if (items[0]->GetVideoInfoTag()->m_iSeason == 0 || items[1]->GetVideoInfoTag()->m_iSeason == 0)
-      bFlatten = true; // flatten if one season + specials
-
-  if (iFlatten > 0 && !bFlatten && CMediaSettings::Get().GetWatchedMode("tvshows") == WatchedModeUnwatched)
-  {
-    int count = 0;
-    for(int i = 0; i < items.Size(); i++) 
-    {
-      if (items[i]->GetProperty("unwatchedepisodes").asInteger() != 0 && items[i]->GetVideoInfoTag()->m_iSeason != 0)
-        count++;
-    }
-    bFlatten = (count < 2); // flatten if there is only 1 unwatched season (not counting specials)
-  }
-
-  if (bFlatten)
-  { // flatten if one season or flatten always
-    items.Clear();
-
-    CVideoDbUrl videoUrl;
-    if (!videoUrl.FromString(BuildPath()))
-      return false;
-  
-    videoUrl.AppendPath("-2/");
-    bSuccess=videodatabase.GetEpisodesNav(videoUrl.ToString(), items, params.GetGenreId(), params.GetYear(), params.GetActorId(), params.GetDirectorId(), params.GetTvShowId());
-    items.SetPath(videoUrl.ToString());
-  }
 
   videodatabase.Close();
 
index 8841293..6589d71 100644 (file)
@@ -2,6 +2,7 @@ SRCS= \
   TestDirectory.cpp \
   TestFile.cpp \
   TestFileFactory.cpp \
+  TestNfsFile.cpp \
   TestRarFile.cpp \
   TestZipFile.cpp
 
diff --git a/xbmc/filesystem/test/TestNfsFile.cpp b/xbmc/filesystem/test/TestNfsFile.cpp
new file mode 100644 (file)
index 0000000..2106bc8
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ *      Copyright (C) 2005-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 "filesystem/NfsFile.h"
+#include "test/TestUtils.h"
+
+#include <errno.h>
+#include <string>
+#include "URL.h"
+
+#include "gtest/gtest.h"
+
+using ::testing::Test;
+using ::testing::WithParamInterface;
+using ::testing::ValuesIn;
+
+struct SplitPath
+{
+  std::string url;
+  CStdString exportPath;
+  CStdString relativePath;
+  bool expectedResultExport;
+  bool expectedResultPath;
+} g_TestData[] = { 
+                   {"nfs://192.168.0.1:2049/srv/test/tvmedia/foo.txt", "/srv/test", "//tvmedia/foo.txt", true, true},
+                   {"nfs://192.168.0.1/srv/test/tv/media/foo.txt", "/srv/test/tv", "//media/foo.txt", true, true},
+                   {"nfs://192.168.0.1:2049/srv/test/tvmedia", "/srv/test", "//tvmedia", true, true},
+                   {"nfs://192.168.0.1:2049/srv/test/tvmedia/", "/srv/test", "//tvmedia/", true, true},
+                   {"nfs://192.168.0.1:2049/srv/test/tv/media", "/srv/test/tv", "//media", true, true},
+                   {"nfs://192.168.0.1:2049/srv/test/tv/media/", "/srv/test/tv", "//media/", true, true},
+                   {"nfs://192.168.0.1:2049/srv/test/tv", "/srv/test/tv", "//", true, true},
+                   {"nfs://192.168.0.1:2049/srv/test/", "/srv/test", "//", true, true},
+                   {"nfs://192.168.0.1:2049/", "/", "//", true, true},
+                   {"nfs://192.168.0.1:2049/notexported/foo.txt", "/", "//notexported/foo.txt", true, true},
+
+                   {"nfs://192.168.0.1:2049/notexported/foo.txt", "/notexported", "//foo.txt", false, false},
+                 };
+
+class TestNfs : public Test,
+                public WithParamInterface<SplitPath>
+{
+};
+
+class ExportList
+{
+  public: 
+    std::list<std::string> data;
+
+    ExportList()
+    {
+      data.push_back("/srv/test");
+      data.push_back("/srv/test/tv");
+      data.push_back("/");
+      data.sort();
+      data.reverse();
+    }
+};
+
+static ExportList exportList;
+
+TEST_P(TestNfs, splitUrlIntoExportAndPath)
+{
+  CURL url(GetParam().url);
+  CStdString exportPath;
+  CStdString relativePath;
+  gNfsConnection.splitUrlIntoExportAndPath(url, exportPath, relativePath, exportList.data);
+
+  if (GetParam().expectedResultExport)    
+    EXPECT_STREQ(GetParam().exportPath, exportPath);
+  else
+    EXPECT_STRNE(GetParam().exportPath, exportPath);
+
+  if (GetParam().expectedResultPath)
+    EXPECT_STREQ(GetParam().relativePath, relativePath);
+  else
+    EXPECT_STRNE(GetParam().relativePath, relativePath);
+}
+
+INSTANTIATE_TEST_CASE_P(NfsFile, TestNfs, ValuesIn(g_TestData));
index 2185884..de77638 100644 (file)
@@ -40,8 +40,6 @@ CGUIControl::CGUIControl() :
   m_visible = VISIBLE;
   m_visibleFromSkinCondition = true;
   m_forceHidden = false;
-  m_visibleCondition = 0;
-  m_enableCondition = 0;
   m_enabled = true;
   m_posX = 0;
   m_posY = 0;
@@ -71,8 +69,6 @@ CGUIControl::CGUIControl(int parentID, int controlID, float posX, float posY, fl
   m_visible = VISIBLE;
   m_visibleFromSkinCondition = true;
   m_forceHidden = false;
-  m_visibleCondition = 0;
-  m_enableCondition = 0;
   m_enabled = true;
   ControlType = GUICONTROL_UNKNOWN;
   m_bInvalidated = true;
@@ -543,7 +539,7 @@ void CGUIControl::SetVisible(bool bVisible, bool setVisState)
      //       otherwise we just set m_forceHidden
     GUIVISIBLE visible;
     if (m_visibleCondition)
-      visible = g_infoManager.GetBoolValue(m_visibleCondition) ? VISIBLE : HIDDEN;
+      visible = m_visibleCondition->Get() ? VISIBLE : HIDDEN;
     else
       visible = VISIBLE;
     if (visible != m_visible)
@@ -606,7 +602,7 @@ void CGUIControl::UpdateVisibility(const CGUIListItem *item)
   if (m_visibleCondition)
   {
     bool bWasVisible = m_visibleFromSkinCondition;
-    m_visibleFromSkinCondition = g_infoManager.GetBoolValue(m_visibleCondition, item);
+    m_visibleFromSkinCondition = m_visibleCondition->Get(item);
     if (!bWasVisible && m_visibleFromSkinCondition)
     { // automatic change of visibility - queue the in effect
   //    CLog::Log(LOGDEBUG, "Visibility changed to visible for control id %i", m_controlID);
@@ -629,7 +625,7 @@ void CGUIControl::UpdateVisibility(const CGUIListItem *item)
   // this may need to be reviewed at a later date
   bool enabled = m_enabled;
   if (m_enableCondition)
-    m_enabled = g_infoManager.GetBoolValue(m_enableCondition, item);
+    m_enabled = m_enableCondition->Get(item);
 
   if (m_enabled != enabled)
     MarkDirtyRegion();
@@ -651,7 +647,7 @@ void CGUIControl::SetInitialVisibility()
 {
   if (m_visibleCondition)
   {
-    m_visibleFromSkinCondition = g_infoManager.GetBoolValue(m_visibleCondition);
+    m_visibleFromSkinCondition = m_visibleCondition->Get();
     m_visible = m_visibleFromSkinCondition ? VISIBLE : HIDDEN;
   //  CLog::Log(LOGDEBUG, "Set initial visibility for control %i: %s", m_controlID, m_visible == VISIBLE ? "visible" : "hidden");
   }
@@ -667,7 +663,7 @@ void CGUIControl::SetInitialVisibility()
   // and check for conditional enabling - note this overrides SetEnabled() from the code currently
   // this may need to be reviewed at a later date
   if (m_enableCondition)
-    m_enabled = g_infoManager.GetBoolValue(m_enableCondition);
+    m_enabled = m_enableCondition->Get();
   m_allowHiddenFocus.Update();
   UpdateColors();
 
index e81b7d4..272c0c0 100644 (file)
@@ -210,7 +210,7 @@ public:
   virtual void SetHeight(float height);
   virtual void SetVisible(bool bVisible, bool setVisState = false);
   void SetVisibleCondition(const CStdString &expression, const CStdString &allowHiddenFocus = "");
-  unsigned int GetVisibleCondition() const { return m_visibleCondition; };
+  bool HasVisibleCondition() const { return m_visibleCondition; };
   void SetEnableCondition(const CStdString &expression);
   virtual void UpdateVisibility(const CGUIListItem *item = NULL);
   virtual void SetInitialVisibility();
@@ -339,14 +339,14 @@ protected:
   CGUIControl *m_parentControl;   // our parent control if we're part of a group
 
   // visibility condition/state
-  unsigned int m_visibleCondition;
+  INFO::InfoPtr m_visibleCondition;
   GUIVISIBLE m_visible;
   bool m_visibleFromSkinCondition;
   bool m_forceHidden;       // set from the code when a hidden operation is given - overrides m_visible
   CGUIInfoBool m_allowHiddenFocus;
   bool m_hasProcessed;
   // enable/disable state
-  unsigned int m_enableCondition;
+  INFO::InfoPtr m_enableCondition;
   bool m_enabled;
 
   bool m_pushedUpdates;
index ee87469..65071de 100644 (file)
@@ -22,7 +22,6 @@
 #include "GUIWindowManager.h"
 #include "GUILabelControl.h"
 #include "GUIAudioManager.h"
-#include "GUIInfoManager.h"
 #include "threads/SingleLock.h"
 #include "utils/TimeUtils.h"
 #include "Application.h"
@@ -137,7 +136,7 @@ void CGUIDialog::UpdateVisibility()
 {
   if (m_visibleCondition)
   {
-    if (g_infoManager.GetBoolValue(m_visibleCondition))
+    if (m_visibleCondition->Get())
       Show();
     else
       Close();
index e066df5..c622d1a 100644 (file)
@@ -180,7 +180,7 @@ bool CGUIIncludes::HasIncludeFile(const CStdString &file) const
   return false;
 }
 
-void CGUIIncludes::ResolveIncludes(TiXmlElement *node, std::map<int, bool>* xmlIncludeConditions /* = NULL */)
+void CGUIIncludes::ResolveIncludes(TiXmlElement *node, std::map<INFO::InfoPtr, bool>* xmlIncludeConditions /* = NULL */)
 {
   if (!node)
     return;
@@ -194,7 +194,7 @@ void CGUIIncludes::ResolveIncludes(TiXmlElement *node, std::map<int, bool>* xmlI
   }
 }
 
-void CGUIIncludes::ResolveIncludesForNode(TiXmlElement *node, std::map<int, bool>* xmlIncludeConditions /* = NULL */)
+void CGUIIncludes::ResolveIncludesForNode(TiXmlElement *node, std::map<INFO::InfoPtr, bool>* xmlIncludeConditions /* = NULL */)
 {
   // we have a node, find any <include file="fileName">tagName</include> tags and replace
   // recursively with their real includes
@@ -242,8 +242,8 @@ void CGUIIncludes::ResolveIncludesForNode(TiXmlElement *node, std::map<int, bool
     const char *condition = include->Attribute("condition");
     if (condition)
     { // check this condition
-      int conditionID = g_infoManager.Register(condition);
-      bool value = g_infoManager.GetBoolValue(conditionID);
+      INFO::InfoPtr conditionID = g_infoManager.Register(condition);
+      bool value = conditionID->Get();
 
       if (xmlIncludeConditions)
         (*xmlIncludeConditions)[conditionID] = value;
index 8b08fdc..004d401 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <map>
 #include <set>
+#include "interfaces/info/InfoBool.h"
 
 // forward definitions
 class TiXmlElement;
@@ -47,11 +48,11 @@ public:
    "bar" from the include file "foo".
    \param node an XML Element - all child elements are traversed.
    */
-  void ResolveIncludes(TiXmlElement *node, std::map<int, bool>* xmlIncludeConditions = NULL);
+  void ResolveIncludes(TiXmlElement *node, std::map<INFO::InfoPtr, bool>* xmlIncludeConditions = NULL);
   const INFO::CSkinVariableString* CreateSkinVariable(const CStdString& name, int context);
 
 private:
-  void ResolveIncludesForNode(TiXmlElement *node, std::map<int, bool>* xmlIncludeConditions = NULL);
+  void ResolveIncludesForNode(TiXmlElement *node, std::map<INFO::InfoPtr, bool>* xmlIncludeConditions = NULL);
   CStdString ResolveConstant(const CStdString &constant) const;
   bool HasIncludeFile(const CStdString &includeFile) const;
   std::map<CStdString, TiXmlElement> m_includes;
index d2039d2..5648a77 100644 (file)
@@ -33,7 +33,6 @@ using ADDON::CAddonMgr;
 
 CGUIInfoBool::CGUIInfoBool(bool value)
 {
-  m_info = 0;
   m_value = value;
 }
 
@@ -57,7 +56,7 @@ void CGUIInfoBool::Parse(const CStdString &expression, int context)
 void CGUIInfoBool::Update(const CGUIListItem *item /*= NULL*/)
 {
   if (m_info)
-    m_value = g_infoManager.GetBoolValue(m_info, item);
+    m_value = m_info->Get(item);
 }
 
 
index 80f7995..8c1c1dc 100644 (file)
@@ -29,6 +29,7 @@
  */
 
 #include "utils/StdString.h"
+#include "interfaces/info/InfoBool.h"
 
 class CGUIListItem;
 
@@ -43,7 +44,7 @@ public:
   void Update(const CGUIListItem *item = NULL);
   void Parse(const CStdString &expression, int context);
 private:
-  unsigned int m_info;
+  INFO::InfoPtr m_info;
   bool m_value;
 };
 
index ebb3754..ce31fc5 100644 (file)
@@ -34,7 +34,6 @@ CGUIListItemLayout::CGUIListItemLayout()
 {
   m_width = 0;
   m_height = 0;
-  m_condition = 0;
   m_focused = false;
   m_invalidated = true;
   m_group.SetPushUpdates(true);
@@ -143,7 +142,7 @@ bool CGUIListItemLayout::MoveRight()
 
 bool CGUIListItemLayout::CheckCondition()
 {
-  return !m_condition || g_infoManager.GetBoolValue(m_condition);
+  return !m_condition || m_condition->Get();
 }
 
 void CGUIListItemLayout::LoadControl(TiXmlElement *child, CGUIControlGroup *group)
index 6ff4f4f..28141c9 100644 (file)
@@ -70,7 +70,7 @@ protected:
   bool m_focused;
   bool m_invalidated;
 
-  unsigned int m_condition;
+  INFO::InfoPtr m_condition;
   CGUIInfoBool m_isPlaying;
 };
 
index 3c40400..5ba965d 100644 (file)
@@ -36,7 +36,6 @@ CGUIRadioButtonControl::CGUIRadioButtonControl(int parentID, int controlID, floa
 {
   m_radioPosX = 0;
   m_radioPosY = 0;
-  m_toggleSelect = 0;
   m_imgRadioOnFocus.SetAspectRatio(CAspectRatio::AR_KEEP);
   m_imgRadioOnNoFocus.SetAspectRatio(CAspectRatio::AR_KEEP);
   m_imgRadioOffFocus.SetAspectRatio(CAspectRatio::AR_KEEP);
@@ -72,7 +71,7 @@ void CGUIRadioButtonControl::Process(unsigned int currentTime, CDirtyRegionList
   if (m_toggleSelect)
   {
     // ask our infoManager whether we are selected or not...
-    bool selected = g_infoManager.GetBoolValue(m_toggleSelect);
+    bool selected = m_toggleSelect->Get();
 
     if (selected != m_bSelected)
     {
index 65315d2..7c34259 100644 (file)
@@ -68,5 +68,5 @@ protected:
   CGUITexture m_imgRadioOffNoFocus;
   float m_radioPosX;
   float m_radioPosY;
-  unsigned int m_toggleSelect;
+  INFO::InfoPtr m_toggleSelect;
 };
index 9088b72..d371691 100644 (file)
@@ -28,7 +28,6 @@ using namespace std;
 
 CGUIStaticItem::CGUIStaticItem(const TiXmlElement *item, int parentID) : CFileItem()
 {
-  m_visCondition = 0;
   m_visState = false;
 
   assert(item);
@@ -91,7 +90,6 @@ CGUIStaticItem::CGUIStaticItem(const TiXmlElement *item, int parentID) : CFileIt
 CGUIStaticItem::CGUIStaticItem(const CFileItem &item)
 : CFileItem(item)
 {
-  m_visCondition = 0;
   m_visState = false;
 }
 
@@ -120,7 +118,7 @@ bool CGUIStaticItem::UpdateVisibility(int contextWindow)
 {
   if (!m_visCondition)
     return false;
-  bool state = g_infoManager.GetBoolValue(m_visCondition);
+  bool state = m_visCondition->Get();
   if (state != m_visState)
   {
     m_visState = state;
index c2d264a..098d8e1 100644 (file)
@@ -89,7 +89,7 @@ public:
 private:
   typedef std::vector< std::pair<CGUIInfoLabel, CStdString> > InfoVector;
   InfoVector m_info;
-  unsigned int m_visCondition;
+  INFO::InfoPtr m_visCondition;
   bool m_visState;
   CGUIAction m_clickActions;
 };
index 81059ea..4483474 100644 (file)
@@ -41,7 +41,6 @@ CGUITextBox::CGUITextBox(int parentID, int controlID, float posX, float posY, fl
   m_pageControl = 0;
   m_lastRenderTime = 0;
   m_scrollTime = scrollTime;
-  m_autoScrollCondition = 0;
   m_autoScrollTime = 0;
   m_autoScrollDelay = 3000;
   m_autoScrollDelayTime = 0;
@@ -124,7 +123,7 @@ void CGUITextBox::Process(unsigned int currentTime, CDirtyRegionList &dirtyregio
   // update our auto-scrolling as necessary
   if (m_autoScrollTime && m_lines.size() > m_itemsPerPage)
   {
-    if (!m_autoScrollCondition || g_infoManager.GetBoolValue(m_autoScrollCondition))
+    if (!m_autoScrollCondition || m_autoScrollCondition->Get())
     {
       if (m_lastRenderTime)
         m_autoScrollDelayTime += currentTime - m_lastRenderTime;
index 2a24de7..40edfb4 100644 (file)
@@ -86,7 +86,7 @@ protected:
   TransformMatrix m_cachedTextMatrix;
 
   // autoscrolling
-  unsigned int m_autoScrollCondition;
+  INFO::InfoPtr m_autoScrollCondition;
   int          m_autoScrollTime;      // time to scroll 1 line (ms)
   int          m_autoScrollDelay;     // delay before scroll (ms)
   unsigned int m_autoScrollDelayTime; // current offset into the delay
index ee0775b..1c80aad 100644 (file)
@@ -217,19 +217,28 @@ void CGUITextLayout::RenderOutline(float x, float y, color_t color, color_t outl
 
 bool CGUITextLayout::Update(const CStdString &text, float maxWidth, bool forceUpdate /*= false*/, bool forceLTRReadingOrder /*= false*/)
 {
-  // convert to utf16
+  if (text == m_lastUtf8Text && !forceUpdate)
+    return false;
+
+  m_lastUtf8Text = text;
   CStdStringW utf16;
   utf8ToW(text, utf16);
-
-  // update
-  return UpdateW(utf16, maxWidth, forceUpdate, forceLTRReadingOrder);
+  UpdateCommon(utf16, maxWidth, forceLTRReadingOrder);
+  return true;
 }
 
 bool CGUITextLayout::UpdateW(const CStdStringW &text, float maxWidth /*= 0*/, bool forceUpdate /*= false*/, bool forceLTRReadingOrder /*= false*/)
 {
-  if (text.Equals(m_lastText) && !forceUpdate)
+  if (text == m_lastText && !forceUpdate)
     return false;
 
+  m_lastText = text;
+  UpdateCommon(text, maxWidth, forceLTRReadingOrder);
+  return true;
+}
+
+void CGUITextLayout::UpdateCommon(const CStdStringW &text, float maxWidth, bool forceLTRReadingOrder)
+{
   // parse the text for style information
   vecText parsedText;
   vecColors colors;
@@ -237,8 +246,6 @@ bool CGUITextLayout::UpdateW(const CStdStringW &text, float maxWidth /*= 0*/, bo
 
   // and update
   UpdateStyled(parsedText, colors, maxWidth, forceLTRReadingOrder);
-  m_lastText = text;
-  return true;
 }
 
 void CGUITextLayout::UpdateStyled(const vecText &text, const vecColors &colors, float maxWidth, bool forceLTRReadingOrder)
index bc2bdfe..2c98e85 100644 (file)
@@ -116,6 +116,7 @@ protected:
   static void BidiTransform(std::vector<CGUIString> &lines, bool forceLTRReadingOrder);
   static CStdStringW BidiFlip(const CStdStringW &text, bool forceLTRReadingOrder);
   void CalcTextExtent();
+  void UpdateCommon(const CStdStringW &text, float maxWidth, bool forceLTRReadingOrder);
 
   // our text to render
   vecColors m_colors;
@@ -131,6 +132,7 @@ protected:
   // the default color (may differ from the font objects defaults)
   color_t m_textColor;
 
+  std::string m_lastUtf8Text;
   CStdStringW m_lastText;
   float m_textWidth;
   float m_textHeight;
index 703373f..3a3e343 100644 (file)
@@ -30,7 +30,6 @@ CGUIToggleButtonControl::CGUIToggleButtonControl(int parentID, int controlID, fl
     : CGUIButtonControl(parentID, controlID, posX, posY, width, height, textureFocus, textureNoFocus, labelInfo)
     , m_selectButton(parentID, controlID, posX, posY, width, height, altTextureFocus, altTextureNoFocus, labelInfo)
 {
-  m_toggleSelect = 0;
   ControlType = GUICONTROL_TOGGLEBUTTON;
 }
 
@@ -43,7 +42,7 @@ void CGUIToggleButtonControl::Process(unsigned int currentTime, CDirtyRegionList
   // ask our infoManager whether we are selected or not...
   bool selected = m_bSelected;
   if (m_toggleSelect)
-    selected = g_infoManager.GetBoolValue(m_toggleSelect);
+    selected = m_toggleSelect->Get();
   if (selected != m_bSelected)
   {
     MarkDirtyRegion();
index 5d7c544..f16b122 100644 (file)
@@ -61,6 +61,6 @@ protected:
   virtual bool UpdateColors();
   virtual void OnClick();
   CGUIButtonControl m_selectButton;
-  unsigned int m_toggleSelect;
+  INFO::InfoPtr m_toggleSelect;
 };
 #endif
index ed6000e..c736700 100644 (file)
@@ -447,7 +447,7 @@ CPoint CGUIWindow::GetPosition() const
   for (unsigned int i = 0; i < m_origins.size(); i++)
   {
     // no condition implies true
-    if (!m_origins[i].condition || g_infoManager.GetBoolValue(m_origins[i].condition))
+    if (!m_origins[i].condition || m_origins[i].condition->Get())
     { // found origin
       return CPoint(m_origins[i].x, m_origins[i].y);
     }
@@ -776,6 +776,7 @@ void CGUIWindow::FreeResources(bool forceUnload /*= FALSE */)
   {
     delete m_windowXMLRootElement;
     m_windowXMLRootElement = NULL;
+    m_xmlIncludeConditions.clear();
   }
 }
 
@@ -791,6 +792,7 @@ void CGUIWindow::ClearAll()
   CGUIControlGroup::ClearAll();
   m_windowLoaded = false;
   m_dynamicResourceAlloc = true;
+  m_visibleCondition.reset();
 }
 
 bool CGUIWindow::Initialize()
@@ -967,7 +969,6 @@ void CGUIWindow::SetDefaults()
   m_defaultControl = 0;
   m_posX = m_posY = m_width = m_height = 0;
   m_overlayState = OVERLAY_STATE_PARENT_WINDOW;   // Use parent or previous window's state
-  m_visibleCondition = 0;
   m_previousWindow = WINDOW_INVALID;
   m_animations.clear();
   m_origins.clear();
index 8e5cd2a..34dd833 100644 (file)
@@ -63,11 +63,10 @@ public:
   COrigin()
   {
     x = y = 0;
-    condition = 0;
   };
   float x;
   float y;
-  unsigned int condition;
+  INFO::InfoPtr condition;
 };
 
 /*!
@@ -281,7 +280,7 @@ protected:
 
 private:
   std::map<CStdString, CVariant, icompare> m_mapProperties;
-  std::map<int, bool> m_xmlIncludeConditions; ///< \brief used to store conditions used to resolve includes for this window
+  std::map<INFO::InfoPtr, bool> m_xmlIncludeConditions; ///< \brief used to store conditions used to resolve includes for this window
 };
 
 #endif
index d4abdcf..170d445 100644 (file)
@@ -360,7 +360,6 @@ CAnimation::CAnimation()
 {
   m_type = ANIM_TYPE_NONE;
   m_reversible = true;
-  m_condition = 0;
   m_repeatAnim = ANIM_REPEAT_NONE;
   m_currentState = ANIM_STATE_NONE;
   m_currentProcess = ANIM_PROCESS_NONE;
@@ -389,7 +388,7 @@ CAnimation &CAnimation::operator =(const CAnimation &src)
   if (this == &src) return *this; // same
   m_type = src.m_type;
   m_reversible = src.m_reversible;
-  m_condition = src.m_condition; // TODO: register/unregister
+  m_condition = src.m_condition;
   m_repeatAnim = src.m_repeatAnim;
   m_lastCondition = src.m_lastCondition;
   m_queuedProcess = src.m_queuedProcess;
@@ -581,12 +580,14 @@ CAnimation CAnimation::CreateFader(float start, float end, unsigned int delay, u
 
 bool CAnimation::CheckCondition()
 {
-  return !m_condition || g_infoManager.GetBoolValue(m_condition);
+  return !m_condition || m_condition->Get();
 }
 
 void CAnimation::UpdateCondition(const CGUIListItem *item)
 {
-  bool condition = g_infoManager.GetBoolValue(m_condition, item);
+  if (!m_condition)
+    return;
+  bool condition = m_condition->Get(item);
   if (condition && !m_lastCondition)
     QueueAnimation(ANIM_PROCESS_NORMAL);
   else if (!condition && m_lastCondition)
@@ -601,7 +602,7 @@ void CAnimation::UpdateCondition(const CGUIListItem *item)
 
 void CAnimation::SetInitialCondition()
 {
-  m_lastCondition = g_infoManager.GetBoolValue(m_condition);
+  m_lastCondition = m_condition ? m_condition->Get() : false;
   if (m_lastCondition)
     ApplyAnimation();
   else
index 0d44455..c065b43 100644 (file)
@@ -33,6 +33,7 @@ class CGUIListItem;
 #include "Geometry.h"         // for CPoint, CRect
 #include "utils/StdString.h"
 #include "boost/shared_ptr.hpp"
+#include "interfaces/info/InfoBool.h"
 
 enum ANIMATION_TYPE
 {
@@ -184,7 +185,7 @@ private:
   // type of animation
   ANIMATION_TYPE m_type;
   bool m_reversible;
-  unsigned int m_condition;
+  INFO::InfoPtr m_condition;
 
   // conditional anims can repeat
   ANIM_REPEAT m_repeatAnim;
index 4fe9952..dda1758 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 2b720ea..007d431 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 118ebb5..fbd6e33 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
diff --git a/xbmc/interfaces/info/InfoBool.cpp b/xbmc/interfaces/info/InfoBool.cpp
deleted file mode 100644 (file)
index db4926c..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- *      Copyright (C) 2005-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 "InfoBool.h"
-#include <stack>
-#include "utils/log.h"
-#include "utils/StringUtils.h"
-#include "GUIInfoManager.h"
-
-using namespace std;
-using namespace INFO;
-
-bool InfoBool::operator==(const InfoBool &right) const
-{
-  return (m_context == right.m_context &&
-          StringUtils::EqualsNoCase(m_expression, right.m_expression));
-}
-
-InfoSingle::InfoSingle(const CStdString &expression, int context)
-: InfoBool(expression, context)
-{
-  m_condition = g_infoManager.TranslateSingleString(expression);
-}
-
-void InfoSingle::Update(const CGUIListItem *item)
-{
-  m_value = g_infoManager.GetBool(m_condition, m_context, item);
-}
-
-InfoExpression::InfoExpression(const CStdString &expression, int context)
-: InfoBool(expression, context)
-{
-  Parse(expression);
-}
-
-void InfoExpression::Update(const CGUIListItem *item)
-{
-  Evaluate(item, m_value);
-}
-
-#define OPERATOR_LB   5
-#define OPERATOR_RB   4
-#define OPERATOR_NOT  3
-#define OPERATOR_AND  2
-#define OPERATOR_OR   1
-
-short InfoExpression::GetOperator(const char ch) const
-{
-  if (ch == '[')
-    return OPERATOR_LB;
-  else if (ch == ']')
-    return OPERATOR_RB;
-  else if (ch == '!')
-    return OPERATOR_NOT;
-  else if (ch == '+')
-    return OPERATOR_AND;
-  else if (ch == '|')
-    return OPERATOR_OR;
-  else
-    return 0;
-}
-
-void InfoExpression::Parse(const CStdString &expression)
-{
-  stack<char> operators;
-  CStdString operand;
-  for (unsigned int i = 0; i < expression.size(); i++)
-  {
-    if (GetOperator(expression[i]))
-    {
-      // cleanup any operand, translate and put into our expression list
-      if (!operand.empty())
-      {
-        unsigned int info = g_infoManager.Register(operand, m_context);
-        if (info)
-        {
-          m_postfix.push_back(m_operands.size());
-          m_operands.push_back(info);
-        }
-        operand.clear();
-      }
-      // handle closing parenthesis
-      if (expression[i] == ']')
-      {
-        while (!operators.empty())
-        {
-          char oper = operators.top();
-          operators.pop();
-
-          if (oper == '[')
-            break;
-
-          m_postfix.push_back(-GetOperator(oper)); // negative denotes operator
-        }
-      }
-      else
-      {
-        // all other operators we pop off the stack any operator
-        // that has a higher priority than the one we have.
-        while (!operators.empty() && GetOperator(operators.top()) > GetOperator(expression[i]))
-        {
-          // only handle parenthesis once they're closed.
-          if (operators.top() == '[' && expression[i] != ']')
-            break;
-
-          m_postfix.push_back(-GetOperator(operators.top()));  // negative denotes operator
-          operators.pop();
-        }
-        operators.push(expression[i]);
-      }
-    }
-    else
-    {
-      operand += expression[i];
-    }
-  }
-
-  if (!operand.empty())
-  {
-    unsigned int info = g_infoManager.Register(operand, m_context);
-    if (info)
-    {
-      m_postfix.push_back(m_operands.size());
-      m_operands.push_back(info);
-    }
-  }
-
-  // finish up by adding any operators
-  while (!operators.empty())
-  {
-    m_postfix.push_back(-GetOperator(operators.top()));  // negative denotes operator
-    operators.pop();
-  }
-
-  // test evaluate
-  bool test;
-  if (!Evaluate(NULL, test))
-    CLog::Log(LOGERROR, "Error evaluating boolean expression %s", expression.c_str());
-}
-
-bool InfoExpression::Evaluate(const CGUIListItem *item, bool &result)
-{
-  stack<bool> save;
-  for (vector<short>::const_iterator it = m_postfix.begin(); it != m_postfix.end(); ++it)
-  {
-    short expr = *it;
-    if (expr == -OPERATOR_NOT)
-    { // NOT the top item on the stack
-      if (save.empty()) return false;
-      bool expr = save.top();
-      save.pop();
-      save.push(!expr);
-    }
-    else if (expr == -OPERATOR_AND)
-    { // AND the top two items on the stack
-      if (save.size() < 2) return false;
-      bool right = save.top(); save.pop();
-      bool left = save.top(); save.pop();
-      save.push(left && right);
-    }
-    else if (expr == -OPERATOR_OR)
-    { // OR the top two items on the stack
-      if (save.size() < 2) return false;
-      bool right = save.top(); save.pop();
-      bool left = save.top(); save.pop();
-      save.push(left || right);
-    }
-    else  // operand
-      save.push(g_infoManager.GetBoolValue(m_operands[expr], item));
-  }
-  if (save.size() != 1)
-    return false;
-  result = save.top();
-  return true;
-}
-
index 2674cac..86a1696 100644 (file)
@@ -20,9 +20,8 @@
 
 #pragma once
 
-#include <vector>
-#include <map>
-#include "utils/StdString.h"
+#include <string>
+#include "boost/shared_ptr.hpp"
 
 class CGUIListItem;
 
@@ -35,79 +34,63 @@ namespace INFO
 class InfoBool
 {
 public:
-  InfoBool(const CStdString &expression, int context)
+  InfoBool(const std::string &expression, int context)
     : m_value(false),
       m_context(context),
+      m_listItemDependent(false),
       m_expression(expression),
-      m_lastUpdate(0)
+      m_dirty(true)
   {
   };
 
   virtual ~InfoBool() {};
 
+  /*! \brief Set the info bool dirty.
+   Will cause the info bool to be re-evaluated next call to Get()
+   */
+  void SetDirty()
+  {
+    m_dirty = true;
+  }
   /*! \brief Get the value of this info bool
-   This is called to update (if necessary) and fetch the value of the info bool
-   \param time current time (used to test if we need to update yet)
+   This is called to update (if dirty) and fetch the value of the info bool
    \param item the item used to evaluate the bool
    */
-  inline bool Get(unsigned int time, const CGUIListItem *item = NULL)
+  inline bool Get(const CGUIListItem *item = NULL)
   {
-    if (item)
+    if (item && m_listItemDependent)
       Update(item);
-    else if (time - m_lastUpdate > 0)
+    else if (m_dirty)
     {
       Update(NULL);
-      m_lastUpdate = time;
+      m_dirty = false;
     }
     return m_value;
   }
 
-  bool operator==(const InfoBool &right) const;
+  bool operator==(const InfoBool &right) const
+  {
+    return (m_context == right.m_context &&
+            m_expression == right.m_expression);
+  }
 
   /*! \brief Update the value of this info bool
    This is called if and only if the info bool is dirty, allowing it to update it's current value
    */
   virtual void Update(const CGUIListItem *item) {};
 
+  const std::string &GetExpression() const { return m_expression; }
+  bool ListItemDependent() const { return m_listItemDependent; }
 protected:
 
   bool m_value;                ///< current value
   int m_context;               ///< contextual information to go with the condition
+  bool m_listItemDependent;    ///< do not cache if a listitem pointer is given
 
 private:
-  CStdString m_expression;     ///< original expression
-  unsigned int m_lastUpdate;   ///< last update time (to determine dirty status)
-};
-
-/*! \brief Class to wrap active boolean conditions
- */
-class InfoSingle : public InfoBool
-{
-public:
-  InfoSingle(const CStdString &condition, int context);
-  virtual ~InfoSingle() {};
-
-  virtual void Update(const CGUIListItem *item);
-private:
-  int m_condition;             ///< actual condition this represents
-};
-
-/*! \brief Class to wrap active boolean expressions
- */
-class InfoExpression : public InfoBool
-{
-public:
-  InfoExpression(const CStdString &expression, int context);
-  virtual ~InfoExpression() {};
-
-  virtual void Update(const CGUIListItem *item);
-private:
-  void Parse(const CStdString &expression);
-  bool Evaluate(const CGUIListItem *item, bool &result);
-  short GetOperator(const char ch) const;
-
-  std::vector<short> m_postfix;         ///< the postfix form of the expression (operators and operand indicies)
-  std::vector<unsigned int> m_operands; ///< the operands in the expression
+  std::string  m_expression;   ///< original expression
+  bool         m_dirty;        ///< whether we need an update
 };
 
+typedef boost::shared_ptr<InfoBool> InfoPtr;
 };
diff --git a/xbmc/interfaces/info/InfoExpression.cpp b/xbmc/interfaces/info/InfoExpression.cpp
new file mode 100644 (file)
index 0000000..d84f0c6
--- /dev/null
@@ -0,0 +1,188 @@
+/*
+ *      Copyright (C) 2005-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 "InfoExpression.h"
+#include <stack>
+#include "utils/log.h"
+#include "GUIInfoManager.h"
+
+using namespace std;
+using namespace INFO;
+
+InfoSingle::InfoSingle(const std::string &expression, int context)
+: InfoBool(expression, context)
+{
+  m_condition = g_infoManager.TranslateSingleString(expression, m_listItemDependent);
+}
+
+void InfoSingle::Update(const CGUIListItem *item)
+{
+  m_value = g_infoManager.GetBool(m_condition, m_context, item);
+}
+
+InfoExpression::InfoExpression(const std::string &expression, int context)
+: InfoBool(expression, context)
+{
+  Parse(expression);
+}
+
+void InfoExpression::Update(const CGUIListItem *item)
+{
+  Evaluate(item, m_value);
+}
+
+#define OPERATOR_LB   5
+#define OPERATOR_RB   4
+#define OPERATOR_NOT  3
+#define OPERATOR_AND  2
+#define OPERATOR_OR   1
+
+short InfoExpression::GetOperator(const char ch) const
+{
+  if (ch == '[')
+    return OPERATOR_LB;
+  else if (ch == ']')
+    return OPERATOR_RB;
+  else if (ch == '!')
+    return OPERATOR_NOT;
+  else if (ch == '+')
+    return OPERATOR_AND;
+  else if (ch == '|')
+    return OPERATOR_OR;
+  else
+    return 0;
+}
+
+void InfoExpression::Parse(const std::string &expression)
+{
+  stack<char> operators;
+  std::string operand;
+  for (unsigned int i = 0; i < expression.size(); i++)
+  {
+    if (GetOperator(expression[i]))
+    {
+      // cleanup any operand, translate and put into our expression list
+      if (!operand.empty())
+      {
+        InfoPtr info = g_infoManager.Register(operand, m_context);
+        if (info)
+        {
+          m_listItemDependent |= info->ListItemDependent();
+          m_postfix.push_back(m_operands.size());
+          m_operands.push_back(info);
+        }
+        operand.clear();
+      }
+      // handle closing parenthesis
+      if (expression[i] == ']')
+      {
+        while (!operators.empty())
+        {
+          char oper = operators.top();
+          operators.pop();
+
+          if (oper == '[')
+            break;
+
+          m_postfix.push_back(-GetOperator(oper)); // negative denotes operator
+        }
+      }
+      else
+      {
+        // all other operators we pop off the stack any operator
+        // that has a higher priority than the one we have.
+        while (!operators.empty() && GetOperator(operators.top()) > GetOperator(expression[i]))
+        {
+          // only handle parenthesis once they're closed.
+          if (operators.top() == '[' && expression[i] != ']')
+            break;
+
+          m_postfix.push_back(-GetOperator(operators.top()));  // negative denotes operator
+          operators.pop();
+        }
+        operators.push(expression[i]);
+      }
+    }
+    else
+    {
+      operand += expression[i];
+    }
+  }
+
+  if (!operand.empty())
+  {
+    InfoPtr info = g_infoManager.Register(operand, m_context);
+    if (info)
+    {
+      m_listItemDependent |= info->ListItemDependent();
+      m_postfix.push_back(m_operands.size());
+      m_operands.push_back(info);
+    }
+  }
+
+  // finish up by adding any operators
+  while (!operators.empty())
+  {
+    m_postfix.push_back(-GetOperator(operators.top()));  // negative denotes operator
+    operators.pop();
+  }
+
+  // test evaluate
+  bool test;
+  if (!Evaluate(NULL, test))
+    CLog::Log(LOGERROR, "Error evaluating boolean expression %s", expression.c_str());
+}
+
+bool InfoExpression::Evaluate(const CGUIListItem *item, bool &result)
+{
+  stack<bool> save;
+  for (vector<short>::const_iterator it = m_postfix.begin(); it != m_postfix.end(); ++it)
+  {
+    short expr = *it;
+    if (expr == -OPERATOR_NOT)
+    { // NOT the top item on the stack
+      if (save.empty()) return false;
+      bool expr = save.top();
+      save.pop();
+      save.push(!expr);
+    }
+    else if (expr == -OPERATOR_AND)
+    { // AND the top two items on the stack
+      if (save.size() < 2) return false;
+      bool right = save.top(); save.pop();
+      bool left = save.top(); save.pop();
+      save.push(left && right);
+    }
+    else if (expr == -OPERATOR_OR)
+    { // OR the top two items on the stack
+      if (save.size() < 2) return false;
+      bool right = save.top(); save.pop();
+      bool left = save.top(); save.pop();
+      save.push(left || right);
+    }
+    else  // operand
+      save.push(m_operands[expr]->Get(item));
+  }
+  if (save.size() != 1)
+    return false;
+  result = save.top();
+  return true;
+}
+
diff --git a/xbmc/interfaces/info/InfoExpression.h b/xbmc/interfaces/info/InfoExpression.h
new file mode 100644 (file)
index 0000000..4e0faee
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ *      Copyright (C) 2005-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/>.
+ *
+ */
+
+#pragma once
+
+#include <vector>
+#include "InfoBool.h"
+
+class CGUIListItem;
+
+namespace INFO
+{
+/*! \brief Class to wrap active boolean conditions
+ */
+class InfoSingle : public InfoBool
+{
+public:
+  InfoSingle(const std::string &condition, int context);
+  virtual ~InfoSingle() {};
+
+  virtual void Update(const CGUIListItem *item);
+private:
+  int m_condition;             ///< actual condition this represents
+};
+
+/*! \brief Class to wrap active boolean expressions
+ */
+class InfoExpression : public InfoBool
+{
+public:
+  InfoExpression(const std::string &expression, int context);
+  virtual ~InfoExpression() {};
+
+  virtual void Update(const CGUIListItem *item);
+private:
+  void Parse(const std::string &expression);
+  bool Evaluate(const CGUIListItem *item, bool &result);
+  short GetOperator(const char ch) const;
+
+  std::vector<short> m_postfix;         ///< the postfix form of the expression (operators and operand indicies)
+  std::vector<InfoPtr> m_operands;      ///< the operands in the expression
+};
+
+};
index a5a18ca..01fdca7 100644 (file)
@@ -1,4 +1,4 @@
-SRCS=InfoBool.cpp \
+SRCS=InfoExpression.cpp \
      SkinVariable.cpp \
      
 LIB=info.a
index 3bb3592..5ca7628 100644 (file)
@@ -25,8 +25,6 @@
 using namespace std;
 using namespace INFO;
 
-#define DEFAULT_VALUE -1
-
 const CSkinVariableString* CSkinVariable::CreateFromXML(const TiXmlElement& node, int context)
 {
   const char* name = node.Attribute("name");
@@ -43,12 +41,10 @@ const CSkinVariableString* CSkinVariable::CreateFromXML(const TiXmlElement& node
         CSkinVariableString::ConditionLabelPair pair;
         if (valuenode->Attribute("condition"))
           pair.m_condition = g_infoManager.Register(valuenode->Attribute("condition"), context);
-        else
-          pair.m_condition = DEFAULT_VALUE;
 
         pair.m_label = CGUIInfoLabel(valuenode->FirstChild()->Value());
         tmp->m_conditionLabelPairs.push_back(pair);
-        if (pair.m_condition == DEFAULT_VALUE)
+        if (!pair.m_condition)
           break; // once we reach default value (without condition) break iterating
       }
       valuenode = valuenode->NextSiblingElement("value");
@@ -78,7 +74,7 @@ CStdString CSkinVariableString::GetValue(bool preferImage /* = false*/, const CG
 {
   for (VECCONDITIONLABELPAIR::const_iterator it = m_conditionLabelPairs.begin() ; it != m_conditionLabelPairs.end(); ++it)
   {
-    if (it->m_condition == DEFAULT_VALUE || g_infoManager.GetBoolValue(it->m_condition, item))
+    if (!it->m_condition || it->m_condition->Get(item))
     {
       if (item)
         return it->m_label.GetItemLabel(item, preferImage);
index da289b8..b1022b8 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "guilib/GUIInfoTypes.h"
+#include "interfaces/info/InfoBool.h"
 
 class TiXmlElement;
 
@@ -47,7 +48,7 @@ private:
 
   struct ConditionLabelPair
   {
-    int m_condition;
+    INFO::InfoPtr m_condition;
     CGUIInfoLabel m_label;
   };
 
index 7e87e1e..9191e47 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index d0a94fe..42988c8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 16a11a9..196ee28 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 505a07b..cc61501 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index a077a23..b546780 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 205e457..f6ada92 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 301d934..2acd4e3 100644 (file)
@@ -608,6 +608,14 @@ bool CTagLoaderTagLib::ParseMP4Tag(MP4::Tag *mp4, EmbeddedArt *art, CMusicInfoTa
     else if (it->first == "trkn")    tag.SetTrackNumber(it->second.toIntPair().first);
     else if (it->first == "disk")    tag.SetPartOfSet(it->second.toIntPair().first);
     else if (it->first == "\251day") tag.SetYear(it->second.toStringList().front().toInt());
+    else if (it->first == "----:com.apple.iTunes:replaygain_track_gain")
+      tag.SetReplayGainTrackGain((int)(atof(it->second.toStringList().front().toCString()) * 100 + 0.5));
+    else if (it->first == "----:com.apple.iTunes:replaygain_album_gain")
+      tag.SetReplayGainAlbumGain((int)(atof(it->second.toStringList().front().toCString()) * 100 + 0.5));
+    else if (it->first == "----:com.apple.iTunes:replaygain_track_peak")
+      tag.SetReplayGainTrackPeak((float)(atof(it->second.toStringList().front().toCString())));
+    else if (it->first == "----:com.apple.iTunes:replaygain_album_peak")
+      tag.SetReplayGainAlbumPeak((float)(atof(it->second.toStringList().front().toCString())));
     else if (it->first == "----:com.apple.iTunes:MusicBrainz Artist Id")
       tag.SetMusicBrainzArtistID(StringListToVectorString(it->second.toStringList()));
     else if (it->first == "----:com.apple.iTunes:MusicBrainz Album Artist Id")
index cf880e8..e903496 100644 (file)
@@ -453,14 +453,14 @@ void CPeripheralCecAdapter::ProcessVolumeChange(void)
   CecVolumeChange pendingVolumeChange = VOLUME_CHANGE_NONE;
   {
     CSingleLock lock(m_critSection);
-    if (m_volumeChangeQueue.size() > 0)
+    if (!m_volumeChangeQueue.empty())
     {
       /* get the first change from the queue */
       pendingVolumeChange = m_volumeChangeQueue.front();
       m_volumeChangeQueue.pop();
 
       /* remove all dupe entries */
-      while (m_volumeChangeQueue.size() > 0 && m_volumeChangeQueue.front() == pendingVolumeChange)
+      while (!m_volumeChangeQueue.empty() && m_volumeChangeQueue.front() == pendingVolumeChange)
         m_volumeChangeQueue.pop();
 
       /* send another keypress after VOLUME_REFRESH_TIMEOUT ms */
index 7cc8047..ed1976b 100644 (file)
@@ -27,8 +27,7 @@ using namespace PERIPHERALS;
 using namespace std;
 
 CPeripheralHID::CPeripheralHID(const PeripheralScanResult& scanResult) :
-  CPeripheral(scanResult),
-  m_bInitialised(false)
+  CPeripheral(scanResult)
 {
   m_strDeviceName = scanResult.m_strDeviceName.empty() ? g_localizeStrings.Get(35001) : scanResult.m_strDeviceName;
   m_features.push_back(FEATURE_HID);
index 41c1a24..bc9ea69 100644 (file)
@@ -34,7 +34,6 @@ namespace PERIPHERALS
     virtual void OnSettingChanged(const CStdString &strChangedSetting);
 
   protected:
-    bool       m_bInitialised;
     CStdString m_strKeymap;
   };
 }
index 9c1c1db..4917ceb 100644 (file)
@@ -592,7 +592,7 @@ bool CSettings::SetList(const std::string &id, const std::vector<CVariant> &valu
       case SettingTypeInteger:
         if (!itValue->isInteger())
           return false;
-        ret = static_cast<CSettingInt*>(settingValue)->SetValue(itValue->asInteger());
+        ret = static_cast<CSettingInt*>(settingValue)->SetValue((int)itValue->asInteger());
         break;
 
       case SettingTypeNumber:
index 2f96b1d..f04b439 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2012-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 15c272f..fd54d13 100644 (file)
@@ -455,7 +455,7 @@ inline CArchive& CArchive::streamin(void* dataPtr, const size_t size)
   size_t read = m_pFile->Read(dataPtr, size);
   if (read < size)
   {
-    CLog::Log(LOGERROR, "%s: can't stream out: requested %lu bytes, was read %lu bytes", (unsigned long)size, (unsigned long)read);
+    CLog::Log(LOGERROR, "%s: can't stream out: requested %lu bytes, was read %lu bytes", __FUNCTION__, (unsigned long)size, (unsigned long)read);
     memset(dataPtr, 0, size);
   }
 
index 0d43c56..5fb0c95 100644 (file)
@@ -777,7 +777,7 @@ bool CCharsetConverter::utf8ToStringCharset(std::string& stringSrcDst)
   return utf8ToStringCharset(strSrc, stringSrcDst);
 }
 
-bool CCharsetConverter::ToUtf8(const std::string& strSourceCharset, const std::string& stringSrc, std::string& utf8StringDst)
+bool CCharsetConverter::ToUtf8(const std::string& strSourceCharset, const std::string& stringSrc, std::string& utf8StringDst, bool failOnBadChar /*= false*/)
 {
   if (strSourceCharset == "UTF-8")
   { // simple case - no conversion necessary
@@ -785,7 +785,7 @@ bool CCharsetConverter::ToUtf8(const std::string& strSourceCharset, const std::s
     return true;
   }
   
-  return CInnerConverter::customConvert(strSourceCharset, "UTF-8", stringSrc, utf8StringDst);
+  return CInnerConverter::customConvert(strSourceCharset, "UTF-8", stringSrc, utf8StringDst, failOnBadChar);
 }
 
 bool CCharsetConverter::utf8To(const std::string& strDestCharset, const std::string& utf8StringSrc, std::string& stringDst)
index 6de9e69..325daa8 100644 (file)
@@ -142,7 +142,7 @@ public:
   static bool utf8To(const std::string& strDestCharset, const std::string& utf8StringSrc, std::u16string& utf16StringDst);
   static bool utf8To(const std::string& strDestCharset, const std::string& utf8StringSrc, std::u32string& utf32StringDst);
 
-  static bool ToUtf8(const std::string& strSourceCharset, const std::string& stringSrc, std::string& utf8StringDst);
+  static bool ToUtf8(const std::string& strSourceCharset, const std::string& stringSrc, std::string& utf8StringDst, bool failOnBadChar = false);
 
   static bool wToUTF8(const std::wstring& wStringSrc, std::string& utf8StringDst, bool failOnBadChar = false);
   static bool utf16BEtoUTF8(const std::u16string& utf16StringSrc, std::string& utf8StringDst);
index cee1a87..33d298b 100644 (file)
@@ -248,6 +248,12 @@ std::string& StringUtils::Trim(std::string &str)
   return TrimRight(str);
 }
 
+std::string& StringUtils::Trim(std::string &str, const char* const chars)
+{
+  TrimLeft(str, chars);
+  return TrimRight(str, chars);
+}
+
 // hack to ensure that std::string::iterator will be dereferenced as _unsigned_ char
 // without this hack "TrimX" functions failed on Win32 with UTF-8 strings
 static int isspace_c(char c)
@@ -261,7 +267,7 @@ std::string& StringUtils::TrimLeft(std::string &str)
   return str;
 }
 
-std::string& StringUtils::TrimLeft(std::string &str, const std::string& chars)
+std::string& StringUtils::TrimLeft(std::string &str, const char* const chars)
 {
   size_t nidx = str.find_first_not_of(chars);
   str.erase(0, nidx);
@@ -274,7 +280,7 @@ std::string& StringUtils::TrimRight(std::string &str)
   return str;
 }
 
-std::string& StringUtils::TrimRight(std::string &str, const std::string& chars)
+std::string& StringUtils::TrimRight(std::string &str, const char* const chars)
 {
   size_t nidx = str.find_last_not_of(chars);
   str.erase(str.npos == nidx ? 0 : ++nidx);
index 3354edd..54c835a 100644 (file)
@@ -67,10 +67,11 @@ public:
   static std::string Mid(const std::string &str, size_t first, size_t count = std::string::npos);
   static std::string Right(const std::string &str, size_t count);
   static std::string& Trim(std::string &str);
+  static std::string& Trim(std::string &str, const char* const chars);
   static std::string& TrimLeft(std::string &str);
-  static std::string& TrimLeft(std::string &str, const std::string &chars);
+  static std::string& TrimLeft(std::string &str, const char* const chars);
   static std::string& TrimRight(std::string &str);
-  static std::string& TrimRight(std::string &str, const std::string &chars);
+  static std::string& TrimRight(std::string &str, const char* const chars);
   static std::string& RemoveDuplicatedSpacesAndTabs(std::string& str);
   static int Replace(std::string &str, char oldChar, char newChar);
   static int Replace(std::string &str, const std::string &oldStr, const std::string &newStr);
index 08f65bb..b432899 100644 (file)
 #include "Temperature.h"
 #include "settings/AdvancedSettings.h"
 
+#ifdef TARGET_POSIX
+#include "../linux/XTimeUtils.h"
+#endif
+
 #include "gtest/gtest.h"
 
 TEST(TestCPUInfo, getUsedPercentage)
@@ -111,7 +115,7 @@ TEST(TestCPUInfo, CoreInfo)
 
 TEST(TestCPUInfo, GetCoresUsageString)
 {
-  EXPECT_STRNE("", g_cpuInfo.GetCoresUsageString());
+  EXPECT_STRNE("", g_cpuInfo.GetCoresUsageString().c_str());
 }
 
 TEST(TestCPUInfo, GetCPUFeatures)
index 9b49de8..fdd4584 100644 (file)
@@ -21,6 +21,7 @@
 #include "settings/Settings.h"
 #include "utils/CharsetConverter.h"
 #include "utils/StdString.h"
+#include "utils/Utf8Utils.h"
 
 #include "gtest/gtest.h"
 
@@ -212,27 +213,25 @@ TEST_F(TestCharsetConverter, isValidUtf8_1)
 {
   varstra1.clear();
   g_charsetConverter.ToUtf8("UTF-16LE", refutf16LE3, varstra1);
-  EXPECT_TRUE(g_charsetConverter.isValidUtf8(varstra1.c_str()));
+  EXPECT_TRUE(CUtf8Utils::isValidUtf8(varstra1.c_str()));
 }
 
 TEST_F(TestCharsetConverter, isValidUtf8_2)
 {
   refstr1 = refutf16LE3;
-  EXPECT_FALSE(g_charsetConverter.isValidUtf8(refstr1));
+  EXPECT_FALSE(CUtf8Utils::isValidUtf8(refstr1));
 }
 
 TEST_F(TestCharsetConverter, isValidUtf8_3)
 {
   varstra1.clear();
   g_charsetConverter.ToUtf8("UTF-16LE", refutf16LE3, varstra1);
-  EXPECT_TRUE(g_charsetConverter.isValidUtf8(varstra1.c_str(),
-                                             varstra1.length() + 1));
+  EXPECT_TRUE(CUtf8Utils::isValidUtf8(varstra1.c_str()));
 }
 
 TEST_F(TestCharsetConverter, isValidUtf8_4)
 {
-  EXPECT_FALSE(g_charsetConverter.isValidUtf8(refutf16LE3,
-                                              sizeof(refutf16LE3)));
+  EXPECT_FALSE(CUtf8Utils::isValidUtf8(refutf16LE3));
 }
 
 /* TODO: Resolve correct input/output for this function */
index 4419194..7d6f7aa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2005-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 3851854..18705ca 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2005-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 8a45593..d51e7f7 100644 (file)
@@ -339,7 +339,7 @@ void CGUIWindowFullScreen::OnWindowLoaded()
   CGUIProgressControl* pProgress = (CGUIProgressControl*)GetControl(CONTROL_PROGRESS);
   if(pProgress)
   {
-    if( pProgress->GetInfo() == 0 || pProgress->GetVisibleCondition() == 0)
+    if( pProgress->GetInfo() == 0 || !pProgress->HasVisibleCondition())
     {
       pProgress->SetInfo(PLAYER_PROGRESS);
       pProgress->SetVisibleCondition("player.displayafterseek");
@@ -348,14 +348,14 @@ void CGUIWindowFullScreen::OnWindowLoaded()
   }
 
   CGUILabelControl* pLabel = (CGUILabelControl*)GetControl(LABEL_BUFFERING);
-  if(pLabel && pLabel->GetVisibleCondition() == 0)
+  if(pLabel && !pLabel->HasVisibleCondition())
   {
     pLabel->SetVisibleCondition("player.caching");
     pLabel->SetVisible(true);
   }
 
   pLabel = (CGUILabelControl*)GetControl(LABEL_CURRENT_TIME);
-  if(pLabel && pLabel->GetVisibleCondition() == 0)
+  if(pLabel && !pLabel->HasVisibleCondition())
   {
     pLabel->SetVisibleCondition("player.displayafterseek");
     pLabel->SetVisible(true);
index 98150b2..ed89dac 100644 (file)
@@ -284,6 +284,39 @@ bool CGUIWindowVideoNav::GetDirectory(const CStdString &strDirectory, CFileItemL
       dir.GetQueryParams(items.GetPath(),params);
       VIDEODATABASEDIRECTORY::NODE_TYPE node = dir.GetDirectoryChildType(items.GetPath());
 
+      // perform the flattening logic for tvshows with a single (unwatched) season (+ optional special season)
+      if (node == NODE_TYPE_SEASONS)
+      {
+        int iFlatten = CSettings::Get().GetInt("videolibrary.flattentvshows");
+        bool bFlatten = (items.GetObjectCount() == 1 && iFlatten == 1) || iFlatten == 2 ||                              // flatten if one one season or if always flatten is enabled
+                        (items.GetObjectCount() == 2 && iFlatten == 1 &&                                                // flatten if one season + specials
+                         (items[0]->GetVideoInfoTag()->m_iSeason == 0 || items[1]->GetVideoInfoTag()->m_iSeason == 0));
+
+        if (iFlatten > 0 && !bFlatten && (WatchedMode)CMediaSettings::Get().GetWatchedMode("tvshows") == WatchedModeUnwatched)
+        {
+          int count = 0;
+          for(int i = 0; i < items.Size(); i++)
+          {
+            const CFileItemPtr item = items.Get(i);
+            if (item->GetProperty("unwatchedepisodes").asInteger() != 0 && item->GetVideoInfoTag()->m_iSeason != 0)
+              count++;
+          }
+          bFlatten = (count < 2); // flatten if there is only 1 unwatched season (not counting specials)
+        }
+
+        if (bFlatten)
+        { // flatten if one season or flatten always
+          items.Clear();
+
+          CVideoDbUrl videoUrl;
+          if (!videoUrl.FromString(items.GetPath()))
+            return false;
+
+          videoUrl.AppendPath("-2/");
+          return GetDirectory(videoUrl.ToString(), items);
+        }
+      }
+
       items.SetArt("thumb", "");
       if (node == VIDEODATABASEDIRECTORY::NODE_TYPE_EPISODES ||
           node == NODE_TYPE_SEASONS                          ||
index 85edf66..bf63791 100644 (file)
@@ -327,7 +327,7 @@ void CGUIViewControl::UpdateViewVisibility()
   for (unsigned int i = 0; i < m_allViews.size(); i++)
   {
     CGUIControl *view = m_allViews[i];
-    if (view->GetVisibleCondition())
+    if (view->HasVisibleCondition())
     {
       view->UpdateVisibility();
       if (view->IsVisibleFromSkin())
index b4b275b..edb6189 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2005-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 1919cfa..c72d3f9 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2005-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 5bf12b7..97a721b 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2005-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 424754b..945b63f 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2005-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 0e5be52..d46870c 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 "system.h"
 
 #if defined (HAVE_WAYLAND)
index e15e767..932cfd2 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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/>.
+ *
+ */
 
 #ifndef WINDOW_EVENTS_WAYLAND_H
 #define WINDOW_EVENTS_WAYLAND_H
index fe77ab0..7ca5007 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index e3813a0..301c16c 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 86a288a..45d0bef 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 9b184a2..6ae6df2 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index c1a4258..df0f52e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index e2955d6..93d2e8d 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 5afb6d0..377bee9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 49b68f9..882d90c 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 1b8b3b1..551c1df 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 915934d..288dbbf 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index df3ac71..b524cb5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 6ae5824..67a6325 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index d1d2907..62aed1b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 205bd03..d9ec149 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index a79a5a2..2a433f3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index f40d2f6..61ce455 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 281ecb0..cdc9bad 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 00f12e0..4e5c19c 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 59a077f..a4070c8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index d052891..eeadd41 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 935d058..9e787c7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 1445ccf..358978d 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 0e77f86..5562635 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 32f12aa..3c7193d 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index ac16f9c..314a30d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index d488754..4e1477a 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 47d8830..18f565f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 64af908..c7d6531 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 1afe103..c3fc774 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 "StubCursorManager.h"
 
 void
index 819ea4c..05273cb 100644 (file)
@@ -1,24 +1,24 @@
 #pragma once
 
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <windowing/wayland/CursorManager.h>
 
 struct wl_surface;
index 6e5f034..b091843 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <stdexcept>
 
 #include "StubEventListener.h"
index 21f0a21..5a15305 100644 (file)
@@ -1,24 +1,24 @@
 #pragma once
 
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <queue>
 
 #include "windowing/wayland/EventListener.h"
index 945717e..84a904e 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 "system.h"
 
 #define WL_EGL_PLATFORM
index 8c3b4d4..3ea559b 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <tr1/tuple>
 
 #include <gtest/gtest.h>
index 2e7f290..4f66ead 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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/>.
+ *
+ */
 #define WL_EGL_PLATFORM
 
 #include <stdexcept>
index 87bdb34..7f3c74f 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <stdlib.h>
 
 #include "TmpEnv.h"
index 0e74fc8..7f67af4 100644 (file)
@@ -1,24 +1,24 @@
 #pragma once
 
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <boost/noncopyable.hpp>
 
 class TmpEnv :
index 36712e8..6a2a877 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <sstream>
 #include <stdexcept>
 
index aba56b1..13026b8 100644 (file)
@@ -1,24 +1,24 @@
 #pragma once
 
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 "system.h"
 
 #include <boost/noncopyable.hpp>
index 8677fb5..844b971 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <sstream>
 #include <stdexcept>
 
index 2eb671b..8808268 100644 (file)
@@ -1,24 +1,24 @@
 #pragma once
 
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <boost/scoped_ptr.hpp>
 
 #include <gtest/gtest.h>
index a7710de..eb17f29 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 "system.h"
 
 #if defined(HAVE_WAYLAND_XBMC_PROTO)
index 3961d0a..1a5545f 100644 (file)
@@ -1,24 +1,24 @@
 #pragma once
 
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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/>.
+ *
+ */
 #if defined(HAVE_WAYLAND_XBMC_PROTO)
 
 #include <boost/noncopyable.hpp>
index 1520765..90c665a 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 "system.h"
 
 #include <sstream>
index b698e88..de6313a 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
 *      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
+*      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
index 3aca635..452083c 100644 (file)
@@ -1,24 +1,24 @@
 #pragma once
 
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 "windowing/XBMC_events.h"
 
 namespace xbmc
index 9491dbb..5b5ea2a 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <algorithm>
 #include <vector>
 
index fb21ec3..9664358 100644 (file)
@@ -1,24 +1,24 @@
 #pragma once
 
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <vector>
 
 #include <boost/weak_ptr.hpp>
index d328a95..c98b353 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index efd7fd2..4d9988c 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <boost/bind.hpp>
 #include <boost/function.hpp>
 #include <boost/scoped_ptr.hpp>
index 5f470a8..3f6d174 100644 (file)
@@ -1,24 +1,24 @@
 #pragma once
 
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <boost/scoped_ptr.hpp>
 
 #include "CursorManager.h"
index 83824c0..1321c67 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 72385e5..44cb59f 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 62bbb27..0f01b2e 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <algorithm>
 #include <sstream>
 #include <vector>
index f658d0e..3a6af53 100644 (file)
@@ -1,24 +1,24 @@
 #pragma once
 
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <boost/scoped_ptr.hpp>
 
 #include "input/linux/Keymap.h"
index 48c63c5..b66e4a9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 1987e06..b617d54 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index c3cd377..8869b2c 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <wayland-client.h>
 #include <xkbcommon/xkbcommon.h>
 
index d1f683a..8844ed0 100644 (file)
@@ -1,24 +1,24 @@
 #pragma once
 
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 "Pointer.h"
 
 struct wl_surface;
index dfd7ec3..70732fc 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <sstream>
 #include <stdexcept>
 
index 31ba07e..07ca2d2 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 15c5571..fbd11c4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 4729ac4..49ae3aa 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index 26bbc50..c1dea95 100644 (file)
@@ -1,24 +1,24 @@
 #pragma once
 
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <boost/function.hpp>
 #include <boost/shared_ptr.hpp>
 
index 5b69fe1..c2bd327 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <algorithm>
 
 #include <boost/bind.hpp>
index 90c11cd..e6c3945 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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
index adad629..93cf18c 100644 (file)
@@ -1,22 +1,22 @@
 /*
-*      Copyright (C) 2005-2013 Team XBMC
-*      http://www.xbmc.org
-*
-*  This Program is free software; you can redistribute it and/or modify
-*  it under the terms of the GNU General Public License as published by
-*  the Free Software Foundation; either version 2, or (at your option)
-*  any later version.
-*
-*  This Program is distributed in the hope that it will be useful,
-*  but WITHOUT ANY WARRANTY; without even the implied warranty of
-*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-*  GNU General Public License for more details.
-*
-*  You should have received a copy of the GNU General Public License
-*  along with XBMC; see the file COPYING.  If not, see
-*  <http://www.gnu.org/licenses/>.
-*
-*/
+ *      Copyright (C) 2005-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 <boost/bind.hpp>
 #include <boost/function.hpp>
 #include <boost/noncopyable.hpp>
index 0387d83..584e011 100644 (file)
@@ -2,7 +2,7 @@
 
 /*
  *      Copyright (C) 2011-2013 Team XBMC
- *      http://www.xbmc.org
+ *      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