aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/skin.confluence/720p/DialogSubtitles.xml40
-rw-r--r--addons/skin.confluence/720p/script-globalsearch-main.xml4
-rwxr-xr-xlanguage/English/strings.po7
-rw-r--r--lib/ffmpeg/libavformat/hls.c9
-rw-r--r--lib/ffmpeg/patches/0058-backport-fixed-not-keeping-custom-http-headers.patch53
-rw-r--r--project/BuildDependencies/scripts/0_package.list2
-rw-r--r--project/VS2010Express/XBMC.vcxproj2
-rw-r--r--project/VS2010Express/XBMC.vcxproj.filters6
-rw-r--r--system/settings/settings.xml8
-rw-r--r--tools/codegenerator/Helper.groovy5
-rw-r--r--xbmc/Application.cpp2
-rw-r--r--xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp32
-rw-r--r--xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAE.cpp5
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp122
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkALSA.h15
-rw-r--r--xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp117
-rw-r--r--xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp23
-rw-r--r--xbmc/cores/VideoRenderers/BaseRenderer.cpp2
-rw-r--r--xbmc/cores/VideoRenderers/BaseRenderer.h1
-rw-r--r--xbmc/cores/VideoRenderers/LinuxRendererGL.cpp182
-rw-r--r--xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp164
-rw-r--r--xbmc/cores/VideoRenderers/LinuxRendererGLES.h6
-rw-r--r--xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp2
-rw-r--r--xbmc/cores/VideoRenderers/WinRenderer.cpp77
-rw-r--r--xbmc/cores/VideoRenderers/WinRenderer.h5
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp2
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h2
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h24
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DXVAHD.cpp701
-rw-r--r--xbmc/cores/dvdplayer/DVDCodecs/Video/DXVAHD.h104
-rw-r--r--xbmc/cores/dvdplayer/DVDFileInfo.cpp2
-rw-r--r--xbmc/cores/dvdplayer/DVDFileInfo.h2
-rw-r--r--xbmc/cores/omxplayer/PCMRemap.cpp2
-rw-r--r--xbmc/cores/omxplayer/PCMRemap.h2
-rw-r--r--xbmc/cores/paplayer/CodecFactory.cpp12
-rw-r--r--xbmc/cores/paplayer/DVDPlayerCodec.cpp13
-rw-r--r--xbmc/epg/EpgSearchFilter.cpp2
-rw-r--r--xbmc/filesystem/NFSFile.cpp44
-rw-r--r--xbmc/filesystem/NFSFile.h1
-rw-r--r--xbmc/filesystem/SMBDirectory.cpp61
-rw-r--r--xbmc/filesystem/SmbFile.cpp100
-rw-r--r--xbmc/filesystem/SmbFile.h19
-rw-r--r--xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeSeasons.cpp29
-rw-r--r--xbmc/filesystem/test/Makefile1
-rw-r--r--xbmc/filesystem/test/TestNfsFile.cpp96
-rw-r--r--xbmc/input/linux/Keymap.h2
-rw-r--r--xbmc/input/linux/XKBCommonKeymap.cpp2
-rw-r--r--xbmc/input/linux/XKBCommonKeymap.h2
-rw-r--r--xbmc/listproviders/DirectoryProvider.cpp2
-rw-r--r--xbmc/listproviders/DirectoryProvider.h2
-rw-r--r--xbmc/listproviders/IListProvider.cpp2
-rw-r--r--xbmc/listproviders/IListProvider.h2
-rw-r--r--xbmc/listproviders/StaticProvider.cpp2
-rw-r--r--xbmc/listproviders/StaticProvider.h2
-rw-r--r--xbmc/music/tags/TagLoaderTagLib.cpp8
-rw-r--r--xbmc/peripherals/devices/PeripheralCecAdapter.cpp4
-rw-r--r--xbmc/peripherals/devices/PeripheralHID.cpp3
-rw-r--r--xbmc/peripherals/devices/PeripheralHID.h1
-rw-r--r--xbmc/settings/Settings.cpp2
-rw-r--r--xbmc/storage/linux/UDevProvider.cpp2
-rw-r--r--xbmc/utils/CharsetConverter.cpp4
-rw-r--r--xbmc/utils/CharsetConverter.h2
-rw-r--r--xbmc/utils/StringUtils.cpp10
-rw-r--r--xbmc/utils/StringUtils.h5
-rw-r--r--xbmc/video/dialogs/GUIDialogSubtitles.cpp2
-rw-r--r--xbmc/video/dialogs/GUIDialogSubtitles.h2
-rw-r--r--xbmc/video/windows/GUIWindowVideoNav.cpp33
-rw-r--r--xbmc/windowing/DllWaylandClient.h2
-rw-r--r--xbmc/windowing/DllWaylandEgl.h2
-rw-r--r--xbmc/windowing/DllXKBCommon.h2
-rw-r--r--xbmc/windowing/WaylandProtocol.h2
-rw-r--r--xbmc/windowing/WinEventsWayland.cpp36
-rw-r--r--xbmc/windowing/WinEventsWayland.h36
-rw-r--r--xbmc/windowing/egl/EGLNativeTypeWayland.cpp2
-rw-r--r--xbmc/windowing/egl/EGLNativeTypeWayland.h2
-rw-r--r--xbmc/windowing/egl/wayland/Callback.cpp2
-rw-r--r--xbmc/windowing/egl/wayland/Callback.h2
-rw-r--r--xbmc/windowing/egl/wayland/Compositor.cpp2
-rw-r--r--xbmc/windowing/egl/wayland/Compositor.h2
-rw-r--r--xbmc/windowing/egl/wayland/Display.cpp2
-rw-r--r--xbmc/windowing/egl/wayland/Display.h2
-rw-r--r--xbmc/windowing/egl/wayland/OpenGLSurface.cpp2
-rw-r--r--xbmc/windowing/egl/wayland/OpenGLSurface.h2
-rw-r--r--xbmc/windowing/egl/wayland/Output.cpp2
-rw-r--r--xbmc/windowing/egl/wayland/Output.h2
-rw-r--r--xbmc/windowing/egl/wayland/Region.cpp2
-rw-r--r--xbmc/windowing/egl/wayland/Region.h2
-rw-r--r--xbmc/windowing/egl/wayland/Registry.cpp2
-rw-r--r--xbmc/windowing/egl/wayland/Registry.h2
-rw-r--r--xbmc/windowing/egl/wayland/Shell.cpp2
-rw-r--r--xbmc/windowing/egl/wayland/Shell.h2
-rw-r--r--xbmc/windowing/egl/wayland/ShellSurface.cpp2
-rw-r--r--xbmc/windowing/egl/wayland/ShellSurface.h2
-rw-r--r--xbmc/windowing/egl/wayland/Surface.cpp2
-rw-r--r--xbmc/windowing/egl/wayland/Surface.h2
-rw-r--r--xbmc/windowing/egl/wayland/WaylandLibraries.cpp2
-rw-r--r--xbmc/windowing/egl/wayland/WaylandLibraries.h2
-rw-r--r--xbmc/windowing/egl/wayland/XBMCConnection.cpp2
-rw-r--r--xbmc/windowing/egl/wayland/XBMCConnection.h2
-rw-r--r--xbmc/windowing/egl/wayland/XBMCSurface.cpp2
-rw-r--r--xbmc/windowing/egl/wayland/XBMCSurface.h2
-rw-r--r--xbmc/windowing/tests/wayland/StubCursorManager.cpp36
-rw-r--r--xbmc/windowing/tests/wayland/StubCursorManager.h36
-rw-r--r--xbmc/windowing/tests/wayland/StubEventListener.cpp36
-rw-r--r--xbmc/windowing/tests/wayland/StubEventListener.h36
-rw-r--r--xbmc/windowing/tests/wayland/TestEGLNativeTypeWayland.cpp36
-rw-r--r--xbmc/windowing/tests/wayland/TestWaylandInputUnit.cpp36
-rw-r--r--xbmc/windowing/tests/wayland/TestXBMCWaylandInputAcceptance.cpp36
-rw-r--r--xbmc/windowing/tests/wayland/TmpEnv.cpp36
-rw-r--r--xbmc/windowing/tests/wayland/TmpEnv.h36
-rw-r--r--xbmc/windowing/tests/wayland/WestonProcess.cpp36
-rw-r--r--xbmc/windowing/tests/wayland/WestonProcess.h36
-rw-r--r--xbmc/windowing/tests/wayland/WestonTest.cpp36
-rw-r--r--xbmc/windowing/tests/wayland/WestonTest.h36
-rw-r--r--xbmc/windowing/tests/wayland/XBMCWayland.cpp36
-rw-r--r--xbmc/windowing/tests/wayland/XBMCWayland.h36
-rw-r--r--xbmc/windowing/tests/wayland/XBMCWaylandTestExtension.cpp36
-rw-r--r--xbmc/windowing/wayland/CursorManager.h2
-rw-r--r--xbmc/windowing/wayland/EventListener.h36
-rw-r--r--xbmc/windowing/wayland/EventLoop.cpp36
-rw-r--r--xbmc/windowing/wayland/EventLoop.h36
-rw-r--r--xbmc/windowing/wayland/EventQueueStrategy.h2
-rw-r--r--xbmc/windowing/wayland/InputFactory.cpp36
-rw-r--r--xbmc/windowing/wayland/InputFactory.h36
-rw-r--r--xbmc/windowing/wayland/Keyboard.cpp2
-rw-r--r--xbmc/windowing/wayland/Keyboard.h2
-rw-r--r--xbmc/windowing/wayland/KeyboardProcessor.cpp36
-rw-r--r--xbmc/windowing/wayland/KeyboardProcessor.h36
-rw-r--r--xbmc/windowing/wayland/Pointer.cpp2
-rw-r--r--xbmc/windowing/wayland/Pointer.h2
-rw-r--r--xbmc/windowing/wayland/PointerProcessor.cpp36
-rw-r--r--xbmc/windowing/wayland/PointerProcessor.h36
-rw-r--r--xbmc/windowing/wayland/PollThread.cpp36
-rw-r--r--xbmc/windowing/wayland/PollThread.h2
-rw-r--r--xbmc/windowing/wayland/Seat.cpp2
-rw-r--r--xbmc/windowing/wayland/Seat.h2
-rw-r--r--xbmc/windowing/wayland/TimeoutManager.h36
-rw-r--r--xbmc/windowing/wayland/Wayland11EventQueueStrategy.cpp36
-rw-r--r--xbmc/windowing/wayland/Wayland11EventQueueStrategy.h2
-rw-r--r--xbmc/windowing/wayland/Wayland12EventQueueStrategy.cpp36
-rw-r--r--xbmc/windowing/wayland/Wayland12EventQueueStrategy.h2
141 files changed, 2251 insertions, 1157 deletions
diff --git a/addons/skin.confluence/720p/DialogSubtitles.xml b/addons/skin.confluence/720p/DialogSubtitles.xml
index fc1e23c55d..fdafbac121 100644
--- a/addons/skin.confluence/720p/DialogSubtitles.xml
+++ b/addons/skin.confluence/720p/DialogSubtitles.xml
@@ -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>
@@ -145,8 +145,8 @@
<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>
@@ -173,8 +173,8 @@
<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>
@@ -216,8 +216,8 @@
<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>
@@ -244,8 +244,8 @@
<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>
@@ -268,7 +268,7 @@
<align>right</align>
<aligny>center</aligny>
<subtype>page</subtype>
- <textcolor>FFFFFFFF</textcolor>
+ <textcolor>white</textcolor>
<onleft>120</onleft>
<onright>120</onright>
<ondown>120</ondown>
@@ -300,7 +300,7 @@
<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>
@@ -334,8 +334,8 @@
<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">
@@ -372,8 +372,8 @@
<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>
@@ -401,8 +401,8 @@
<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>
diff --git a/addons/skin.confluence/720p/script-globalsearch-main.xml b/addons/skin.confluence/720p/script-globalsearch-main.xml
index 175c285ffa..1fd1b0cb1e 100644
--- a/addons/skin.confluence/720p/script-globalsearch-main.xml
+++ b/addons/skin.confluence/720p/script-globalsearch-main.xml
@@ -367,7 +367,7 @@
<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>
@@ -391,7 +391,7 @@
<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>
diff --git a/language/English/strings.po b/language/English/strings.po
index 0cb5e05d0f..bab2c1288d 100755
--- a/language/English/strings.po
+++ b/language/English/strings.po
@@ -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"
diff --git a/lib/ffmpeg/libavformat/hls.c b/lib/ffmpeg/libavformat/hls.c
index 7de6059c5a..2bfb6804fe 100644
--- a/lib/ffmpeg/libavformat/hls.c
+++ b/lib/ffmpeg/libavformat/hls.c
@@ -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
index 0000000000..d57b5b5f17
--- /dev/null
+++ b/lib/ffmpeg/patches/0058-backport-fixed-not-keeping-custom-http-headers.patch
@@ -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
diff --git a/project/BuildDependencies/scripts/0_package.list b/project/BuildDependencies/scripts/0_package.list
index 3e6c859bc2..d4f6f03bc3 100644
--- a/project/BuildDependencies/scripts/0_package.list
+++ b/project/BuildDependencies/scripts/0_package.list
@@ -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
diff --git a/project/VS2010Express/XBMC.vcxproj b/project/VS2010Express/XBMC.vcxproj
index 1ab7191062..3d3b73fae5 100644
--- a/project/VS2010Express/XBMC.vcxproj
+++ b/project/VS2010Express/XBMC.vcxproj
@@ -1742,6 +1742,7 @@
<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" />
@@ -2534,6 +2535,7 @@
<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" />
diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters
index 2686e76a57..007ffb99f5 100644
--- a/project/VS2010Express/XBMC.vcxproj.filters
+++ b/project/VS2010Express/XBMC.vcxproj.filters
@@ -426,6 +426,9 @@
<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>
@@ -3241,6 +3244,9 @@
<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>
diff --git a/system/settings/settings.xml b/system/settings/settings.xml
index 4b69b388a4..1a3aca4805 100644
--- a/system/settings/settings.xml
+++ b/system/settings/settings.xml
@@ -2222,7 +2222,13 @@
<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>
diff --git a/tools/codegenerator/Helper.groovy b/tools/codegenerator/Helper.groovy
index 01fa7e5486..1e98df05e0 100644
--- a/tools/codegenerator/Helper.groovy
+++ b/tools/codegenerator/Helper.groovy
@@ -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))
}
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index effc7a19d8..08bfba0deb 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -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
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
index a3a61647f6..c977c37b6b 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
@@ -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;
}
diff --git a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAE.cpp b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAE.cpp
index d57dd5a3a7..71458ee68c 100644
--- a/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/CoreAudio/CoreAudioAE.cpp
@@ -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;
}
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
index 4f63535d2c..f1e5401ecd 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -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)
{
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h
index d920fdb022..2fafacc7b5 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.h
@@ -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);
diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp
index 2e774b478c..6619e5fb59 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkWASAPI.cpp
@@ -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 */
diff --git a/xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp b/xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp
index 69b37b470b..5d4857114b 100644
--- a/xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp
+++ b/xbmc/cores/AudioEngine/Utils/AEChannelInfo.cpp
@@ -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;
}
diff --git a/xbmc/cores/VideoRenderers/BaseRenderer.cpp b/xbmc/cores/VideoRenderers/BaseRenderer.cpp
index 85dde4ab5b..40a2a80129 100644
--- a/xbmc/cores/VideoRenderers/BaseRenderer.cpp
+++ b/xbmc/cores/VideoRenderers/BaseRenderer.cpp
@@ -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));
diff --git a/xbmc/cores/VideoRenderers/BaseRenderer.h b/xbmc/cores/VideoRenderers/BaseRenderer.h
index a61d3cfd77..5a21fece55 100644
--- a/xbmc/cores/VideoRenderers/BaseRenderer.h
+++ b/xbmc/cores/VideoRenderers/BaseRenderer.h
@@ -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
};
diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
index 600ffa746f..aa52f721ee 100644
--- a/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
+++ b/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp
@@ -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++)
@@ -1846,6 +1771,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 +1895,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 +2058,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);
}
diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
index 136588db25..4d4a8a6fb5 100644
--- a/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
+++ b/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp
@@ -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
diff --git a/xbmc/cores/VideoRenderers/LinuxRendererGLES.h b/xbmc/cores/VideoRenderers/LinuxRendererGLES.h
index 15f7d7b6e6..01db517507 100644
--- a/xbmc/cores/VideoRenderers/LinuxRendererGLES.h
+++ b/xbmc/cores/VideoRenderers/LinuxRendererGLES.h
@@ -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;
diff --git a/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp b/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp
index 28146ee747..f619cba69d 100644
--- a/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp
+++ b/xbmc/cores/VideoRenderers/VideoShaders/WinVideoFilter.cpp
@@ -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];
diff --git a/xbmc/cores/VideoRenderers/WinRenderer.cpp b/xbmc/cores/VideoRenderers/WinRenderer.cpp
index 599f3f42d0..525027d3b8 100644
--- a/xbmc/cores/VideoRenderers/WinRenderer.cpp
+++ b/xbmc/cores/VideoRenderers/WinRenderer.cpp
@@ -20,24 +20,25 @@
#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;
}
diff --git a/xbmc/cores/VideoRenderers/WinRenderer.h b/xbmc/cores/VideoRenderers/WinRenderer.h
index 045a010b61..ca0d788179 100644
--- a/xbmc/cores/VideoRenderers/WinRenderer.h
+++ b/xbmc/cores/VideoRenderers/WinRenderer.h
@@ -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;
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
index f950a34283..64af921e6d 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.cpp
@@ -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
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h
index 5cdf0a1d6b..930d445dd3 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecAndroidMediaCodec.h
@@ -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
diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h
index 263e672d26..3bafe92eb5 100644
--- a/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h
@@ -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
index 0000000000..b59ce46df0
--- /dev/null
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVAHD.cpp
@@ -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
index 0000000000..22a9d39763
--- /dev/null
+++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVAHD.h
@@ -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;
+};
+
+};
diff --git a/xbmc/cores/dvdplayer/DVDFileInfo.cpp b/xbmc/cores/dvdplayer/DVDFileInfo.cpp
index 09a5506c65..e2e2b01b2b 100644
--- a/xbmc/cores/dvdplayer/DVDFileInfo.cpp
+++ b/xbmc/cores/dvdplayer/DVDFileInfo.cpp
@@ -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++)
diff --git a/xbmc/cores/dvdplayer/DVDFileInfo.h b/xbmc/cores/dvdplayer/DVDFileInfo.h
index 3cc81da1f6..f0667361da 100644
--- a/xbmc/cores/dvdplayer/DVDFileInfo.h
+++ b/xbmc/cores/dvdplayer/DVDFileInfo.h
@@ -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);
diff --git a/xbmc/cores/omxplayer/PCMRemap.cpp b/xbmc/cores/omxplayer/PCMRemap.cpp
index 8f8aed3784..f8acfcc779 100644
--- a/xbmc/cores/omxplayer/PCMRemap.cpp
+++ b/xbmc/cores/omxplayer/PCMRemap.cpp
@@ -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
diff --git a/xbmc/cores/omxplayer/PCMRemap.h b/xbmc/cores/omxplayer/PCMRemap.h
index d60b04c026..a273cd1a85 100644
--- a/xbmc/cores/omxplayer/PCMRemap.h
+++ b/xbmc/cores/omxplayer/PCMRemap.h
@@ -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
diff --git a/xbmc/cores/paplayer/CodecFactory.cpp b/xbmc/cores/paplayer/CodecFactory.cpp
index 77791121cc..6d3d229c69 100644
--- a/xbmc/cores/paplayer/CodecFactory.cpp
+++ b/xbmc/cores/paplayer/CodecFactory.cpp
@@ -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"))
diff --git a/xbmc/cores/paplayer/DVDPlayerCodec.cpp b/xbmc/cores/paplayer/DVDPlayerCodec.cpp
index 9a46356c30..4fa3bc0db6 100644
--- a/xbmc/cores/paplayer/DVDPlayerCodec.cpp
+++ b/xbmc/cores/paplayer/DVDPlayerCodec.cpp
@@ -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;
diff --git a/xbmc/epg/EpgSearchFilter.cpp b/xbmc/epg/EpgSearchFilter.cpp
index 60a767fa38..9b37541470 100644
--- a/xbmc/epg/EpgSearchFilter.cpp
+++ b/xbmc/epg/EpgSearchFilter.cpp
@@ -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 */
diff --git a/xbmc/filesystem/NFSFile.cpp b/xbmc/filesystem/NFSFile.cpp
index 3f04a34e69..11bc379ad9 100644
--- a/xbmc/filesystem/NFSFile.cpp
+++ b/xbmc/filesystem/NFSFile.cpp
@@ -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;
}
diff --git a/xbmc/filesystem/NFSFile.h b/xbmc/filesystem/NFSFile.h
index 0972a7de9b..c2892b2781 100644
--- a/xbmc/filesystem/NFSFile.h
+++ b/xbmc/filesystem/NFSFile.h
@@ -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
diff --git a/xbmc/filesystem/SMBDirectory.cpp b/xbmc/filesystem/SMBDirectory.cpp
index 9f1b6b6e04..a9d633999b 100644
--- a/xbmc/filesystem/SMBDirectory.cpp
+++ b/xbmc/filesystem/SMBDirectory.cpp
@@ -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
diff --git a/xbmc/filesystem/SmbFile.cpp b/xbmc/filesystem/SmbFile.cpp
index 21ef81d27e..5d6a62188f 100644
--- a/xbmc/filesystem/SmbFile.cpp
+++ b/xbmc/filesystem/SmbFile.cpp
@@ -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;
}
diff --git a/xbmc/filesystem/SmbFile.h b/xbmc/filesystem/SmbFile.h
index dd8923fa9d..c4bff72b93 100644
--- a/xbmc/filesystem/SmbFile.h
+++ b/xbmc/filesystem/SmbFile.h
@@ -1,3 +1,5 @@
+#pragma once
+
/*
* Copyright (C) 2005-2013 Team XBMC
* http://xbmc.org
@@ -25,18 +27,6 @@
//////////////////////////////////////////////////////////////////////
-
-#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_)
diff --git a/xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeSeasons.cpp b/xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeSeasons.cpp
index 70ec722d75..1ec84bd547 100644
--- a/xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeSeasons.cpp
+++ b/xbmc/filesystem/VideoDatabaseDirectory/DirectoryNodeSeasons.cpp
@@ -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();
diff --git a/xbmc/filesystem/test/Makefile b/xbmc/filesystem/test/Makefile
index 884129356a..6589d71647 100644
--- a/xbmc/filesystem/test/Makefile
+++ b/xbmc/filesystem/test/Makefile
@@ -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
index 0000000000..2106bc8bbb
--- /dev/null
+++ b/xbmc/filesystem/test/TestNfsFile.cpp
@@ -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));
diff --git a/xbmc/input/linux/Keymap.h b/xbmc/input/linux/Keymap.h
index 4fe9952ec5..dda1758558 100644
--- a/xbmc/input/linux/Keymap.h
+++ b/xbmc/input/linux/Keymap.h
@@ -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/input/linux/XKBCommonKeymap.cpp b/xbmc/input/linux/XKBCommonKeymap.cpp
index 2b720ea86e..007d4315ca 100644
--- a/xbmc/input/linux/XKBCommonKeymap.cpp
+++ b/xbmc/input/linux/XKBCommonKeymap.cpp
@@ -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
diff --git a/xbmc/input/linux/XKBCommonKeymap.h b/xbmc/input/linux/XKBCommonKeymap.h
index 118ebb5c11..fbd6e33518 100644
--- a/xbmc/input/linux/XKBCommonKeymap.h
+++ b/xbmc/input/linux/XKBCommonKeymap.h
@@ -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/listproviders/DirectoryProvider.cpp b/xbmc/listproviders/DirectoryProvider.cpp
index 7e87e1e64f..9191e47f8e 100644
--- a/xbmc/listproviders/DirectoryProvider.cpp
+++ b/xbmc/listproviders/DirectoryProvider.cpp
@@ -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
diff --git a/xbmc/listproviders/DirectoryProvider.h b/xbmc/listproviders/DirectoryProvider.h
index d0a94febf3..42988c8abe 100644
--- a/xbmc/listproviders/DirectoryProvider.h
+++ b/xbmc/listproviders/DirectoryProvider.h
@@ -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
diff --git a/xbmc/listproviders/IListProvider.cpp b/xbmc/listproviders/IListProvider.cpp
index 16a11a98b9..196ee28c85 100644
--- a/xbmc/listproviders/IListProvider.cpp
+++ b/xbmc/listproviders/IListProvider.cpp
@@ -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
diff --git a/xbmc/listproviders/IListProvider.h b/xbmc/listproviders/IListProvider.h
index 505a07bbbd..cc61501485 100644
--- a/xbmc/listproviders/IListProvider.h
+++ b/xbmc/listproviders/IListProvider.h
@@ -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
diff --git a/xbmc/listproviders/StaticProvider.cpp b/xbmc/listproviders/StaticProvider.cpp
index a077a23fc1..b546780503 100644
--- a/xbmc/listproviders/StaticProvider.cpp
+++ b/xbmc/listproviders/StaticProvider.cpp
@@ -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
diff --git a/xbmc/listproviders/StaticProvider.h b/xbmc/listproviders/StaticProvider.h
index 205e4575c1..f6ada92574 100644
--- a/xbmc/listproviders/StaticProvider.h
+++ b/xbmc/listproviders/StaticProvider.h
@@ -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
diff --git a/xbmc/music/tags/TagLoaderTagLib.cpp b/xbmc/music/tags/TagLoaderTagLib.cpp
index 301d934c3e..2acd4e3886 100644
--- a/xbmc/music/tags/TagLoaderTagLib.cpp
+++ b/xbmc/music/tags/TagLoaderTagLib.cpp
@@ -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")
diff --git a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
index cf880e896d..e903496786 100644
--- a/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
+++ b/xbmc/peripherals/devices/PeripheralCecAdapter.cpp
@@ -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 */
diff --git a/xbmc/peripherals/devices/PeripheralHID.cpp b/xbmc/peripherals/devices/PeripheralHID.cpp
index 7cc8047879..ed1976b48d 100644
--- a/xbmc/peripherals/devices/PeripheralHID.cpp
+++ b/xbmc/peripherals/devices/PeripheralHID.cpp
@@ -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);
diff --git a/xbmc/peripherals/devices/PeripheralHID.h b/xbmc/peripherals/devices/PeripheralHID.h
index 41c1a24907..bc9ea69f56 100644
--- a/xbmc/peripherals/devices/PeripheralHID.h
+++ b/xbmc/peripherals/devices/PeripheralHID.h
@@ -34,7 +34,6 @@ namespace PERIPHERALS
virtual void OnSettingChanged(const CStdString &strChangedSetting);
protected:
- bool m_bInitialised;
CStdString m_strKeymap;
};
}
diff --git a/xbmc/settings/Settings.cpp b/xbmc/settings/Settings.cpp
index 9c1c1dbb1b..4917ceb292 100644
--- a/xbmc/settings/Settings.cpp
+++ b/xbmc/settings/Settings.cpp
@@ -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:
diff --git a/xbmc/storage/linux/UDevProvider.cpp b/xbmc/storage/linux/UDevProvider.cpp
index 2f96b1d364..f04b439f33 100644
--- a/xbmc/storage/linux/UDevProvider.cpp
+++ b/xbmc/storage/linux/UDevProvider.cpp
@@ -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
diff --git a/xbmc/utils/CharsetConverter.cpp b/xbmc/utils/CharsetConverter.cpp
index 0d43c564b0..5fb0c95885 100644
--- a/xbmc/utils/CharsetConverter.cpp
+++ b/xbmc/utils/CharsetConverter.cpp
@@ -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)
diff --git a/xbmc/utils/CharsetConverter.h b/xbmc/utils/CharsetConverter.h
index 6de9e69303..325daa8fa3 100644
--- a/xbmc/utils/CharsetConverter.h
+++ b/xbmc/utils/CharsetConverter.h
@@ -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);
diff --git a/xbmc/utils/StringUtils.cpp b/xbmc/utils/StringUtils.cpp
index e34a2a5785..ca84fdd9d7 100644
--- a/xbmc/utils/StringUtils.cpp
+++ b/xbmc/utils/StringUtils.cpp
@@ -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);
diff --git a/xbmc/utils/StringUtils.h b/xbmc/utils/StringUtils.h
index 1d1aade92a..4f5d891317 100644
--- a/xbmc/utils/StringUtils.h
+++ b/xbmc/utils/StringUtils.h
@@ -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);
diff --git a/xbmc/video/dialogs/GUIDialogSubtitles.cpp b/xbmc/video/dialogs/GUIDialogSubtitles.cpp
index 4419194299..7d6f7aa215 100644
--- a/xbmc/video/dialogs/GUIDialogSubtitles.cpp
+++ b/xbmc/video/dialogs/GUIDialogSubtitles.cpp
@@ -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
diff --git a/xbmc/video/dialogs/GUIDialogSubtitles.h b/xbmc/video/dialogs/GUIDialogSubtitles.h
index 385185473e..18705ca1d6 100644
--- a/xbmc/video/dialogs/GUIDialogSubtitles.h
+++ b/xbmc/video/dialogs/GUIDialogSubtitles.h
@@ -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
diff --git a/xbmc/video/windows/GUIWindowVideoNav.cpp b/xbmc/video/windows/GUIWindowVideoNav.cpp
index 98150b21d5..ed89dac625 100644
--- a/xbmc/video/windows/GUIWindowVideoNav.cpp
+++ b/xbmc/video/windows/GUIWindowVideoNav.cpp
@@ -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 ||
diff --git a/xbmc/windowing/DllWaylandClient.h b/xbmc/windowing/DllWaylandClient.h
index b4b275b20d..edb6189edb 100644
--- a/xbmc/windowing/DllWaylandClient.h
+++ b/xbmc/windowing/DllWaylandClient.h
@@ -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
diff --git a/xbmc/windowing/DllWaylandEgl.h b/xbmc/windowing/DllWaylandEgl.h
index 1919cfa9b8..c72d3f9d80 100644
--- a/xbmc/windowing/DllWaylandEgl.h
+++ b/xbmc/windowing/DllWaylandEgl.h
@@ -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
diff --git a/xbmc/windowing/DllXKBCommon.h b/xbmc/windowing/DllXKBCommon.h
index 5bf12b7742..97a721b89e 100644
--- a/xbmc/windowing/DllXKBCommon.h
+++ b/xbmc/windowing/DllXKBCommon.h
@@ -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
diff --git a/xbmc/windowing/WaylandProtocol.h b/xbmc/windowing/WaylandProtocol.h
index 424754bf3a..945b63f99a 100644
--- a/xbmc/windowing/WaylandProtocol.h
+++ b/xbmc/windowing/WaylandProtocol.h
@@ -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
diff --git a/xbmc/windowing/WinEventsWayland.cpp b/xbmc/windowing/WinEventsWayland.cpp
index 0e5be52aaf..d46870cbde 100644
--- a/xbmc/windowing/WinEventsWayland.cpp
+++ b/xbmc/windowing/WinEventsWayland.cpp
@@ -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)
diff --git a/xbmc/windowing/WinEventsWayland.h b/xbmc/windowing/WinEventsWayland.h
index e15e767384..932cfd272b 100644
--- a/xbmc/windowing/WinEventsWayland.h
+++ b/xbmc/windowing/WinEventsWayland.h
@@ -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
diff --git a/xbmc/windowing/egl/EGLNativeTypeWayland.cpp b/xbmc/windowing/egl/EGLNativeTypeWayland.cpp
index fe77ab01e1..7ca5007f67 100644
--- a/xbmc/windowing/egl/EGLNativeTypeWayland.cpp
+++ b/xbmc/windowing/egl/EGLNativeTypeWayland.cpp
@@ -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
diff --git a/xbmc/windowing/egl/EGLNativeTypeWayland.h b/xbmc/windowing/egl/EGLNativeTypeWayland.h
index e3813a0c51..301c16c53b 100644
--- a/xbmc/windowing/egl/EGLNativeTypeWayland.h
+++ b/xbmc/windowing/egl/EGLNativeTypeWayland.h
@@ -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/windowing/egl/wayland/Callback.cpp b/xbmc/windowing/egl/wayland/Callback.cpp
index 86a288a960..45d0befa72 100644
--- a/xbmc/windowing/egl/wayland/Callback.cpp
+++ b/xbmc/windowing/egl/wayland/Callback.cpp
@@ -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
diff --git a/xbmc/windowing/egl/wayland/Callback.h b/xbmc/windowing/egl/wayland/Callback.h
index 9b184a2ec0..6ae6df2184 100644
--- a/xbmc/windowing/egl/wayland/Callback.h
+++ b/xbmc/windowing/egl/wayland/Callback.h
@@ -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/windowing/egl/wayland/Compositor.cpp b/xbmc/windowing/egl/wayland/Compositor.cpp
index c1a4258c83..df0f52e5b9 100644
--- a/xbmc/windowing/egl/wayland/Compositor.cpp
+++ b/xbmc/windowing/egl/wayland/Compositor.cpp
@@ -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
diff --git a/xbmc/windowing/egl/wayland/Compositor.h b/xbmc/windowing/egl/wayland/Compositor.h
index e2955d6453..93d2e8d1ed 100644
--- a/xbmc/windowing/egl/wayland/Compositor.h
+++ b/xbmc/windowing/egl/wayland/Compositor.h
@@ -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/windowing/egl/wayland/Display.cpp b/xbmc/windowing/egl/wayland/Display.cpp
index 5afb6d034d..377bee98bb 100644
--- a/xbmc/windowing/egl/wayland/Display.cpp
+++ b/xbmc/windowing/egl/wayland/Display.cpp
@@ -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
diff --git a/xbmc/windowing/egl/wayland/Display.h b/xbmc/windowing/egl/wayland/Display.h
index 49b68f9bb1..882d90cde8 100644
--- a/xbmc/windowing/egl/wayland/Display.h
+++ b/xbmc/windowing/egl/wayland/Display.h
@@ -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/windowing/egl/wayland/OpenGLSurface.cpp b/xbmc/windowing/egl/wayland/OpenGLSurface.cpp
index 1b8b3b1cba..551c1df48f 100644
--- a/xbmc/windowing/egl/wayland/OpenGLSurface.cpp
+++ b/xbmc/windowing/egl/wayland/OpenGLSurface.cpp
@@ -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
diff --git a/xbmc/windowing/egl/wayland/OpenGLSurface.h b/xbmc/windowing/egl/wayland/OpenGLSurface.h
index 915934d2ce..288dbbf196 100644
--- a/xbmc/windowing/egl/wayland/OpenGLSurface.h
+++ b/xbmc/windowing/egl/wayland/OpenGLSurface.h
@@ -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/windowing/egl/wayland/Output.cpp b/xbmc/windowing/egl/wayland/Output.cpp
index df3ac71d95..b524cb5d30 100644
--- a/xbmc/windowing/egl/wayland/Output.cpp
+++ b/xbmc/windowing/egl/wayland/Output.cpp
@@ -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
diff --git a/xbmc/windowing/egl/wayland/Output.h b/xbmc/windowing/egl/wayland/Output.h
index 6ae5824c73..67a6325f63 100644
--- a/xbmc/windowing/egl/wayland/Output.h
+++ b/xbmc/windowing/egl/wayland/Output.h
@@ -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/windowing/egl/wayland/Region.cpp b/xbmc/windowing/egl/wayland/Region.cpp
index d1d2907c59..62aed1b601 100644
--- a/xbmc/windowing/egl/wayland/Region.cpp
+++ b/xbmc/windowing/egl/wayland/Region.cpp
@@ -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
diff --git a/xbmc/windowing/egl/wayland/Region.h b/xbmc/windowing/egl/wayland/Region.h
index 205bd036ad..d9ec149783 100644
--- a/xbmc/windowing/egl/wayland/Region.h
+++ b/xbmc/windowing/egl/wayland/Region.h
@@ -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/windowing/egl/wayland/Registry.cpp b/xbmc/windowing/egl/wayland/Registry.cpp
index a79a5a2ba1..2a433f3526 100644
--- a/xbmc/windowing/egl/wayland/Registry.cpp
+++ b/xbmc/windowing/egl/wayland/Registry.cpp
@@ -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
diff --git a/xbmc/windowing/egl/wayland/Registry.h b/xbmc/windowing/egl/wayland/Registry.h
index f40d2f60e4..61ce455c45 100644
--- a/xbmc/windowing/egl/wayland/Registry.h
+++ b/xbmc/windowing/egl/wayland/Registry.h
@@ -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/windowing/egl/wayland/Shell.cpp b/xbmc/windowing/egl/wayland/Shell.cpp
index 281ecb06cb..cdc9bad09a 100644
--- a/xbmc/windowing/egl/wayland/Shell.cpp
+++ b/xbmc/windowing/egl/wayland/Shell.cpp
@@ -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
diff --git a/xbmc/windowing/egl/wayland/Shell.h b/xbmc/windowing/egl/wayland/Shell.h
index 00f12e0277..4e5c19ce1e 100644
--- a/xbmc/windowing/egl/wayland/Shell.h
+++ b/xbmc/windowing/egl/wayland/Shell.h
@@ -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/windowing/egl/wayland/ShellSurface.cpp b/xbmc/windowing/egl/wayland/ShellSurface.cpp
index 59a077f74f..a4070c8e23 100644
--- a/xbmc/windowing/egl/wayland/ShellSurface.cpp
+++ b/xbmc/windowing/egl/wayland/ShellSurface.cpp
@@ -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
diff --git a/xbmc/windowing/egl/wayland/ShellSurface.h b/xbmc/windowing/egl/wayland/ShellSurface.h
index d0528913af..eeadd41466 100644
--- a/xbmc/windowing/egl/wayland/ShellSurface.h
+++ b/xbmc/windowing/egl/wayland/ShellSurface.h
@@ -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/windowing/egl/wayland/Surface.cpp b/xbmc/windowing/egl/wayland/Surface.cpp
index 935d058ec4..9e787c75c8 100644
--- a/xbmc/windowing/egl/wayland/Surface.cpp
+++ b/xbmc/windowing/egl/wayland/Surface.cpp
@@ -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
diff --git a/xbmc/windowing/egl/wayland/Surface.h b/xbmc/windowing/egl/wayland/Surface.h
index 1445ccfe55..358978d324 100644
--- a/xbmc/windowing/egl/wayland/Surface.h
+++ b/xbmc/windowing/egl/wayland/Surface.h
@@ -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/windowing/egl/wayland/WaylandLibraries.cpp b/xbmc/windowing/egl/wayland/WaylandLibraries.cpp
index 0e77f86aad..5562635808 100644
--- a/xbmc/windowing/egl/wayland/WaylandLibraries.cpp
+++ b/xbmc/windowing/egl/wayland/WaylandLibraries.cpp
@@ -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
diff --git a/xbmc/windowing/egl/wayland/WaylandLibraries.h b/xbmc/windowing/egl/wayland/WaylandLibraries.h
index 32f12aaf15..3c7193d869 100644
--- a/xbmc/windowing/egl/wayland/WaylandLibraries.h
+++ b/xbmc/windowing/egl/wayland/WaylandLibraries.h
@@ -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/windowing/egl/wayland/XBMCConnection.cpp b/xbmc/windowing/egl/wayland/XBMCConnection.cpp
index ac16f9cc44..314a30d161 100644
--- a/xbmc/windowing/egl/wayland/XBMCConnection.cpp
+++ b/xbmc/windowing/egl/wayland/XBMCConnection.cpp
@@ -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
diff --git a/xbmc/windowing/egl/wayland/XBMCConnection.h b/xbmc/windowing/egl/wayland/XBMCConnection.h
index d488754ae9..4e1477aa67 100644
--- a/xbmc/windowing/egl/wayland/XBMCConnection.h
+++ b/xbmc/windowing/egl/wayland/XBMCConnection.h
@@ -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/windowing/egl/wayland/XBMCSurface.cpp b/xbmc/windowing/egl/wayland/XBMCSurface.cpp
index 47d88306f7..18f565f490 100644
--- a/xbmc/windowing/egl/wayland/XBMCSurface.cpp
+++ b/xbmc/windowing/egl/wayland/XBMCSurface.cpp
@@ -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
diff --git a/xbmc/windowing/egl/wayland/XBMCSurface.h b/xbmc/windowing/egl/wayland/XBMCSurface.h
index 64af908b3b..c7d6531035 100644
--- a/xbmc/windowing/egl/wayland/XBMCSurface.h
+++ b/xbmc/windowing/egl/wayland/XBMCSurface.h
@@ -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/windowing/tests/wayland/StubCursorManager.cpp b/xbmc/windowing/tests/wayland/StubCursorManager.cpp
index 1afe10389c..c3fc774645 100644
--- a/xbmc/windowing/tests/wayland/StubCursorManager.cpp
+++ b/xbmc/windowing/tests/wayland/StubCursorManager.cpp
@@ -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
diff --git a/xbmc/windowing/tests/wayland/StubCursorManager.h b/xbmc/windowing/tests/wayland/StubCursorManager.h
index 819ea4c627..05273cb7ca 100644
--- a/xbmc/windowing/tests/wayland/StubCursorManager.h
+++ b/xbmc/windowing/tests/wayland/StubCursorManager.h
@@ -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;
diff --git a/xbmc/windowing/tests/wayland/StubEventListener.cpp b/xbmc/windowing/tests/wayland/StubEventListener.cpp
index 6e5f034a57..b091843ba6 100644
--- a/xbmc/windowing/tests/wayland/StubEventListener.cpp
+++ b/xbmc/windowing/tests/wayland/StubEventListener.cpp
@@ -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"
diff --git a/xbmc/windowing/tests/wayland/StubEventListener.h b/xbmc/windowing/tests/wayland/StubEventListener.h
index 21f0a21741..5a15305a54 100644
--- a/xbmc/windowing/tests/wayland/StubEventListener.h
+++ b/xbmc/windowing/tests/wayland/StubEventListener.h
@@ -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"
diff --git a/xbmc/windowing/tests/wayland/TestEGLNativeTypeWayland.cpp b/xbmc/windowing/tests/wayland/TestEGLNativeTypeWayland.cpp
index 945717eade..84a904e4ef 100644
--- a/xbmc/windowing/tests/wayland/TestEGLNativeTypeWayland.cpp
+++ b/xbmc/windowing/tests/wayland/TestEGLNativeTypeWayland.cpp
@@ -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
diff --git a/xbmc/windowing/tests/wayland/TestWaylandInputUnit.cpp b/xbmc/windowing/tests/wayland/TestWaylandInputUnit.cpp
index 8c3b4d427c..3ea559b2df 100644
--- a/xbmc/windowing/tests/wayland/TestWaylandInputUnit.cpp
+++ b/xbmc/windowing/tests/wayland/TestWaylandInputUnit.cpp
@@ -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>
diff --git a/xbmc/windowing/tests/wayland/TestXBMCWaylandInputAcceptance.cpp b/xbmc/windowing/tests/wayland/TestXBMCWaylandInputAcceptance.cpp
index 2e7f2908db..4f66ead2ad 100644
--- a/xbmc/windowing/tests/wayland/TestXBMCWaylandInputAcceptance.cpp
+++ b/xbmc/windowing/tests/wayland/TestXBMCWaylandInputAcceptance.cpp
@@ -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>
diff --git a/xbmc/windowing/tests/wayland/TmpEnv.cpp b/xbmc/windowing/tests/wayland/TmpEnv.cpp
index 87bdb34136..7f3c74f923 100644
--- a/xbmc/windowing/tests/wayland/TmpEnv.cpp
+++ b/xbmc/windowing/tests/wayland/TmpEnv.cpp
@@ -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"
diff --git a/xbmc/windowing/tests/wayland/TmpEnv.h b/xbmc/windowing/tests/wayland/TmpEnv.h
index 0e74fc8089..7f67af4c2f 100644
--- a/xbmc/windowing/tests/wayland/TmpEnv.h
+++ b/xbmc/windowing/tests/wayland/TmpEnv.h
@@ -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 :
diff --git a/xbmc/windowing/tests/wayland/WestonProcess.cpp b/xbmc/windowing/tests/wayland/WestonProcess.cpp
index 36712e8ca6..6a2a877d03 100644
--- a/xbmc/windowing/tests/wayland/WestonProcess.cpp
+++ b/xbmc/windowing/tests/wayland/WestonProcess.cpp
@@ -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>
diff --git a/xbmc/windowing/tests/wayland/WestonProcess.h b/xbmc/windowing/tests/wayland/WestonProcess.h
index aba56b1434..13026b8b97 100644
--- a/xbmc/windowing/tests/wayland/WestonProcess.h
+++ b/xbmc/windowing/tests/wayland/WestonProcess.h
@@ -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>
diff --git a/xbmc/windowing/tests/wayland/WestonTest.cpp b/xbmc/windowing/tests/wayland/WestonTest.cpp
index 8677fb5f85..844b971cc5 100644
--- a/xbmc/windowing/tests/wayland/WestonTest.cpp
+++ b/xbmc/windowing/tests/wayland/WestonTest.cpp
@@ -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>
diff --git a/xbmc/windowing/tests/wayland/WestonTest.h b/xbmc/windowing/tests/wayland/WestonTest.h
index 2eb671b077..8808268dff 100644
--- a/xbmc/windowing/tests/wayland/WestonTest.h
+++ b/xbmc/windowing/tests/wayland/WestonTest.h
@@ -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>
diff --git a/xbmc/windowing/tests/wayland/XBMCWayland.cpp b/xbmc/windowing/tests/wayland/XBMCWayland.cpp
index a7710de4f7..eb17f29646 100644
--- a/xbmc/windowing/tests/wayland/XBMCWayland.cpp
+++ b/xbmc/windowing/tests/wayland/XBMCWayland.cpp
@@ -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)
diff --git a/xbmc/windowing/tests/wayland/XBMCWayland.h b/xbmc/windowing/tests/wayland/XBMCWayland.h
index 3961d0a1b7..1a5545f89b 100644
--- a/xbmc/windowing/tests/wayland/XBMCWayland.h
+++ b/xbmc/windowing/tests/wayland/XBMCWayland.h
@@ -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>
diff --git a/xbmc/windowing/tests/wayland/XBMCWaylandTestExtension.cpp b/xbmc/windowing/tests/wayland/XBMCWaylandTestExtension.cpp
index 1520765b66..90c665abcc 100644
--- a/xbmc/windowing/tests/wayland/XBMCWaylandTestExtension.cpp
+++ b/xbmc/windowing/tests/wayland/XBMCWaylandTestExtension.cpp
@@ -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>
diff --git a/xbmc/windowing/wayland/CursorManager.h b/xbmc/windowing/wayland/CursorManager.h
index b698e88cf2..de6313a093 100644
--- a/xbmc/windowing/wayland/CursorManager.h
+++ b/xbmc/windowing/wayland/CursorManager.h
@@ -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
diff --git a/xbmc/windowing/wayland/EventListener.h b/xbmc/windowing/wayland/EventListener.h
index 3aca635214..452083cca1 100644
--- a/xbmc/windowing/wayland/EventListener.h
+++ b/xbmc/windowing/wayland/EventListener.h
@@ -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
diff --git a/xbmc/windowing/wayland/EventLoop.cpp b/xbmc/windowing/wayland/EventLoop.cpp
index 9491dbb28f..5b5ea2a46d 100644
--- a/xbmc/windowing/wayland/EventLoop.cpp
+++ b/xbmc/windowing/wayland/EventLoop.cpp
@@ -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>
diff --git a/xbmc/windowing/wayland/EventLoop.h b/xbmc/windowing/wayland/EventLoop.h
index fb21ec3d43..9664358527 100644
--- a/xbmc/windowing/wayland/EventLoop.h
+++ b/xbmc/windowing/wayland/EventLoop.h
@@ -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>
diff --git a/xbmc/windowing/wayland/EventQueueStrategy.h b/xbmc/windowing/wayland/EventQueueStrategy.h
index d328a95c12..c98b3536b1 100644
--- a/xbmc/windowing/wayland/EventQueueStrategy.h
+++ b/xbmc/windowing/wayland/EventQueueStrategy.h
@@ -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/windowing/wayland/InputFactory.cpp b/xbmc/windowing/wayland/InputFactory.cpp
index efd7fd260b..4d9988c176 100644
--- a/xbmc/windowing/wayland/InputFactory.cpp
+++ b/xbmc/windowing/wayland/InputFactory.cpp
@@ -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>
diff --git a/xbmc/windowing/wayland/InputFactory.h b/xbmc/windowing/wayland/InputFactory.h
index 5f470a860b..3f6d174647 100644
--- a/xbmc/windowing/wayland/InputFactory.h
+++ b/xbmc/windowing/wayland/InputFactory.h
@@ -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"
diff --git a/xbmc/windowing/wayland/Keyboard.cpp b/xbmc/windowing/wayland/Keyboard.cpp
index 83824c02ad..1321c67a3f 100644
--- a/xbmc/windowing/wayland/Keyboard.cpp
+++ b/xbmc/windowing/wayland/Keyboard.cpp
@@ -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
diff --git a/xbmc/windowing/wayland/Keyboard.h b/xbmc/windowing/wayland/Keyboard.h
index 72385e5697..44cb59fafa 100644
--- a/xbmc/windowing/wayland/Keyboard.h
+++ b/xbmc/windowing/wayland/Keyboard.h
@@ -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/windowing/wayland/KeyboardProcessor.cpp b/xbmc/windowing/wayland/KeyboardProcessor.cpp
index 62bbb2769d..0f01b2efb4 100644
--- a/xbmc/windowing/wayland/KeyboardProcessor.cpp
+++ b/xbmc/windowing/wayland/KeyboardProcessor.cpp
@@ -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>
diff --git a/xbmc/windowing/wayland/KeyboardProcessor.h b/xbmc/windowing/wayland/KeyboardProcessor.h
index f658d0e109..3a6af53445 100644
--- a/xbmc/windowing/wayland/KeyboardProcessor.h
+++ b/xbmc/windowing/wayland/KeyboardProcessor.h
@@ -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"
diff --git a/xbmc/windowing/wayland/Pointer.cpp b/xbmc/windowing/wayland/Pointer.cpp
index 48c63c57fb..b66e4a9a7b 100644
--- a/xbmc/windowing/wayland/Pointer.cpp
+++ b/xbmc/windowing/wayland/Pointer.cpp
@@ -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
diff --git a/xbmc/windowing/wayland/Pointer.h b/xbmc/windowing/wayland/Pointer.h
index 1987e06201..b617d5495d 100644
--- a/xbmc/windowing/wayland/Pointer.h
+++ b/xbmc/windowing/wayland/Pointer.h
@@ -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/windowing/wayland/PointerProcessor.cpp b/xbmc/windowing/wayland/PointerProcessor.cpp
index c3cd377c37..8869b2c61a 100644
--- a/xbmc/windowing/wayland/PointerProcessor.cpp
+++ b/xbmc/windowing/wayland/PointerProcessor.cpp
@@ -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>
diff --git a/xbmc/windowing/wayland/PointerProcessor.h b/xbmc/windowing/wayland/PointerProcessor.h
index d1f683ad5b..8844ed0d00 100644
--- a/xbmc/windowing/wayland/PointerProcessor.h
+++ b/xbmc/windowing/wayland/PointerProcessor.h
@@ -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;
diff --git a/xbmc/windowing/wayland/PollThread.cpp b/xbmc/windowing/wayland/PollThread.cpp
index dfd7ec3181..70732fc950 100644
--- a/xbmc/windowing/wayland/PollThread.cpp
+++ b/xbmc/windowing/wayland/PollThread.cpp
@@ -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>
diff --git a/xbmc/windowing/wayland/PollThread.h b/xbmc/windowing/wayland/PollThread.h
index 31ba07e03b..07ca2d2bc1 100644
--- a/xbmc/windowing/wayland/PollThread.h
+++ b/xbmc/windowing/wayland/PollThread.h
@@ -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/windowing/wayland/Seat.cpp b/xbmc/windowing/wayland/Seat.cpp
index 15c5571664..fbd11c47ab 100644
--- a/xbmc/windowing/wayland/Seat.cpp
+++ b/xbmc/windowing/wayland/Seat.cpp
@@ -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
diff --git a/xbmc/windowing/wayland/Seat.h b/xbmc/windowing/wayland/Seat.h
index 4729ac4066..49ae3aad06 100644
--- a/xbmc/windowing/wayland/Seat.h
+++ b/xbmc/windowing/wayland/Seat.h
@@ -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/windowing/wayland/TimeoutManager.h b/xbmc/windowing/wayland/TimeoutManager.h
index 26bbc508cd..c1dea95f10 100644
--- a/xbmc/windowing/wayland/TimeoutManager.h
+++ b/xbmc/windowing/wayland/TimeoutManager.h
@@ -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>
diff --git a/xbmc/windowing/wayland/Wayland11EventQueueStrategy.cpp b/xbmc/windowing/wayland/Wayland11EventQueueStrategy.cpp
index 5b69fe14eb..c2bd327804 100644
--- a/xbmc/windowing/wayland/Wayland11EventQueueStrategy.cpp
+++ b/xbmc/windowing/wayland/Wayland11EventQueueStrategy.cpp
@@ -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>
diff --git a/xbmc/windowing/wayland/Wayland11EventQueueStrategy.h b/xbmc/windowing/wayland/Wayland11EventQueueStrategy.h
index 90c11cd64c..e6c394555e 100644
--- a/xbmc/windowing/wayland/Wayland11EventQueueStrategy.h
+++ b/xbmc/windowing/wayland/Wayland11EventQueueStrategy.h
@@ -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/windowing/wayland/Wayland12EventQueueStrategy.cpp b/xbmc/windowing/wayland/Wayland12EventQueueStrategy.cpp
index adad62922b..93cf18cc07 100644
--- a/xbmc/windowing/wayland/Wayland12EventQueueStrategy.cpp
+++ b/xbmc/windowing/wayland/Wayland12EventQueueStrategy.cpp
@@ -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>
diff --git a/xbmc/windowing/wayland/Wayland12EventQueueStrategy.h b/xbmc/windowing/wayland/Wayland12EventQueueStrategy.h
index 0387d83658..584e0117f1 100644
--- a/xbmc/windowing/wayland/Wayland12EventQueueStrategy.h
+++ b/xbmc/windowing/wayland/Wayland12EventQueueStrategy.h
@@ -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