diff options
193 files changed, 3225 insertions, 1993 deletions
diff --git a/XBMC.xcodeproj/project.pbxproj b/XBMC.xcodeproj/project.pbxproj index 58581dad96..1c56587002 100644 --- a/XBMC.xcodeproj/project.pbxproj +++ b/XBMC.xcodeproj/project.pbxproj @@ -281,6 +281,9 @@ 7C1409A4183224B8009F9411 /* SettingUpdate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C140987183224B8009F9411 /* SettingUpdate.cpp */; }; 7C1409A5183224B8009F9411 /* SettingUpdate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C140987183224B8009F9411 /* SettingUpdate.cpp */; }; 7C1409A6183224B8009F9411 /* SettingUpdate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C140987183224B8009F9411 /* SettingUpdate.cpp */; }; + 7C1409A9184015C9009F9411 /* InfoExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1409A7184015C6009F9411 /* InfoExpression.cpp */; }; + 7C1409AA184015C9009F9411 /* InfoExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1409A7184015C6009F9411 /* InfoExpression.cpp */; }; + 7C1409AB184015C9009F9411 /* InfoExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1409A7184015C6009F9411 /* InfoExpression.cpp */; }; 7C1A492315A962EE004AF4A4 /* SeekHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1A492115A962EE004AF4A4 /* SeekHandler.cpp */; }; 7C1A85661520522500C63311 /* TextureCacheJob.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1A85631520522500C63311 /* TextureCacheJob.cpp */; }; 7C1D682915A7D2FD00658B65 /* DatabaseManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C1D682715A7D2FD00658B65 /* DatabaseManager.cpp */; }; @@ -321,7 +324,6 @@ 7C84A59E12FA3C1600CD1714 /* SourcesDirectory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C84A59C12FA3C1600CD1714 /* SourcesDirectory.cpp */; }; 7C87B2CE162CE39600EF897D /* PlayerController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C87B2CC162CE39600EF897D /* PlayerController.cpp */; }; 7C89619213B6A16F003631FE /* GUIWindowScreensaverDim.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C89619013B6A16F003631FE /* GUIWindowScreensaverDim.cpp */; }; - 7C89674613C03B22003631FE /* InfoBool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C89674313C03B22003631FE /* InfoBool.cpp */; }; 7C8A14571154CB2600E5FCFA /* TextureCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C8A14541154CB2600E5FCFA /* TextureCache.cpp */; }; 7C8A187D115B2A8200E5FCFA /* TextureDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C8A187A115B2A8200E5FCFA /* TextureDatabase.cpp */; }; 7C8FC6EE1829A4580045153D /* DirectoryProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C8FC6EC1829A4580045153D /* DirectoryProvider.cpp */; }; @@ -1190,7 +1192,6 @@ DFF0F2C817528350002DA3A4 /* XBTFReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18B7C7A81294222E009E7A26 /* XBTFReader.cpp */; }; DFF0F2C917528350002DA3A4 /* GenericTouchActionHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4991334174E5E5C00741B6D /* GenericTouchActionHandler.cpp */; }; DFF0F2CA17528350002DA3A4 /* ITouchInputHandling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4991342174E5E5C00741B6D /* ITouchInputHandling.cpp */; }; - DFF0F2CB17528350002DA3A4 /* InfoBool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C89674313C03B22003631FE /* InfoBool.cpp */; }; DFF0F2CC17528350002DA3A4 /* SkinVariable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF98D98A1434F47D00A6EBE1 /* SkinVariable.cpp */; }; DFF0F2CD17528350002DA3A4 /* AddonsOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DFB0F470161B747500D744F4 /* AddonsOperations.cpp */; }; DFF0F2CE17528350002DA3A4 /* ApplicationOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18968DC614155D7C005BA742 /* ApplicationOperations.cpp */; }; @@ -2606,7 +2607,6 @@ E4991331174E5DAD00741B6D /* XBTFReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18B7C7A81294222E009E7A26 /* XBTFReader.cpp */; }; E4991345174E5E5C00741B6D /* GenericTouchActionHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4991334174E5E5C00741B6D /* GenericTouchActionHandler.cpp */; }; E499134B174E5E5C00741B6D /* ITouchInputHandling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4991342174E5E5C00741B6D /* ITouchInputHandling.cpp */; }; - E499134C174E5EB700741B6D /* InfoBool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C89674313C03B22003631FE /* InfoBool.cpp */; }; E499134D174E5EB700741B6D /* SkinVariable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DF98D98A1434F47D00A6EBE1 /* SkinVariable.cpp */; }; E499134E174E5EBE00741B6D /* AddonsOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DFB0F470161B747500D744F4 /* AddonsOperations.cpp */; }; E499134F174E5EBE00741B6D /* ApplicationOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 18968DC614155D7C005BA742 /* ApplicationOperations.cpp */; }; @@ -3739,6 +3739,8 @@ 7C140986183224B8009F9411 /* SettingsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SettingsManager.h; path = lib/SettingsManager.h; sourceTree = "<group>"; }; 7C140987183224B8009F9411 /* SettingUpdate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SettingUpdate.cpp; path = lib/SettingUpdate.cpp; sourceTree = "<group>"; }; 7C140988183224B8009F9411 /* SettingUpdate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SettingUpdate.h; path = lib/SettingUpdate.h; sourceTree = "<group>"; }; + 7C1409A7184015C6009F9411 /* InfoExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InfoExpression.cpp; sourceTree = "<group>"; }; + 7C1409A8184015C8009F9411 /* InfoExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InfoExpression.h; sourceTree = "<group>"; }; 7C1A492115A962EE004AF4A4 /* SeekHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SeekHandler.cpp; sourceTree = "<group>"; }; 7C1A492215A962EE004AF4A4 /* SeekHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SeekHandler.h; sourceTree = "<group>"; }; 7C1A495B15A96918004AF4A4 /* SaveFileStateJob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaveFileStateJob.h; sourceTree = "<group>"; }; @@ -3805,7 +3807,6 @@ 7C87B2CD162CE39600EF897D /* PlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlayerController.h; sourceTree = "<group>"; }; 7C89619013B6A16F003631FE /* GUIWindowScreensaverDim.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GUIWindowScreensaverDim.cpp; sourceTree = "<group>"; }; 7C89619113B6A16F003631FE /* GUIWindowScreensaverDim.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GUIWindowScreensaverDim.h; sourceTree = "<group>"; }; - 7C89674313C03B22003631FE /* InfoBool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InfoBool.cpp; sourceTree = "<group>"; }; 7C89674413C03B22003631FE /* InfoBool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InfoBool.h; sourceTree = "<group>"; }; 7C8A14541154CB2600E5FCFA /* TextureCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextureCache.cpp; sourceTree = "<group>"; }; 7C8A14551154CB2600E5FCFA /* TextureCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextureCache.h; sourceTree = "<group>"; }; @@ -6745,8 +6746,9 @@ 7C89674213C03B21003631FE /* info */ = { isa = PBXGroup; children = ( - 7C89674313C03B22003631FE /* InfoBool.cpp */, 7C89674413C03B22003631FE /* InfoBool.h */, + 7C1409A7184015C6009F9411 /* InfoExpression.cpp */, + 7C1409A8184015C8009F9411 /* InfoExpression.h */, DF98D98A1434F47D00A6EBE1 /* SkinVariable.cpp */, DF98D98B1434F47D00A6EBE1 /* SkinVariable.h */, ); @@ -10426,7 +10428,6 @@ 38F4E57013CCCB3B00664821 /* Implementation.cpp in Sources */, 3802709A13D5A653009493DD /* SystemClock.cpp in Sources */, 7CEE2E5B13D6B71E000ABF2A /* TimeSmoother.cpp in Sources */, - 7C89674613C03B22003631FE /* InfoBool.cpp in Sources */, DFAB049813F8376700B70BFB /* InertialScrollingHandler.cpp in Sources */, DF3488E713FD958F0026A711 /* GUIAction.cpp in Sources */, DF34892A13FD9C780026A711 /* AirPlayServer.cpp in Sources */, @@ -10741,6 +10742,7 @@ 7C1409A1183224B8009F9411 /* SettingsManager.cpp in Sources */, 7C1409A4183224B8009F9411 /* SettingUpdate.cpp in Sources */, DF0ABB73183A94A30018445D /* Utf8Utils.cpp in Sources */, + 7C1409A9184015C9009F9411 /* InfoExpression.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -11308,7 +11310,6 @@ DFF0F2C817528350002DA3A4 /* XBTFReader.cpp in Sources */, DFF0F2C917528350002DA3A4 /* GenericTouchActionHandler.cpp in Sources */, DFF0F2CA17528350002DA3A4 /* ITouchInputHandling.cpp in Sources */, - DFF0F2CB17528350002DA3A4 /* InfoBool.cpp in Sources */, DFF0F2CC17528350002DA3A4 /* SkinVariable.cpp in Sources */, DFF0F2CD17528350002DA3A4 /* AddonsOperations.cpp in Sources */, DFF0F2CE17528350002DA3A4 /* ApplicationOperations.cpp in Sources */, @@ -11783,6 +11784,7 @@ 7C1409A3183224B8009F9411 /* SettingsManager.cpp in Sources */, 7C1409A6183224B8009F9411 /* SettingUpdate.cpp in Sources */, DF0ABB75183A94A30018445D /* Utf8Utils.cpp in Sources */, + 7C1409AB184015C9009F9411 /* InfoExpression.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -12357,7 +12359,6 @@ E4991331174E5DAD00741B6D /* XBTFReader.cpp in Sources */, E4991345174E5E5C00741B6D /* GenericTouchActionHandler.cpp in Sources */, E499134B174E5E5C00741B6D /* ITouchInputHandling.cpp in Sources */, - E499134C174E5EB700741B6D /* InfoBool.cpp in Sources */, E499134D174E5EB700741B6D /* SkinVariable.cpp in Sources */, E499134E174E5EBE00741B6D /* AddonsOperations.cpp in Sources */, E499134F174E5EBE00741B6D /* ApplicationOperations.cpp in Sources */, @@ -12827,6 +12828,7 @@ 7C1409A2183224B8009F9411 /* SettingsManager.cpp in Sources */, 7C1409A5183224B8009F9411 /* SettingUpdate.cpp in Sources */, DF0ABB74183A94A30018445D /* Utf8Utils.cpp in Sources */, + 7C1409AA184015C9009F9411 /* InfoExpression.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/addons/skin.confluence/720p/DialogAddonSettings.xml b/addons/skin.confluence/720p/DialogAddonSettings.xml index fb1c1c957f..276dcb3bd0 100644 --- a/addons/skin.confluence/720p/DialogAddonSettings.xml +++ b/addons/skin.confluence/720p/DialogAddonSettings.xml @@ -120,7 +120,7 @@ <textureslidernib>ScrollBarNib.png</textureslidernib> <textureslidernibfocus>ScrollBarNib.png</textureslidernibfocus> <onleft>2</onleft> - <onright>9</onright> + <onright>2</onright> <showonepage>false</showonepage> <orientation>vertical</orientation> </control> @@ -140,7 +140,7 @@ <onleft>12</onleft> <onright>11</onright> <onup>2</onup> - <ondown>9</ondown> + <ondown>2</ondown> </control> <control type="button" id="11"> <description>Cancel Button</description> @@ -155,7 +155,7 @@ <onleft>10</onleft> <onright>12</onright> <onup>2</onup> - <ondown>9</ondown> + <ondown>2</ondown> </control> <control type="button" id="12"> <description>Defaults Button</description> @@ -170,7 +170,7 @@ <onleft>11</onleft> <onright>10</onright> <onup>2</onup> - <ondown>9</ondown> + <ondown>2</ondown> </control> </control> diff --git a/addons/skin.confluence/720p/DialogPVRChannelManager.xml b/addons/skin.confluence/720p/DialogPVRChannelManager.xml index 446b5523a0..c9b27c7440 100644 --- a/addons/skin.confluence/720p/DialogPVRChannelManager.xml +++ b/addons/skin.confluence/720p/DialogPVRChannelManager.xml @@ -4,8 +4,8 @@ <allowoverlay>no</allowoverlay> <coordinates> <system>1</system> - <left>190</left> - <top>30</top> + <left>80</left> + <top>65</top> </coordinates> <include>dialogeffect</include> @@ -13,15 +13,15 @@ <control type="image"> <left>0</left> <top>0</top> - <width>900</width> - <height>660</height> + <width>1120</width> + <height>570</height> <texture border="40">DialogBack.png</texture> </control> <control type="image"> <description>Dialog Header image</description> <left>40</left> <top>16</top> - <width>820</width> + <width>1020</width> <height>40</height> <texture>dialogheader.png</texture> </control> @@ -29,7 +29,7 @@ <description>header label</description> <left>40</left> <top>20</top> - <width>820</width> + <width>1020</width> <height>30</height> <font>font13_title</font> <label>$LOCALIZE[19199] - $LOCALIZE[19023]</label> @@ -43,7 +43,7 @@ <description>header label</description> <left>40</left> <top>20</top> - <width>820</width> + <width>1020</width> <height>30</height> <font>font13_title</font> <label>$LOCALIZE[19199] - $LOCALIZE[19024]</label> @@ -55,7 +55,7 @@ </control> <control type="button"> <description>Close Window button</description> - <left>810</left> + <left>1030</left> <top>15</top> <width>64</width> <height>32</height> @@ -74,7 +74,7 @@ <left>20</left> <top>70</top> <control type="scrollbar" id="60"> - <left>0</left> + <left>440</left> <top>5</top> <width>25</width> <height>470</height> @@ -83,27 +83,27 @@ <texturesliderbarfocus border="0,14,0,14">ScrollBarV_bar_focus.png</texturesliderbarfocus> <textureslidernib>ScrollBarNib.png</textureslidernib> <textureslidernibfocus>ScrollBarNib.png</textureslidernibfocus> - <onleft>9002</onleft> - <onright>20</onright> + <onleft>20</onleft> + <onright>9002</onright> <showonepage>false</showonepage> <orientation>vertical</orientation> </control> <control type="image"> - <left>25</left> + <left>10</left> <top>0</top> <width>430</width> <height>475</height> <texture border="5">button-nofocus.png</texture> </control> <control type="list" id="20"> - <left>30</left> + <left>15</left> <top>5</top> <width>420</width> <height>470</height> <onup>20</onup> <ondown>20</ondown> - <onleft>60</onleft> - <onright>9002</onright> + <onleft>9002</onleft> + <onright>60</onright> <pagecontrol>60</pagecontrol> <scrolltime>200</scrolltime> <itemlayout height="45" width="420"> @@ -240,19 +240,6 @@ </control> </focusedlayout> </control> - <control type="label"> - <description>Page Count Label</description> - <left>30</left> - <top>485</top> - <width>420</width> - <height>20</height> - <font>font12</font> - <textcolor>grey</textcolor> - <scroll>false</scroll> - <align>center</align> - <aligny>center</aligny> - <label>([COLOR=blue]$INFO[Container(20).NumItems][/COLOR]) $LOCALIZE[19019] - $LOCALIZE[31024] ([COLOR=blue]$INFO[Container(20).CurrentPage]/$INFO[Container(20).NumPages][/COLOR])</label> - </control> </control> <control type="group" id="9002"> <control type="group"> @@ -288,8 +275,8 @@ <pulseonselect>no</pulseonselect> <label>19074</label> <onleft>20</onleft> - <onright>60</onright> - <onup>9000</onup> + <onright>9000</onright> + <onup>33</onup> <ondown>8</ondown> </control> <control type="edit" id="8"> @@ -321,7 +308,7 @@ <texturenofocus border="5">button-nofocus.png</texturenofocus> <label>19202</label> <onleft>20</onleft> - <onright>60</onright> + <onright>9000</onright> <onup>8</onup> <ondown>12</ondown> </control> @@ -351,7 +338,7 @@ <pulseonselect>no</pulseonselect> <label>19206</label> <onleft>20</onleft> - <onright>60</onright> + <onright>9000</onright> <onup>9</onup> <ondown>13</ondown> </control> @@ -365,7 +352,7 @@ <texturefocus border="5">button-focus2.png</texturefocus> <texturenofocus border="5">button-nofocus.png</texturenofocus> <label>19200</label> - <onright>60</onright> + <onright>9000</onright> <onleft>20</onleft> <onup>12</onup> <ondown>14</ondown> @@ -387,7 +374,7 @@ <pulseonselect>no</pulseonselect> <label>19267</label> <onleft>20</onleft> - <onright>60</onright> + <onright>9000</onright> <onup>13</onup> <ondown>30</ondown> </control> @@ -437,7 +424,7 @@ <align>center</align> <label>19024</label> <onleft>30</onleft> - <onright>60</onright> + <onright>9000</onright> <onup>14</onup> <ondown>31</ondown> </control> @@ -454,7 +441,7 @@ <align>center</align> <label>19023</label> <onleft>30</onleft> - <onright>60</onright> + <onright>9000</onright> <onup>14</onup> <ondown>31</ondown> </control> @@ -470,7 +457,7 @@ <align>center</align> <label>19203</label> <onleft>20</onleft> - <onright>60</onright> + <onright>9000</onright> <onup>30</onup> <ondown>32</ondown> </control> @@ -486,7 +473,7 @@ <align>center</align> <label>19211</label> <onleft>20</onleft> - <onright>60</onright> + <onright>9000</onright> <onup>31</onup> <ondown>33</ondown> </control> @@ -502,59 +489,92 @@ <align>center</align> <label>19204</label> <onleft>20</onleft> - <onright>60</onright> + <onright>9000</onright> <onup>32</onup> - <ondown>9000</ondown> + <ondown>7</ondown> </control> </control> </control> <control type="group" id="9000"> - <left>70</left> - <top>590</top> + <left>890</left> + <top>95</top> <control type="button" id="4"> <description>OK Button</description> <left>0</left> <top>0</top> - <width>250</width> + <width>200</width> <height>40</height> <label>186</label> <font>font12_title</font> <align>center</align> <aligny>center</aligny> - <onleft>6</onleft> - <onright>5</onright> - <onup>33</onup> - <ondown>7</ondown> + <onleft>9002</onleft> + <onright>20</onright> + <onup>6</onup> + <ondown>5</ondown> </control> <control type="button" id="5"> <description>Apply changes Button</description> - <left>260</left> - <top>0</top> - <width>250</width> + <left>0</left> + <top>45</top> + <width>200</width> <height>40</height> <label>14070</label> <font>font12_title</font> <align>center</align> <aligny>center</aligny> - <onleft>4</onleft> - <onright>6</onright> - <onup>33</onup> - <ondown>7</ondown> + <onleft>9002</onleft> + <onright>20</onright> + <onup>4</onup> + <ondown>6</ondown> </control> <control type="button" id="6"> <description>Cancel Button</description> - <left>520</left> - <top>0</top> - <width>250</width> + <left>0</left> + <top>90</top> + <width>200</width> <height>40</height> <label>222</label> <font>font12_title</font> <align>center</align> <aligny>center</aligny> - <onleft>5</onleft> - <onright>4</onright> - <onup>33</onup> - <ondown>7</ondown> + <onleft>9002</onleft> + <onright>20</onright> + <onup>5</onup> + <ondown>4</ondown> + </control> + <control type="group"> + <left>-5</left> + <top>200</top> + <control type="image"> + <left>0</left> + <top>0</top> + <width>210</width> + <height>210</height> + <texture border="5">button-nofocus.png</texture> + </control> + <control type="image"> + <left>5</left> + <top>5</top> + <width>200</width> + <height>200</height> + <aspectratio>keep</aspectratio> + <texture background="true">$INFO[Container(20).ListItem.Icon]</texture> + </control> + </control> + <control type="label"> + <description>Page Count Label</description> + <left>-15</left> + <top>418</top> + <width>230</width> + <height>35</height> + <font>font12</font> + <textcolor>grey</textcolor> + <scroll>false</scroll> + <align>center</align> + <aligny>center</aligny> + <label>([COLOR=blue]$INFO[Container(20).NumItems][/COLOR]) $LOCALIZE[19019] - $LOCALIZE[31024] ([COLOR=blue]$INFO[Container(20).CurrentPage]/$INFO[Container(20).NumPages][/COLOR])</label> + <wrapmultiline>true</wrapmultiline> </control> </control> </controls> diff --git a/addons/skin.confluence/720p/DialogPVRGroupManager.xml b/addons/skin.confluence/720p/DialogPVRGroupManager.xml index 519edb96e0..fa7749f93f 100644 --- a/addons/skin.confluence/720p/DialogPVRGroupManager.xml +++ b/addons/skin.confluence/720p/DialogPVRGroupManager.xml @@ -7,15 +7,32 @@ <animation effect="slide" start="1150,0" end="0,0" time="400" tween="quadratic" easing="out">WindowOpen</animation> <animation effect="slide" start="0,0" end="1150,0" time="400" tween="quadratic" easing="out">WindowClose</animation> <control type="image"> - <left>130</left> + <left>50</left> <top>0</top> - <width>1150</width> + <width>1230</width> <height>720</height> <texture border="15,0,0,0" flipx="true">MediaBladeSub.png</texture> </control> + <control type="image"> + <description>background image</description> + <left>1060</left> + <top>-10</top> + <width>675</width> + <height>740</height> + <texture border="10">KeyboardEditArea.png</texture> + <animation effect="fade" end="30" time="0" condition="true">conditional</animation> + </control> + <control type="image"> + <description>Dialog Header image</description> + <left>90</left> + <top>16</top> + <width>930</width> + <height>40</height> + <texture>dialogheader.png</texture> + </control> <control type="button"> <description>Close Window button</description> - <left>180</left> + <left>70</left> <top>0</top> <width>64</width> <height>32</height> @@ -35,10 +52,10 @@ <animation effect="fade" start="100" end="0" time="200">WindowClose</animation> <control type="label"> <description>header label</description> - <left>160</left> - <top>40</top> - <width>1080</width> - <height>30</height> + <left>90</left> + <top>16</top> + <width>930</width> + <height>40</height> <font>font24_title</font> <label>19143</label> <align>center</align> @@ -48,13 +65,13 @@ </control> <control type="group"> <description>Group list</description> - <left>160</left> + <left>70</left> <top>80</top> <control type="label"> <description>name label</description> <left>0</left> <top>0</top> - <width>340</width> + <width>310</width> <height>70</height> <font>font13</font> <label>31506</label> @@ -65,18 +82,18 @@ <control type="image"> <left>0</left> <top>75</top> - <width>340</width> + <width>310</width> <height>460</height> <texture border="5">button-nofocus.png</texture> </control> <control type="list" id="13"> <left>5</left> <top>80</top> - <width>330</width> + <width>300</width> <height>450</height> <onup>13</onup> <ondown>13</ondown> - <onleft>29</onleft> + <onleft>9000</onleft> <onright>73</onright> <pagecontrol>73</pagecontrol> <scrolltime>200</scrolltime> @@ -84,14 +101,14 @@ <control type="image"> <left>0</left> <top>0</top> - <width>330</width> + <width>300</width> <height>40</height> <texture border="5">button-nofocus.png</texture> </control> <control type="label"> <left>10</left> <top>0</top> - <width>310</width> + <width>280</width> <height>40</height> <font>font12</font> <align>left</align> @@ -105,7 +122,7 @@ <control type="image"> <left>0</left> <top>0</top> - <width>330</width> + <width>300</width> <height>40</height> <texture border="5">button-nofocus.png</texture> <visible>!Control.HasFocus(13)</visible> @@ -113,7 +130,7 @@ <control type="image"> <left>0</left> <top>0</top> - <width>330</width> + <width>300</width> <height>40</height> <texture border="5">button-focus2.png</texture> <visible>Control.HasFocus(13)</visible> @@ -121,7 +138,7 @@ <control type="label"> <left>10</left> <top>0</top> - <width>310</width> + <width>280</width> <height>40</height> <font>font12</font> <align>left</align> @@ -133,7 +150,7 @@ </focusedlayout> </control> <control type="scrollbar" id="73"> - <left>340</left> + <left>305</left> <top>75</top> <width>25</width> <height>460</height> @@ -152,13 +169,13 @@ </control> <control type="group"> <description>Channels list</description> - <left>525</left> + <left>400</left> <top>80</top> <control type="label" id="21"> <description>name label</description> <left>0</left> <top>0</top> - <width>340</width> + <width>310</width> <height>70</height> <font>font13</font> <align>center</align> @@ -168,14 +185,14 @@ <control type="image"> <left>0</left> <top>75</top> - <width>340</width> + <width>310</width> <height>460</height> <texture border="5">button-nofocus.png</texture> </control> <control type="list" id="11"> <left>5</left> <top>85</top> - <width>330</width> + <width>300</width> <height>450</height> <onup>11</onup> <ondown>11</ondown> @@ -187,7 +204,7 @@ <control type="image"> <left>0</left> <top>0</top> - <width>330</width> + <width>300</width> <height>40</height> <texture border="5">button-nofocus.png</texture> </control> @@ -201,7 +218,7 @@ <control type="label"> <left>40</left> <top>0</top> - <width>280</width> + <width>250</width> <height>40</height> <font>font12</font> <align>left</align> @@ -215,7 +232,7 @@ <control type="image"> <left>0</left> <top>0</top> - <width>330</width> + <width>300</width> <height>40</height> <texture border="5">button-nofocus.png</texture> <visible>!Control.HasFocus(11)</visible> @@ -223,7 +240,7 @@ <control type="image"> <left>0</left> <top>0</top> - <width>330</width> + <width>300</width> <height>40</height> <texture border="5">button-focus2.png</texture> <visible>Control.HasFocus(11)</visible> @@ -238,7 +255,7 @@ <control type="label"> <left>40</left> <top>0</top> - <width>280</width> + <width>250</width> <height>40</height> <font>font12</font> <align>left</align> @@ -250,7 +267,7 @@ </focusedlayout> </control> <control type="scrollbar" id="71"> - <left>340</left> + <left>305</left> <top>75</top> <width>25</width> <height>460</height> @@ -269,13 +286,13 @@ </control> <control type="group"> <description>Grouped Channels list</description> - <left>890</left> + <left>730</left> <top>80</top> <control type="label" id="22"> <description>name label</description> <left>0</left> <top>0</top> - <width>340</width> + <width>310</width> <height>70</height> <font>font13</font> <align>center</align> @@ -285,14 +302,14 @@ <control type="image"> <left>0</left> <top>75</top> - <width>340</width> + <width>310</width> <height>460</height> <texture border="5">button-nofocus.png</texture> </control> <control type="list" id="12"> <left>5</left> <top>85</top> - <width>330</width> + <width>300</width> <height>450</height> <onup>12</onup> <ondown>12</ondown> @@ -304,7 +321,7 @@ <control type="image"> <left>0</left> <top>0</top> - <width>330</width> + <width>300</width> <height>40</height> <texture border="5">button-nofocus.png</texture> </control> @@ -318,7 +335,7 @@ <control type="label"> <left>40</left> <top>0</top> - <width>280</width> + <width>250</width> <height>40</height> <font>font12</font> <align>left</align> @@ -332,7 +349,7 @@ <control type="image"> <left>0</left> <top>0</top> - <width>330</width> + <width>300</width> <height>40</height> <texture border="5">button-nofocus.png</texture> <visible>!Control.HasFocus(12)</visible> @@ -340,7 +357,7 @@ <control type="image"> <left>0</left> <top>0</top> - <width>330</width> + <width>300</width> <height>40</height> <texture border="5">button-focus2.png</texture> <visible>Control.HasFocus(12)</visible> @@ -355,7 +372,7 @@ <control type="label"> <left>40</left> <top>0</top> - <width>280</width> + <width>250</width> <height>40</height> <font>font12</font> <align>left</align> @@ -367,7 +384,7 @@ </focusedlayout> </control> <control type="scrollbar" id="72"> - <left>340</left> + <left>305</left> <top>75</top> <width>25</width> <height>460</height> @@ -377,7 +394,7 @@ <textureslidernib>ScrollBarNib.png</textureslidernib> <textureslidernibfocus>ScrollBarNib.png</textureslidernibfocus> <onleft>12</onleft> - <onright>26</onright> + <onright>9000</onright> <ondown>72</ondown> <onup>72</onup> <showonepage>false</showonepage> @@ -385,42 +402,71 @@ </control> </control> <control type="grouplist" id="9000"> - <left>160</left> - <top>660</top> - <width>1080</width> - <height>40</height> - <itemgap>2</itemgap> + <left>1070</left> + <top>165</top> + <width>200</width> + <height>175</height> + <itemgap>5</itemgap> <align>center</align> - <orientation>horizontal</orientation> - <onleft>72</onleft> + <orientation>vertical</orientation> + <onleft>12</onleft> <onright>13</onright> <onup>9000</onup> <ondown>9000</ondown> <control type="button" id="26"> <description>Add Group</description> - <width>230</width> + <width>200</width> <include>ButtonInfoDialogsCommonValues</include> <label>31503</label> </control> <control type="button" id="27"> <description>Rename Group</description> - <width>230</width> + <width>200</width> <include>ButtonInfoDialogsCommonValues</include> <label>31504</label> </control> <control type="button" id="28"> <description>Delete Group</description> - <width>230</width> + <width>200</width> <include>ButtonInfoDialogsCommonValues</include> <label>31505</label> </control> <control type="button" id="29"> <description>OK</description> - <width>230</width> + <width>200</width> <include>ButtonInfoDialogsCommonValues</include> <label>186</label> </control> </control> + <control type="group"> + <left>1065</left> + <top>405</top> + <control type="image"> + <left>0</left> + <top>0</top> + <width>210</width> + <height>210</height> + <texture border="5">button-nofocus.png</texture> + </control> + <control type="image"> + <left>5</left> + <top>5</top> + <width>200</width> + <height>200</height> + <aspectratio>keep</aspectratio> + <texture background="true">$INFO[Container(11).ListItem.Icon]</texture> + <visible>Control.HasFocus(11) | Control.HasFocus(71)</visible> + </control> + <control type="image"> + <left>5</left> + <top>5</top> + <width>200</width> + <height>200</height> + <aspectratio>keep</aspectratio> + <texture background="true">$INFO[Container(12).ListItem.Icon]</texture> + <visible>Control.HasFocus(12) | Control.HasFocus(72)</visible> + </control> + </control> </control> </control> <include>Clock</include> diff --git a/addons/skin.confluence/720p/DialogSelect.xml b/addons/skin.confluence/720p/DialogSelect.xml index 9d9247fdb3..2c9825bc3a 100644 --- a/addons/skin.confluence/720p/DialogSelect.xml +++ b/addons/skin.confluence/720p/DialogSelect.xml @@ -4,7 +4,7 @@ <defaultcontrol always="true">3</defaultcontrol> <coordinates> <system>1</system> - <left>335</left> + <left>215</left> <top>35</top> </coordinates> <include>dialogeffect</include> @@ -13,8 +13,8 @@ <description>background image</description> <left>0</left> <top>0</top> - <width>610</width> - <height>650</height> + <width>850</width> + <height>600</height> <texture border="40">DialogBack.png</texture> <visible>![Window.IsVisible(FullscreenVideo) | Window.IsVisible(Visualisation)]</visible> </control> @@ -22,8 +22,8 @@ <description>background image</description> <left>0</left> <top>0</top> - <width>610</width> - <height>650</height> + <width>850</width> + <height>600</height> <texture border="40">DialogBack2.png</texture> <visible>Window.IsVisible(FullscreenVideo) | Window.IsVisible(Visualisation)</visible> </control> @@ -31,7 +31,7 @@ <description>Dialog Header image</description> <left>40</left> <top>16</top> - <width>530</width> + <width>770</width> <height>40</height> <texture>dialogheader.png</texture> </control> @@ -39,7 +39,7 @@ <description>header label</description> <left>40</left> <top>20</top> - <width>530</width> + <width>770</width> <height>30</height> <font>font13_title</font> <label>$LOCALIZE[13406]</label> @@ -50,7 +50,7 @@ </control> <control type="button"> <description>Close Window button</description> - <left>520</left> + <left>760</left> <top>15</top> <width>64</width> <height>32</height> @@ -248,7 +248,7 @@ <textureslidernib>ScrollBarNib.png</textureslidernib> <textureslidernibfocus>ScrollBarNib.png</textureslidernibfocus> <onleft>3</onleft> - <onright>3</onright> + <onright>5</onright> <ondown>61</ondown> <onup>61</onup> <showonepage>false</showonepage> @@ -270,9 +270,9 @@ </control> <control type="label"> <description>number of files/pages in list text label</description> - <left>280</left> - <top>587</top> - <width>300</width> + <left>595</left> + <top>542</top> + <width>230</width> <height>35</height> <font>font12</font> <align>right</align> @@ -280,12 +280,13 @@ <scroll>true</scroll> <textcolor>grey</textcolor> <label>([COLOR=blue]$INFO[Container(6).NumItems][/COLOR]) $LOCALIZE[31025] - $LOCALIZE[31024] ([COLOR=blue]$INFO[Container(6).CurrentPage]/$INFO[Container(6).NumPages][/COLOR])</label> + <wrapmultiline>true</wrapmultiline> <visible>Control.IsVisible(6)</visible> </control> <control type="button" id="5"> <description>Manual button</description> - <left>20</left> - <top>585</top> + <left>615</left> + <top>107</top> <width>200</width> <height>40</height> <label>186</label> @@ -293,10 +294,28 @@ <textcolor>white</textcolor> <focusedcolor>white</focusedcolor> <align>center</align> - <onleft>61</onleft> + <onleft>3</onleft> <onright>3</onright> - <onup>3</onup> - <ondown>3</ondown> + </control> + <control type="group"> + <left>610</left> + <top>320</top> + <visible>Control.IsVisible(6)</visible> + <control type="image"> + <left>0</left> + <top>0</top> + <width>210</width> + <height>210</height> + <texture border="5">button-nofocus.png</texture> + </control> + <control type="image"> + <left>5</left> + <top>5</top> + <width>200</width> + <height>200</height> + <aspectratio>keep</aspectratio> + <texture background="true">$INFO[Container(6).ListItem.Icon]</texture> + </control> </control> </controls> </window> 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/FileBrowser.xml b/addons/skin.confluence/720p/FileBrowser.xml index 255c46118d..7d6445a55d 100644 --- a/addons/skin.confluence/720p/FileBrowser.xml +++ b/addons/skin.confluence/720p/FileBrowser.xml @@ -9,18 +9,35 @@ </coordinates> <controls> <control type="group"> - <left>580</left> + <left>360</left> <animation effect="slide" start="700,0" end="0,0" time="400" tween="quadratic" easing="out" condition="![Window.IsVisible(MovieInformation) | Window.IsVisible(MusicInformation)]">WindowOpen</animation> - <animation effect="slide" start="-400,0" end="0,0" time="400" tween="quadratic" easing="out" condition="[Window.IsVisible(MovieInformation) | Window.IsVisible(MusicInformation)]">WindowOpen</animation> + <animation effect="slide" start="-180,0" end="0,0" time="400" tween="quadratic" easing="out" condition="[Window.IsVisible(MovieInformation) | Window.IsVisible(MusicInformation)]">WindowOpen</animation> <animation effect="slide" start="0,0" end="700,0" time="400" tween="quadratic" easing="out" condition="![Window.IsVisible(MovieInformation) | Window.IsVisible(MusicInformation)]">WindowClose</animation> <animation effect="slide" start="0,0" end="-400,0" time="400" tween="quadratic" easing="out" condition="[Window.IsVisible(MovieInformation) | Window.IsVisible(MusicInformation)]">WindowClose</animation> <control type="image"> <left>0</left> <top>0</top> - <width>1100</width> + <width>1320</width> <height>720</height> <texture border="15,0,0,0" flipx="true">MediaBladeSub.png</texture> </control> + <control type="image"> + <description>background image</description> + <left>667</left> + <top>-10</top> + <width>675</width> + <height>740</height> + <texture border="10">KeyboardEditArea.png</texture> + <animation effect="fade" end="30" time="0" condition="true">conditional</animation> + </control> + <control type="image"> + <description>Dialog Header image</description> + <left>40</left> + <top>16</top> + <width>595</width> + <height>40</height> + <texture>dialogheader.png</texture> + </control> <control type="button"> <description>Close Window button</description> <left>20</left> @@ -43,22 +60,22 @@ <animation effect="fade" start="100" end="0" time="200">WindowClose</animation> <control type="label" id="411"> <description>header label</description> - <left>30</left> - <top>40</top> - <width>630</width> + <left>40</left> + <top>20</top> + <width>595</width> <height>30</height> <font>font13_title</font> <label>1023</label> - <align>right</align> + <align>center</align> <aligny>center</aligny> <textcolor>selected</textcolor> <shadowcolor>black</shadowcolor> </control> <control type="label" id="412"> <description>Path label</description> - <left>30</left> - <top>70</top> - <width>630</width> + <left>40</left> + <top>680</top> + <width>595</width> <height>30</height> <font>font13</font> <haspath>true</haspath> @@ -68,8 +85,8 @@ <shadowcolor>black</shadowcolor> </control> <control type="grouplist" id="9000"> - <left>20</left> - <top>460</top> + <left>685</left> + <top>130</top> <width>221</width> <height>225</height> <itemgap>5</itemgap> @@ -108,17 +125,17 @@ </control> </control> <control type="image"> - <left>245</left> - <top>460</top> - <width>420</width> - <height>210</height> + <left>685</left> + <top>400</top> + <width>221</width> + <height>221</height> <texture border="5">button-nofocus.png</texture> </control> <control type="image"> - <left>250</left> - <top>465</top> - <width>410</width> - <height>200</height> + <left>690</left> + <top>405</top> + <width>211</width> + <height>211</height> <aspectratio>keep</aspectratio> <texture background="true">$INFO[ListItem.Icon]</texture> <visible>!SubString(Control.GetLabel(416),*)</visible> @@ -134,20 +151,20 @@ </control> <control type="panel" id="450"> <left>20</left> - <top>120</top> - <width>640</width> - <height>321</height> + <top>90</top> + <width>620</width> + <height>562</height> <onleft>9000</onleft> <onright>60</onright> <onup>450</onup> <ondown>450</ondown> <pagecontrol>60</pagecontrol> <scrolltime>200</scrolltime> - <itemlayout height="40" width="640"> + <itemlayout height="40" width="620"> <control type="image"> <left>0</left> <top>0</top> - <width>640</width> + <width>620</width> <height>41</height> <texture border="5">MenuItemNF.png</texture> </control> @@ -161,7 +178,7 @@ <control type="label"> <left>55</left> <top>0</top> - <width>580</width> + <width>560</width> <height>40</height> <font>font13</font> <align>left</align> @@ -170,11 +187,11 @@ <info>ListItem.Label</info> </control> </itemlayout> - <focusedlayout height="40" width="640"> + <focusedlayout height="40" width="620"> <control type="image"> <left>0</left> <top>0</top> - <width>640</width> + <width>620</width> <height>41</height> <visible>!Control.HasFocus(450)</visible> <texture border="5">MenuItemNF.png</texture> @@ -182,7 +199,7 @@ <control type="image"> <left>0</left> <top>0</top> - <width>640</width> + <width>620</width> <height>41</height> <visible>Control.HasFocus(450)</visible> <texture border="5">MenuItemFO.png</texture> @@ -197,7 +214,7 @@ <control type="label"> <left>55</left> <top>0</top> - <width>580</width> + <width>560</width> <height>40</height> <font>font13</font> <align>left</align> @@ -209,20 +226,20 @@ </control> <control type="panel" id="451"> <left>20</left> - <top>120</top> - <width>640</width> - <height>321</height> + <top>90</top> + <width>620</width> + <height>562</height> <onleft>9000</onleft> <onright>60</onright> <onup>451</onup> <ondown>451</ondown> <pagecontrol>60</pagecontrol> <scrolltime>200</scrolltime> - <itemlayout height="40" width="640"> + <itemlayout height="40" width="620"> <control type="image"> <left>0</left> <top>0</top> - <width>640</width> + <width>620</width> <height>41</height> <texture border="5">MenuItemNF.png</texture> </control> @@ -236,7 +253,7 @@ <control type="label"> <left>55</left> <top>0</top> - <width>580</width> + <width>560</width> <height>40</height> <font>font13</font> <align>left</align> @@ -245,11 +262,11 @@ <info>ListItem.Label</info> </control> </itemlayout> - <focusedlayout height="40" width="640"> + <focusedlayout height="40" width="620"> <control type="image"> <left>0</left> <top>0</top> - <width>640</width> + <width>620</width> <height>41</height> <visible>!Control.HasFocus(451)</visible> <texture border="5">MenuItemNF.png</texture> @@ -257,7 +274,7 @@ <control type="image"> <left>0</left> <top>0</top> - <width>640</width> + <width>620</width> <height>41</height> <visible>Control.HasFocus(451)</visible> <texture border="5">MenuItemFO.png</texture> @@ -272,7 +289,7 @@ <control type="label"> <left>55</left> <top>0</top> - <width>580</width> + <width>560</width> <height>40</height> <font>font13</font> <align>left</align> @@ -284,44 +301,46 @@ </control> <control type="scrollbar" id="60"> - <left>650</left> - <top>120</top> + <left>640</left> + <top>90</top> <width>25</width> - <height>320</height> + <height>561</height> <texturesliderbackground border="0,14,0,14">ScrollBarV.png</texturesliderbackground> <texturesliderbar border="0,14,0,14">ScrollBarV_bar.png</texturesliderbar> <texturesliderbarfocus border="0,14,0,14">ScrollBarV_bar_focus.png</texturesliderbarfocus> <textureslidernib>ScrollBarNib.png</textureslidernib> <textureslidernibfocus>ScrollBarNib.png</textureslidernibfocus> <onleft>450</onleft> - <onright>450</onright> + <onright>9000</onright> <showonepage>false</showonepage> <orientation>vertical</orientation> </control> <control type="label"> <description>Page label</description> - <left>100</left> + <left>685</left> <top>680</top> - <width>560</width> + <width>221</width> <height>30</height> <align>right</align> <aligny>center</aligny> <textcolor>grey</textcolor> <font>font12</font> <label>([COLOR=blue]$INFO[Container(450).NumItems][/COLOR]) $LOCALIZE[31025] - $LOCALIZE[31024] ([COLOR=blue]$INFO[Container(450).CurrentPage]/$INFO[Container(450).NumPages][/COLOR])</label> + <wrapmultiline>true</wrapmultiline> <visible>!Control.IsVisible(451)</visible> </control> <control type="label"> <description>Page label</description> - <left>100</left> + <left>685</left> <top>680</top> - <width>560</width> + <width>221</width> <height>30</height> <align>right</align> <aligny>center</aligny> <textcolor>grey</textcolor> <font>font12</font> <label>([COLOR=blue]$INFO[Container(451).NumItems][/COLOR]) $LOCALIZE[31025] - $LOCALIZE[31024] ([COLOR=blue]$INFO[Container(451).CurrentPage]/$INFO[Container(451).NumPages][/COLOR])</label> + <wrapmultiline>true</wrapmultiline> <visible>Control.IsVisible(451)</visible> </control> </control> diff --git a/addons/skin.confluence/720p/ViewsPVR.xml b/addons/skin.confluence/720p/ViewsPVR.xml index 2cb0736780..94110a30ae 100644 --- a/addons/skin.confluence/720p/ViewsPVR.xml +++ b/addons/skin.confluence/720p/ViewsPVR.xml @@ -1067,53 +1067,49 @@ <top>60</top> <control type="label"> <description>Channel header label</description> - <left>0</left> + <left>20</left> <top>20</top> <width>220</width> <height>20</height> <font>font13_title</font> <textcolor>white</textcolor> <shadowcolor>black</shadowcolor> - <align>center</align> <aligny>center</aligny> <label>19029</label> </control> <control type="label"> <description>Title header label</description> - <left>220</left> + <left>240</left> <top>20</top> <width>300</width> <height>20</height> <font>font13_title</font> <textcolor>white</textcolor> <shadowcolor>black</shadowcolor> - <align>center</align> <aligny>center</aligny> <label>369</label> </control> <control type="label"> <description>Schedule Time header label</description> - <left>580</left> + <left>600</left> <top>20</top> <width>300</width> <height>20</height> <font>font13_title</font> <textcolor>white</textcolor> <shadowcolor>black</shadowcolor> - <align>center</align> <aligny>center</aligny> <label>31501</label> </control> <control type="label"> <description>Status header label</description> - <left>940</left> + <left>980</left> <top>20</top> <width>150</width> <height>20</height> <font>font13_title</font> <textcolor>white</textcolor> <shadowcolor>black</shadowcolor> - <align>center</align> <aligny>center</aligny> <label>126</label> </control> @@ -1145,73 +1141,68 @@ <height>41</height> <texture border="5">MenuItemNF.png</texture> </control> - <control type="image"> - <left>220</left> - <top>0</top> - <width>300</width> - <height>40</height> - <colordiffuse>33FFFFFF</colordiffuse> - <texture border="5">StackFO.png</texture> - </control> - <control type="image"> - <left>940</left> - <top>0</top> - <width>155</width> - <height>40</height> - <colordiffuse>33FFFFFF</colordiffuse> - <texture border="5">StackFO.png</texture> - </control> - <control type="image"> - <left>0</left> - <top>8</top> - <width>50</width> - <height>26</height> + <control type="group"> + <visible>IsEmpty(ListItem.Date)</visible> + <control type="label"> + <left>50</left> + <top>0</top> + <width>150</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <selectedcolor>selected</selectedcolor> + <info>ListItem.Label</info> + </control> + </control> + <control type="group"> <visible>!IsEmpty(ListItem.Date)</visible> - <texture border="1">$INFO[ListItem.Icon]</texture> - </control> - <control type="label"> - <left>50</left> - <top>0</top> - <width>150</width> - <height>40</height> - <font>font12</font> - <align>left</align> - <aligny>center</aligny> - <selectedcolor>selected</selectedcolor> - <info>ListItem.ChannelName</info> - </control> - <control type="label"> - <left>370</left> - <top>0</top> - <width>290</width> - <height>40</height> - <font>font12</font> - <align>center</align> - <aligny>center</aligny> - <selectedcolor>selected</selectedcolor> - <info>ListItem.Label</info> - </control> - <control type="label"> - <left>730</left> - <top>0</top> - <width>400</width> - <height>40</height> - <font>font12</font> - <align>center</align> - <aligny>center</aligny> - <selectedcolor>selected</selectedcolor> - <info>ListItem.Date</info> - </control> - <control type="label"> - <left>1018</left> - <top>0</top> - <width>170</width> - <height>40</height> - <font>font12</font> - <align>center</align> - <aligny>center</aligny> - <selectedcolor>selected</selectedcolor> - <info>ListItem.Comment</info> + <control type="image"> + <left>0</left> + <top>8</top> + <width>50</width> + <height>26</height> + <texture border="1">$INFO[ListItem.Icon]</texture> + </control> + <control type="label"> + <left>50</left> + <top>0</top> + <width>150</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <selectedcolor>selected</selectedcolor> + <info>ListItem.ChannelName</info> + </control> + <control type="label"> + <left>240</left> + <top>0</top> + <width>290</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <selectedcolor>selected</selectedcolor> + <info>ListItem.Label</info> + </control> + <control type="label"> + <left>600</left> + <top>0</top> + <width>400</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <selectedcolor>selected</selectedcolor> + <info>ListItem.Date</info> + </control> + <control type="label"> + <left>980</left> + <top>0</top> + <width>170</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <selectedcolor>selected</selectedcolor> + <info>ListItem.Comment</info> + </control> </control> </itemlayout> <focusedlayout height="40"> @@ -1220,95 +1211,79 @@ <top>0</top> <width>1100</width> <height>41</height> - <texture border="5">MenuItemNF.png</texture> - </control> - <control type="image"> - <left>220</left> - <top>0</top> - <width>300</width> - <height>40</height> - <colordiffuse>33FFFFFF</colordiffuse> - <texture border="5">StackFO.png</texture> - <visible>!Control.HasFocus(14)</visible> + <texture border="5">MenuItemFO.png</texture> </control> <control type="image"> - <left>940</left> + <left>0</left> <top>0</top> - <width>155</width> - <height>40</height> + <width>1100</width> + <height>41</height> <colordiffuse>33FFFFFF</colordiffuse> - <texture border="5">StackFO.png</texture> - <visible>!Control.HasFocus(14)</visible> - </control> - <control type="image"> - <left>220</left> - <top>0</top> - <width>300</width> - <height>40</height> - <colordiffuse>88FFFFFF</colordiffuse> - <texture border="5">StackFO.png</texture> - <visible>Control.HasFocus(14)</visible> - </control> - <control type="image"> - <left>940</left> - <top>0</top> - <width>155</width> - <height>40</height> - <colordiffuse>88FFFFFF</colordiffuse> - <texture border="5">StackFO.png</texture> + <texture border="5">MenuItemFO.png</texture> <visible>Control.HasFocus(14)</visible> </control> - <control type="image"> - <left>0</left> - <top>8</top> - <width>50</width> - <height>26</height> + <control type="group"> + <visible>IsEmpty(ListItem.Date)</visible> + <control type="label"> + <left>50</left> + <top>0</top> + <width>150</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <selectedcolor>selected</selectedcolor> + <info>ListItem.Label</info> + </control> + </control> + <control type="group"> <visible>!IsEmpty(ListItem.Date)</visible> - <texture border="1">$INFO[ListItem.Icon]</texture> - </control> - <control type="label"> - <left>50</left> - <top>0</top> - <width>150</width> - <height>40</height> - <font>font12</font> - <align>left</align> - <aligny>center</aligny> - <selectedcolor>selected</selectedcolor> - <info>ListItem.ChannelName</info> - </control> - <control type="label"> - <left>370</left> - <top>0</top> - <width>290</width> - <height>40</height> - <font>font12</font> - <align>center</align> - <aligny>center</aligny> - <selectedcolor>selected</selectedcolor> - <info>ListItem.Label</info> - </control> - <control type="label"> - <left>730</left> - <top>0</top> - <width>400</width> - <height>40</height> - <font>font12</font> - <align>center</align> - <aligny>center</aligny> - <selectedcolor>selected</selectedcolor> - <info>ListItem.Date</info> - </control> - <control type="label"> - <left>1018</left> - <top>0</top> - <width>150</width> - <height>40</height> - <font>font12</font> - <align>center</align> - <aligny>center</aligny> - <selectedcolor>selected</selectedcolor> - <info>ListItem.Comment</info> + <control type="image"> + <left>0</left> + <top>8</top> + <width>50</width> + <height>26</height> + <texture border="1">$INFO[ListItem.Icon]</texture> + </control> + <control type="label"> + <left>50</left> + <top>0</top> + <width>150</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <selectedcolor>selected</selectedcolor> + <info>ListItem.ChannelName</info> + </control> + <control type="label"> + <left>240</left> + <top>0</top> + <width>290</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <selectedcolor>selected</selectedcolor> + <info>ListItem.Label</info> + </control> + <control type="label"> + <left>600</left> + <top>0</top> + <width>400</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <selectedcolor>selected</selectedcolor> + <info>ListItem.Date</info> + </control> + <control type="label"> + <left>980</left> + <top>0</top> + <width>150</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <selectedcolor>selected</selectedcolor> + <info>ListItem.Comment</info> + </control> </control> </focusedlayout> </control> @@ -1381,51 +1356,47 @@ <description>Channel label</description> <left>0</left> <top>20</top> - <width>250</width> + <width>220</width> <height>20</height> <font>font13_title</font> <textcolor>white</textcolor> <shadowcolor>black</shadowcolor> - <align>center</align> <aligny>center</aligny> <label>19148</label> </control> <control type="label"> - <description>Title</description> - <left>290</left> + <description>Title header label</description> + <left>240</left> <top>20</top> - <width>350</width> + <width>300</width> <height>20</height> <font>font13_title</font> <textcolor>white</textcolor> <shadowcolor>black</shadowcolor> - <align>left</align> <aligny>center</aligny> <label>369</label> </control> <control type="label"> <description>Time label</description> - <left>620</left> + <left>700</left> <top>20</top> <width>300</width> <height>20</height> <font>font13_title</font> <textcolor>white</textcolor> <shadowcolor>black</shadowcolor> - <align>right</align> <aligny>center</aligny> <label>21820</label> </control> <control type="label"> <description>Status header label</description> - <left>960</left> + <left>980</left> <top>20</top> <width>140</width> <height>20</height> <font>font13_title</font> <textcolor>white</textcolor> <shadowcolor>black</shadowcolor> - <align>center</align> <aligny>center</aligny> <label>126</label> </control> @@ -1457,106 +1428,102 @@ <height>41</height> <texture border="5">MenuItemNF.png</texture> </control> - <control type="image"> - <left>0</left> - <top>0</top> - <width>250</width> - <height>40</height> - <colordiffuse>33FFFFFF</colordiffuse> - <texture border="5">StackFO.png</texture> - </control> - <control type="image"> - <left>960</left> - <top>0</top> - <width>140</width> - <height>40</height> - <colordiffuse>33FFFFFF</colordiffuse> - <texture border="5">StackFO.png</texture> - </control> - <control type="image"> - <left>10</left> - <top>5</top> - <width>30</width> - <height>30</height> - <info>ListItem.Icon</info> - </control> - <control type="label"> - <left>50</left> - <top>0</top> - <width>190</width> - <height>35</height> - <font>font12</font> - <align>left</align> - <aligny>center</aligny> - <textcolor>grey2</textcolor> - <selectedcolor>selected</selectedcolor> - <info>ListItem.ChannelName</info> - </control> - <control type="label"> - <left>260</left> - <top>0</top> - <width>650</width> - <height>35</height> - <font>font13</font> - <align>left</align> - <aligny>center</aligny> - <textcolor>grey2</textcolor> - <selectedcolor>selected</selectedcolor> - <info>ListItem.Label</info> - </control> - <control type="label"> - <left>950</left> - <top>0</top> - <width>500</width> - <height>40</height> - <font>font12</font> - <align>right</align> - <aligny>center</aligny> - <textcolor>grey2</textcolor> - <selectedcolor>selected</selectedcolor> - <info>ListItem.Date</info> - </control> - <control type="image"> - <left>970</left> - <top>10</top> - <width>30</width> - <height>20</height> - <texture>PVR-IsRecording.png</texture> - <visible>ListItem.IsRecording</visible> - </control> - <control type="label"> - <left>1005</left> - <top>0</top> - <width>80</width> - <height>40</height> - <font>font10</font> - <align>left</align> - <aligny>center</aligny> - <textcolor>grey2</textcolor> - <selectedcolor>selected</selectedcolor> - <label>19043</label> - <visible>ListItem.IsRecording</visible> - </control> - <control type="image"> - <left>970</left> - <top>10</top> - <width>20</width> - <height>20</height> - <texture>PVR-HasTimer.png</texture> - <visible>ListItem.HasTimer + !ListItem.IsRecording</visible> - </control> - <control type="label"> - <left>1000</left> - <top>0</top> - <width>80</width> - <height>40</height> - <font>font10</font> - <align>left</align> - <aligny>center</aligny> - <textcolor>grey2</textcolor> - <selectedcolor>selected</selectedcolor> - <label>31510</label> - <visible>ListItem.HasTimer</visible> + <control type="group"> + <visible>IsEmpty(ListItem.Date)</visible> + <control type="label"> + <left>50</left> + <top>0</top> + <width>650</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <textcolor>grey2</textcolor> + <selectedcolor>selected</selectedcolor> + <info>ListItem.Label</info> + </control> + </control> + <control type="group"> + <visible>!IsEmpty(ListItem.Date)</visible> + <control type="image"> + <left>0</left> + <top>5</top> + <width>30</width> + <height>30</height> + <texture border="1">$INFO[ListItem.Icon]</texture> + </control> + <control type="label"> + <left>50</left> + <top>0</top> + <width>190</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <textcolor>grey2</textcolor> + <selectedcolor>selected</selectedcolor> + <info>ListItem.ChannelName</info> + </control> + <control type="label"> + <left>240</left> + <top>0</top> + <width>450</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <textcolor>grey2</textcolor> + <selectedcolor>selected</selectedcolor> + <info>ListItem.Label</info> + </control> + <control type="label"> + <left>700</left> + <top>0</top> + <width>270</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <textcolor>grey2</textcolor> + <selectedcolor>selected</selectedcolor> + <info>ListItem.Date</info> + </control> + <control type="image"> + <left>980</left> + <top>10</top> + <width>30</width> + <height>20</height> + <texture>PVR-IsRecording.png</texture> + <visible>ListItem.IsRecording</visible> + </control> + <control type="label"> + <left>1015</left> + <top>0</top> + <width>80</width> + <height>40</height> + <font>font10</font> + <aligny>center</aligny> + <textcolor>grey2</textcolor> + <selectedcolor>selected</selectedcolor> + <label>19043</label> + <visible>ListItem.IsRecording</visible> + </control> + <control type="image"> + <left>980</left> + <top>10</top> + <width>20</width> + <height>20</height> + <texture>PVR-HasTimer.png</texture> + <visible>ListItem.HasTimer + !ListItem.IsRecording</visible> + </control> + <control type="label"> + <left>1010</left> + <top>0</top> + <width>80</width> + <height>40</height> + <font>font10</font> + <aligny>center</aligny> + <textcolor>grey2</textcolor> + <selectedcolor>selected</selectedcolor> + <label>31510</label> + <visible>ListItem.HasTimer</visible> + </control> </control> </itemlayout> <focusedlayout height="40"> @@ -1570,123 +1537,107 @@ <control type="image"> <left>0</left> <top>0</top> - <width>250</width> - <height>40</height> - <colordiffuse>33FFFFFF</colordiffuse> - <texture border="5">StackFO.png</texture> - <visible>!Control.HasFocus(17)</visible> - </control> - <control type="image"> - <left>960</left> - <top>0</top> - <width>140</width> - <height>40</height> - <colordiffuse>33FFFFFF</colordiffuse> - <texture border="5">StackFO.png</texture> - <visible>!Control.HasFocus(17)</visible> - </control> - <control type="image"> - <left>0</left> - <top>0</top> - <width>250</width> - <height>40</height> - <colordiffuse>88FFFFFF</colordiffuse> - <texture border="5">StackFO.png</texture> - <visible>Control.HasFocus(17)</visible> - </control> - <control type="image"> - <left>960</left> - <top>0</top> - <width>140</width> - <height>40</height> - <colordiffuse>88FFFFFF</colordiffuse> - <texture border="5">StackFO.png</texture> + <width>1100</width> + <height>41</height> + <texture border="5">MenuItemFO.png</texture> <visible>Control.HasFocus(17)</visible> </control> - <control type="image"> - <left>10</left> - <top>5</top> - <width>30</width> - <height>30</height> - <info>ListItem.Icon</info> - </control> - <control type="label"> - <left>50</left> - <top>0</top> - <width>190</width> - <height>35</height> - <font>font12</font> - <align>left</align> - <aligny>center</aligny> - <textcolor>grey2</textcolor> - <selectedcolor>selected</selectedcolor> - <info>ListItem.ChannelName</info> - </control> - <control type="label"> - <left>260</left> - <top>0</top> - <width>650</width> - <height>35</height> - <font>font13</font> - <align>left</align> - <aligny>center</aligny> - <textcolor>white</textcolor> - <selectedcolor>selected</selectedcolor> - <info>ListItem.Label</info> - </control> - <control type="label"> - <left>950</left> - <top>0</top> - <width>500</width> - <height>40</height> - <font>font12</font> - <align>right</align> - <aligny>center</aligny> - <textcolor>white</textcolor> - <selectedcolor>selected</selectedcolor> - <info>ListItem.Date</info> - </control> - <control type="image"> - <left>970</left> - <top>10</top> - <width>30</width> - <height>20</height> - <texture>PVR-IsRecording.png</texture> - <visible>ListItem.IsRecording</visible> - </control> - <control type="label"> - <left>1005</left> - <top>0</top> - <width>80</width> - <height>40</height> - <font>font10</font> - <align>left</align> - <aligny>center</aligny> - <textcolor>grey2</textcolor> - <selectedcolor>selected</selectedcolor> - <label>19043</label> - <visible>ListItem.IsRecording</visible> - </control> - <control type="image"> - <left>970</left> - <top>10</top> - <width>20</width> - <height>20</height> - <texture>PVR-HasTimer.png</texture> - <visible>ListItem.HasTimer + !ListItem.IsRecording</visible> - </control> - <control type="label"> - <left>1000</left> - <top>0</top> - <width>80</width> - <height>40</height> - <font>font10</font> - <align>left</align> - <aligny>center</aligny> - <textcolor>grey2</textcolor> - <selectedcolor>selected</selectedcolor> - <label>31510</label> - <visible>ListItem.HasTimer</visible> + <control type="group"> + <visible>IsEmpty(ListItem.Date)</visible> + <control type="label"> + <left>50</left> + <top>0</top> + <width>650</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <textcolor>grey2</textcolor> + <selectedcolor>selected</selectedcolor> + <info>ListItem.Label</info> + </control> + </control> + <control type="group"> + <visible>!IsEmpty(ListItem.Date)</visible> + <control type="image"> + <left>0</left> + <top>5</top> + <width>30</width> + <height>30</height> + <texture border="1">$INFO[ListItem.Icon]</texture> + </control> + <control type="label"> + <left>50</left> + <top>0</top> + <width>190</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <textcolor>grey2</textcolor> + <selectedcolor>selected</selectedcolor> + <info>ListItem.ChannelName</info> + </control> + <control type="label"> + <left>240</left> + <top>0</top> + <width>450</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <textcolor>white</textcolor> + <selectedcolor>selected</selectedcolor> + <info>ListItem.Label</info> + </control> + <control type="label"> + <left>700</left> + <top>0</top> + <width>270</width> + <height>40</height> + <font>font12</font> + <aligny>center</aligny> + <textcolor>white</textcolor> + <selectedcolor>selected</selectedcolor> + <info>ListItem.Date</info> + </control> + <control type="image"> + <left>980</left> + <top>10</top> + <width>30</width> + <height>20</height> + <texture>PVR-IsRecording.png</texture> + <visible>ListItem.IsRecording</visible> + </control> + <control type="label"> + <left>1015</left> + <top>0</top> + <width>80</width> + <height>40</height> + <font>font10</font> + <aligny>center</aligny> + <textcolor>grey2</textcolor> + <selectedcolor>selected</selectedcolor> + <label>19043</label> + <visible>ListItem.IsRecording</visible> + </control> + <control type="image"> + <left>980</left> + <top>10</top> + <width>20</width> + <height>20</height> + <texture>PVR-HasTimer.png</texture> + <visible>ListItem.HasTimer + !ListItem.IsRecording</visible> + </control> + <control type="label"> + <left>1010</left> + <top>0</top> + <width>80</width> + <height>40</height> + <font>font10</font> + <aligny>center</aligny> + <textcolor>grey2</textcolor> + <selectedcolor>selected</selectedcolor> + <label>31510</label> + <visible>ListItem.HasTimer</visible> + </control> </control> </focusedlayout> </control> 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..640a7b5370 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" @@ -14866,7 +14871,17 @@ msgctxt "#36544" msgid "Enable hardware decoding of video files." msgstr "" -#empty strings from id 36545 to 36999 +#: system/settings/settings.xml +msgctxt "#36545" +msgid "Subtitle stereoscopic depth" +msgstr "" + +#: system/settings/settings.xml +msgctxt "#36546" +msgid "Sets the visual depth of subtitles for stereoscopic videos. The higher the value, the closer the subtitles will appear to the viewer." +msgstr "" + +#empty strings from id 36547 to 36999 #reserved strings 365XX #: xbmc/cores/dvdplayer/DVDInputStreams/DVDInputStreamNavigator.cpp 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 96cf3ce51a..3d3b73fae5 100644 --- a/project/VS2010Express/XBMC.vcxproj +++ b/project/VS2010Express/XBMC.vcxproj @@ -639,7 +639,7 @@ <ClCompile Include="..\..\xbmc\interfaces\Builtins.cpp" /> <ClCompile Include="..\..\xbmc\interfaces\generic\LanguageInvokerThread.cpp" /> <ClCompile Include="..\..\xbmc\interfaces\generic\ScriptInvocationManager.cpp" /> - <ClCompile Include="..\..\xbmc\interfaces\info\InfoBool.cpp" /> + <ClCompile Include="..\..\xbmc\interfaces\info\InfoExpression.cpp" /> <ClCompile Include="..\..\xbmc\interfaces\info\SkinVariable.cpp" /> <ClCompile Include="..\..\xbmc\interfaces\json-rpc\AddonsOperations.cpp" /> <ClCompile Include="..\..\xbmc\interfaces\json-rpc\ApplicationOperations.cpp" /> @@ -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" /> @@ -2163,6 +2164,7 @@ <ClInclude Include="..\..\xbmc\interfaces\Builtins.h" /> <ClInclude Include="..\..\xbmc\interfaces\IAnnouncer.h" /> <ClInclude Include="..\..\xbmc\interfaces\info\InfoBool.h" /> + <ClInclude Include="..\..\xbmc\interfaces\info\InfoExpression.h" /> <ClInclude Include="..\..\xbmc\interfaces\info\SkinVariable.h" /> <ClInclude Include="..\..\xbmc\interfaces\json-rpc\ApplicationOperations.h" /> <ClInclude Include="..\..\xbmc\interfaces\json-rpc\AudioLibrary.h" /> @@ -2533,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" /> @@ -2913,4 +2916,4 @@ </VisualStudio> </ProjectExtensions> <Import Project="$(SolutionDir)\$(ProjectFileName).targets.user" Condition="Exists('$(SolutionDir)\$(ProjectFileName).targets.user')" /> -</Project>
\ No newline at end of file +</Project> diff --git a/project/VS2010Express/XBMC.vcxproj.filters b/project/VS2010Express/XBMC.vcxproj.filters index d35c0055ae..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> @@ -1903,7 +1906,7 @@ <ClCompile Include="..\..\xbmc\input\InertialScrollingHandler.cpp"> <Filter>input</Filter> </ClCompile> - <ClCompile Include="..\..\xbmc\interfaces\info\InfoBool.cpp"> + <ClCompile Include="..\..\xbmc\interfaces\info\InfoExpression.cpp"> <Filter>interfaces\info</Filter> </ClCompile> <ClCompile Include="..\..\xbmc\guilib\GUIAction.cpp"> @@ -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> @@ -4969,6 +4975,9 @@ <ClInclude Include="..\..\xbmc\interfaces\info\InfoBool.h"> <Filter>interfaces\info</Filter> </ClInclude> + <ClInclude Include="..\..\xbmc\interfaces\info\InfoExpression.h"> + <Filter>interfaces\info</Filter> + </ClInclude> <ClInclude Include="..\..\xbmc\guilib\GUIAction.h"> <Filter>guilib</Filter> </ClInclude> @@ -6132,4 +6141,4 @@ <Filter>interfaces\swig</Filter> </None> </ItemGroup> -</Project>
\ No newline at end of file +</Project> diff --git a/system/settings/settings.xml b/system/settings/settings.xml index 4b69b388a4..ab1d267438 100644 --- a/system/settings/settings.xml +++ b/system/settings/settings.xml @@ -809,6 +809,18 @@ <control type="toggle" /> </setting> </group> + <group id="3"> + <setting id="subtitles.stereoscopicdepth" type="integer" label="36545" help="36546"> + <level>0</level> + <default>0</default> + <constraints> + <minimum>0</minimum> + <step>1</step> + <maximum>10</maximum> + </constraints> + <control type="spinner" format="integer" delayed="true"/> + </setting> + </group> </category> <category id="dvds" label="14087" help="36193"> <group id="1"> @@ -2222,7 +2234,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/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index 2f3ad2f649..3d4cd86dad 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -59,6 +59,7 @@ #include "utils/SeekHandler.h" #include "URL.h" #include "addons/Skin.h" +#include "boost/make_shared.hpp" // stuff for current song #include "music/MusicInfoLoader.h" @@ -85,6 +86,7 @@ #include "cores/IPlayer.h" #include "cores/AudioEngine/Utils/AEUtil.h" #include "cores/VideoRenderers/BaseRenderer.h" +#include "interfaces/info/InfoExpression.h" #if defined(TARGET_DARWIN_OSX) #include "osx/smc.h" @@ -118,7 +120,6 @@ CGUIInfoManager::CGUIInfoManager(void) : m_currentSlide = new CFileItem; m_frameCounter = 0; m_lastFPSTime = 0; - m_updateTime = 1; m_playerShowTime = false; m_playerShowCodec = false; m_playerShowInfo = false; @@ -798,6 +799,18 @@ void CGUIInfoManager::SplitInfoString(const CStdString &infoString, vector<Prope /// efficient retrieval of data. int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition) { + bool listItemDependent; + return TranslateSingleString(strCondition, listItemDependent); +} + +int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition, bool &listItemDependent) +{ + /* We need to disable caching in INFO::InfoBool::Get if either of the following are true: + * 1. if condition is between LISTITEM_START and LISTITEM_END + * 2. if condition is STRING_IS_EMPTY, STRING_COMPARE, STRING_STR, INTEGER_GREATER_THAN and the + * corresponding label is between LISTITEM_START and LISTITEM_END + * This is achieved by setting the bool pointed at by listItemDependent, either here or in a recursive call + */ // trim whitespaces CStdString strTest = strCondition; StringUtils::Trim(strTest); @@ -816,11 +829,11 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition) else if (cat.name == "true" || cat.name == "yes" || cat.name == "on") return SYSTEM_ALWAYS_TRUE; if (cat.name == "isempty" && cat.num_params() == 1) - return AddMultiInfo(GUIInfo(STRING_IS_EMPTY, TranslateSingleString(cat.param()))); + return AddMultiInfo(GUIInfo(STRING_IS_EMPTY, TranslateSingleString(cat.param(), listItemDependent))); else if (cat.name == "stringcompare" && cat.num_params() == 2) { - int info = TranslateSingleString(cat.param(0)); - int info2 = TranslateSingleString(cat.param(1)); + int info = TranslateSingleString(cat.param(0), listItemDependent); + int info2 = TranslateSingleString(cat.param(1), listItemDependent); if (info2 > 0) return AddMultiInfo(GUIInfo(STRING_COMPARE, info, -info2)); // pipe our original string through the localize parsing then make it lowercase (picks up $LBRACKET etc.) @@ -831,13 +844,13 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition) } else if (cat.name == "integergreaterthan" && cat.num_params() == 2) { - int info = TranslateSingleString(cat.param(0)); + int info = TranslateSingleString(cat.param(0), listItemDependent); int compareInt = atoi(cat.param(1).c_str()); return AddMultiInfo(GUIInfo(INTEGER_GREATER_THAN, info, compareInt)); } else if (cat.name == "substring" && cat.num_params() >= 2) { - int info = TranslateSingleString(cat.param(0)); + int info = TranslateSingleString(cat.param(0), listItemDependent); CStdString label = CGUIInfoLabel::GetLabel(cat.param(1)); StringUtils::ToLower(label); int compareString = ConditionalStringParameter(label); @@ -930,7 +943,7 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition) } else if (prop.name == "addontitle") { - int infoLabel = TranslateSingleString(param); + int infoLabel = TranslateSingleString(param, listItemDependent); if (infoLabel > 0) return AddMultiInfo(GUIInfo(SYSTEM_ADDON_TITLE, infoLabel, 0)); CStdString label = CGUIInfoLabel::GetLabel(param); @@ -939,7 +952,7 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition) } else if (prop.name == "addonicon") { - int infoLabel = TranslateSingleString(param); + int infoLabel = TranslateSingleString(param, listItemDependent); if (infoLabel > 0) return AddMultiInfo(GUIInfo(SYSTEM_ADDON_ICON, infoLabel, 0)); CStdString label = CGUIInfoLabel::GetLabel(param); @@ -948,7 +961,7 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition) } else if (prop.name == "addonversion") { - int infoLabel = TranslateSingleString(param); + int infoLabel = TranslateSingleString(param, listItemDependent); if (infoLabel > 0) return AddMultiInfo(GUIInfo(SYSTEM_ADDON_VERSION, infoLabel, 0)); CStdString label = CGUIInfoLabel::GetLabel(param); @@ -1087,6 +1100,8 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition) { int offset = atoi(cat.param().c_str()); int ret = TranslateListItem(prop); + if (ret) + listItemDependent = true; if (offset) return AddMultiInfo(GUIInfo(ret, 0, offset, INFOFLAG_LISTITEM_WRAP)); return ret; @@ -1095,6 +1110,8 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition) { int offset = atoi(cat.param().c_str()); int ret = TranslateListItem(prop); + if (ret) + listItemDependent = true; if (offset) return AddMultiInfo(GUIInfo(ret, 0, offset, INFOFLAG_LISTITEM_POSITION)); return ret; @@ -1103,6 +1120,8 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition) { int offset = atoi(cat.param().c_str()); int ret = TranslateListItem(prop); + if (ret) + listItemDependent = true; if (offset) return AddMultiInfo(GUIInfo(ret, 0, offset)); return ret; @@ -1263,11 +1282,20 @@ int CGUIInfoManager::TranslateSingleString(const CStdString &strCondition) int id = atoi(info[0].param().c_str()); int offset = atoi(info[1].param().c_str()); if (info[1].name == "listitemnowrap") + { + listItemDependent = true; return AddMultiInfo(GUIInfo(TranslateListItem(info[2]), id, offset)); + } else if (info[1].name == "listitemposition") + { + listItemDependent = true; return AddMultiInfo(GUIInfo(TranslateListItem(info[2]), id, offset, INFOFLAG_LISTITEM_POSITION)); + } else if (info[1].name == "listitem") + { + listItemDependent = true; return AddMultiInfo(GUIInfo(TranslateListItem(info[2]), id, offset, INFOFLAG_LISTITEM_WRAP)); + } } } @@ -2122,65 +2150,46 @@ bool CGUIInfoManager::GetInt(int &value, int info, int contextWindow, const CGUI return false; } -unsigned int CGUIInfoManager::Register(const CStdString &expression, int context) +// functor for comparison InfoPtr's +struct InfoBoolFinder +{ + InfoBoolFinder(const std::string &expression, int context) : m_bool(expression, context) {}; + bool operator() (const InfoPtr &right) const { return m_bool == *right; }; + InfoBool m_bool; +}; + +INFO::InfoPtr CGUIInfoManager::Register(const CStdString &expression, int context) { CStdString condition(CGUIInfoLabel::ReplaceLocalize(expression)); StringUtils::Trim(condition); + StringUtils::ToLower(condition); if (condition.empty()) - return 0; + return INFO::InfoPtr(); CSingleLock lock(m_critInfo); // do we have the boolean expression already registered? - InfoBool test(condition, context); - for (unsigned int i = 0; i < m_bools.size(); ++i) - { - if (*m_bools[i] == test) - return i+1; - } + vector<InfoPtr>::const_iterator i = find_if(m_bools.begin(), m_bools.end(), InfoBoolFinder(condition, context)); + if (i != m_bools.end()) + return *i; if (condition.find_first_of("|+[]!") != condition.npos) - m_bools.push_back(new InfoExpression(condition, context)); + m_bools.push_back(boost::make_shared<InfoExpression>(condition, context)); else - m_bools.push_back(new InfoSingle(condition, context)); + m_bools.push_back(boost::make_shared<InfoSingle>(condition, context)); - return m_bools.size(); + return m_bools.back(); } bool CGUIInfoManager::EvaluateBool(const CStdString &expression, int contextWindow) { bool result = false; - unsigned int info = Register(expression, contextWindow); + INFO::InfoPtr info = Register(expression, contextWindow); if (info) - result = GetBoolValue(info); + result = info->Get(); return result; } -/* - TODO: what to do with item-based infobools... - these crop up: - 1. if condition is between LISTITEM_START and LISTITEM_END - 2. if condition is STRING_IS_EMPTY, STRING_COMPARE, STRING_STR, INTEGER_GREATER_THAN and the - corresponding label is between LISTITEM_START and LISTITEM_END - - In both cases they shouldn't be in our cache as they depend on items outside of our control atm. - - We only pass a listitem object in for controls inside a listitemlayout, so I think it's probably OK - to not cache these, as they're "pushed" out anyway. - - The problem is how do we avoid these? The only thing we have to go on is the expression here, so I - guess what we have to do is call through via Update. One thing we don't handle, however, is that the - majority of conditions (even inside lists) don't depend on the listitem at all. - - Advantage is that we know this at creation time I think, so could perhaps signal it in IsDirty()? - */ -bool CGUIInfoManager::GetBoolValue(unsigned int expression, const CGUIListItem *item) -{ - if (expression && --expression < m_bools.size()) - return m_bools[expression]->Get(m_updateTime, item); - return false; -} - // checks the condition and returns it as necessary. Currently used // for toggle button controls and visibility of images. bool CGUIInfoManager::GetBool(int condition1, int contextWindow, const CGUIListItem *item) @@ -4233,11 +4242,22 @@ bool CGUIInfoManager::GetDisplayAfterSeek() void CGUIInfoManager::Clear() { CSingleLock lock(m_critInfo); - for (unsigned int i = 0; i < m_bools.size(); ++i) - delete m_bools[i]; - m_bools.clear(); - m_skinVariableStrings.clear(); + + /* + Erase any info bools that are unused. We do this repeatedly as each run + will remove those bools that are no longer dependencies of other bools + in the vector. + */ + vector<InfoPtr>::iterator i = remove_if(m_bools.begin(), m_bools.end(), std::mem_fun_ref(&InfoPtr::unique)); + while (i != m_bools.end()) + { + m_bools.erase(i, m_bools.end()); + i = remove_if(m_bools.begin(), m_bools.end(), std::mem_fun_ref(&InfoPtr::unique)); + } + // log which ones are used - they should all be gone by now + for (vector<InfoPtr>::const_iterator i = m_bools.begin(); i != m_bools.end(); ++i) + CLog::Log(LOGDEBUG, "Infobool '%s' still used by %u instances", (*i)->GetExpression().c_str(), (unsigned int) i->use_count()); } void CGUIInfoManager::UpdateFPS() @@ -5182,7 +5202,10 @@ void CGUIInfoManager::ResetCache() { // reset any animation triggers as well m_containerMoves.clear(); - m_updateTime++; + // mark our infobools as dirty + CSingleLock lock(m_critInfo); + for (vector<InfoPtr>::iterator i = m_bools.begin(); i != m_bools.end(); ++i) + (*i)->SetDirty(); } // Called from tuxbox service thread to update current status @@ -5502,11 +5525,11 @@ CStdString CGUIInfoManager::GetSkinVariableString(int info, return ""; } -bool CGUIInfoManager::ConditionsChangedValues(const std::map<int, bool>& map) +bool CGUIInfoManager::ConditionsChangedValues(const std::map<INFO::InfoPtr, bool>& map) { - for (std::map<int, bool>::const_iterator it = map.begin() ; it != map.end() ; it++) + for (std::map<INFO::InfoPtr, bool>::const_iterator it = map.begin() ; it != map.end() ; it++) { - if (GetBoolValue(it->first) != it->second) + if (it->first->Get() != it->second) return true; } return false; diff --git a/xbmc/GUIInfoManager.h b/xbmc/GUIInfoManager.h index ab9a4615b1..1c1e34c24b 100644 --- a/xbmc/GUIInfoManager.h +++ b/xbmc/GUIInfoManager.h @@ -32,6 +32,7 @@ #include "inttypes.h" #include "XBDateTime.h" #include "utils/Observer.h" +#include "interfaces/info/InfoBool.h" #include "interfaces/info/SkinVariable.h" #include "cores/IPlayer.h" @@ -48,7 +49,6 @@ class CGUIListItem; class CDateTime; namespace INFO { - class InfoBool; class InfoSingle; } @@ -723,22 +723,14 @@ public: \param expression the boolean condition or expression \param context the context window \return an identifier used to reference this expression - - \sa GetBoolValue */ - unsigned int Register(const CStdString &expression, int context = 0); - - /*! \brief Get a previously registered boolean expression's value - Checks the cache and evaluates the boolean expression if required. - \sa Register - */ - bool GetBoolValue(unsigned int expression, const CGUIListItem *item = NULL); + INFO::InfoPtr Register(const CStdString &expression, int context = 0); /*! \brief Evaluate a boolean expression \param expression the expression to evaluate \param context the context in which to evaluate the expression (currently windows) \return the value of the evaluated expression. - \sa Register, GetBoolValue + \sa Register */ bool EvaluateBool(const CStdString &expression, int context = 0); @@ -845,13 +837,14 @@ public: CStdString GetSkinVariableString(int info, bool preferImage = false, const CGUIListItem *item=NULL); /// \brief iterates through boolean conditions and compares their stored values to current values. Returns true if any condition changed value. - bool ConditionsChangedValues(const std::map<int, bool>& map); + bool ConditionsChangedValues(const std::map<INFO::InfoPtr, bool>& map); bool m_AVInfoValid; protected: friend class INFO::InfoSingle; bool GetBool(int condition, int contextWindow = 0, const CGUIListItem *item=NULL); + int TranslateSingleString(const CStdString &strCondition, bool &listItemDependent); // routines for window retrieval bool CheckWindowCondition(CGUIWindow *window, int condition) const; @@ -942,9 +935,8 @@ protected: int m_nextWindowID; int m_prevWindowID; - std::vector<INFO::InfoBool*> m_bools; + std::vector<INFO::InfoPtr> m_bools; std::vector<INFO::CSkinVariableString> m_skinVariableStrings; - unsigned int m_updateTime; int m_libraryHasMusic; int m_libraryHasMovies; diff --git a/xbmc/addons/Skin.cpp b/xbmc/addons/Skin.cpp index 770fc21dbc..690c565604 100644 --- a/xbmc/addons/Skin.cpp +++ b/xbmc/addons/Skin.cpp @@ -195,7 +195,7 @@ void CSkinInfo::LoadIncludes() m_includes.LoadIncludes(includesPath); } -void CSkinInfo::ResolveIncludes(TiXmlElement *node, std::map<int, bool>* xmlIncludeConditions /* = NULL */) +void CSkinInfo::ResolveIncludes(TiXmlElement *node, std::map<INFO::InfoPtr, bool>* xmlIncludeConditions /* = NULL */) { if(xmlIncludeConditions) xmlIncludeConditions->clear(); diff --git a/xbmc/addons/Skin.h b/xbmc/addons/Skin.h index 218a0b7eaf..aa1635f84e 100644 --- a/xbmc/addons/Skin.h +++ b/xbmc/addons/Skin.h @@ -95,7 +95,7 @@ public: */ static bool TranslateResolution(const CStdString &name, RESOLUTION_INFO &res); - void ResolveIncludes(TiXmlElement *node, std::map<int, bool>* xmlIncludeConditions = NULL); + void ResolveIncludes(TiXmlElement *node, std::map<INFO::InfoPtr, bool>* xmlIncludeConditions = NULL); float GetEffectsSlowdown() const { return m_effectsSlowDown; }; 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 ¶ms); 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..801ecb2919 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++) @@ -1611,7 +1536,6 @@ void CLinuxRendererGL::RenderVDPAU(int index, int field) // make sure we know the correct texture size GetPlaneTextureSize(plane); - CalculateTextureSourceRects(index, 1); // Try some clamping or wrapping glTexParameteri(m_textureTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); @@ -1658,10 +1582,10 @@ void CLinuxRendererGL::RenderVDPAU(int index, int field) } else { - glTexCoord2f(m_rotatedDestCoords[0].x, m_rotatedDestCoords[0].y); glVertex4f(m_rotatedDestCoords[0].x, m_rotatedDestCoords[0].y, 0.0f, 0.0f); - glTexCoord2f(m_rotatedDestCoords[1].x, m_rotatedDestCoords[1].y); glVertex4f(m_rotatedDestCoords[1].x, m_rotatedDestCoords[1].y, 1.0f, 0.0f); - glTexCoord2f(m_rotatedDestCoords[2].x, m_rotatedDestCoords[2].y); glVertex4f(m_rotatedDestCoords[2].x, m_rotatedDestCoords[2].y, 1.0f, 1.0f); - glTexCoord2f(m_rotatedDestCoords[3].x, m_rotatedDestCoords[3].y); glVertex4f(m_rotatedDestCoords[3].x, m_rotatedDestCoords[3].y, 0.0f, 1.0f); + glTexCoord2f(plane.rect.x1, plane.rect.y1); glVertex4f(m_rotatedDestCoords[0].x, m_rotatedDestCoords[0].y, 0.0f, 0.0f); + glTexCoord2f(plane.rect.x2, plane.rect.y1); glVertex4f(m_rotatedDestCoords[1].x, m_rotatedDestCoords[1].y, 1.0f, 0.0f); + glTexCoord2f(plane.rect.x2, plane.rect.y2); glVertex4f(m_rotatedDestCoords[2].x, m_rotatedDestCoords[2].y, 1.0f, 1.0f); + glTexCoord2f(plane.rect.x1, plane.rect.y2); glVertex4f(m_rotatedDestCoords[3].x, m_rotatedDestCoords[3].y, 0.0f, 1.0f); } glEnd(); VerifyGLState(); @@ -1846,6 +1770,81 @@ bool CLinuxRendererGL::RenderCapture(CRenderCapture* capture) //******************************************************************************************************** // YV12 Texture creation, deletion, copying + clearing //******************************************************************************************************** +bool CLinuxRendererGL::UploadYV12Texture(int source) +{ + YUVBUFFER& buf = m_buffers[source]; + YV12Image* im = &buf.image; + YUVFIELDS& fields = buf.fields; + + if (!(im->flags&IMAGE_FLAG_READY)) + return false; + bool deinterlacing; + if (m_currentField == FIELD_FULL) + deinterlacing = false; + else + deinterlacing = true; + + glEnable(m_textureTarget); + VerifyGLState(); + + glPixelStorei(GL_UNPACK_ALIGNMENT,1); + + if (deinterlacing) + { + // Load Even Y Field + LoadPlane( fields[FIELD_TOP][0] , GL_LUMINANCE, buf.flipindex + , im->width, im->height >> 1 + , im->stride[0]*2, im->bpp, im->plane[0] ); + + //load Odd Y Field + LoadPlane( fields[FIELD_BOT][0], GL_LUMINANCE, buf.flipindex + , im->width, im->height >> 1 + , im->stride[0]*2, im->bpp, im->plane[0] + im->stride[0]) ; + + // Load Even U & V Fields + LoadPlane( fields[FIELD_TOP][1], GL_LUMINANCE, buf.flipindex + , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1) + , im->stride[1]*2, im->bpp, im->plane[1] ); + + LoadPlane( fields[FIELD_TOP][2], GL_ALPHA, buf.flipindex + , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1) + , im->stride[2]*2, im->bpp, im->plane[2] ); + + // Load Odd U & V Fields + LoadPlane( fields[FIELD_BOT][1], GL_LUMINANCE, buf.flipindex + , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1) + , im->stride[1]*2, im->bpp, im->plane[1] + im->stride[1] ); + + LoadPlane( fields[FIELD_BOT][2], GL_ALPHA, buf.flipindex + , im->width >> im->cshift_x, im->height >> (im->cshift_y + 1) + , im->stride[2]*2, im->bpp, im->plane[2] + im->stride[2] ); + } + else + { + //Load Y plane + LoadPlane( fields[FIELD_FULL][0], GL_LUMINANCE, buf.flipindex + , im->width, im->height + , im->stride[0], im->bpp, im->plane[0] ); + + //load U plane + LoadPlane( fields[FIELD_FULL][1], GL_LUMINANCE, buf.flipindex + , im->width >> im->cshift_x, im->height >> im->cshift_y + , im->stride[1], im->bpp, im->plane[1] ); + + //load V plane + LoadPlane( fields[FIELD_FULL][2], GL_ALPHA, buf.flipindex + , im->width >> im->cshift_x, im->height >> im->cshift_y + , im->stride[2], im->bpp, im->plane[2] ); + } + + VerifyGLState(); + + CalculateTextureSourceRects(source, 3); + + glDisable(m_textureTarget); + return true; +} + void CLinuxRendererGL::DeleteYV12Texture(int index) { YV12Image &im = m_buffers[index].image; @@ -1895,6 +1894,25 @@ void CLinuxRendererGL::DeleteYV12Texture(int index) } } +static GLint GetInternalFormat(GLint format, int bpp) +{ + if(bpp == 2) + { + switch (format) + { +#ifdef GL_ALPHA16 + case GL_ALPHA: return GL_ALPHA16; +#endif +#ifdef GL_LUMINANCE16 + case GL_LUMINANCE: return GL_LUMINANCE16; +#endif + default: return format; + } + } + else + return format; +} + bool CLinuxRendererGL::CreateYV12Texture(int index) { /* since we also want the field textures, pitch must be texture aligned */ @@ -2039,21 +2057,10 @@ bool CLinuxRendererGL::CreateYV12Texture(int index) GLenum format; GLint internalformat; if (p == 2) //V plane needs an alpha texture - { format = GL_ALPHA; - if(im.bpp == 2) - internalformat = GL_ALPHA16; - else - internalformat = GL_ALPHA; - } else - { format = GL_LUMINANCE; - if(im.bpp == 2) - internalformat = GL_LUMINANCE16; - else - internalformat = GL_LUMINANCE; - } + internalformat = GetInternalFormat(format, im.bpp); glTexImage2D(m_textureTarget, 0, internalformat, plane.texwidth, plane.texheight, 0, format, GL_UNSIGNED_BYTE, NULL); } @@ -2399,23 +2406,27 @@ bool CLinuxRendererGL::UploadVDPAUTexture(int index) plane.id = vdpau->texture[0]; + // in stereoscopic mode sourceRect may only + // be a part of the source video surface plane.rect = m_sourceRect; - plane.width = im.width; - plane.height = im.height; - plane.height /= plane.pixpertex_y; - plane.rect.y1 /= plane.pixpertex_y; - plane.rect.y2 /= plane.pixpertex_y; - plane.width /= plane.pixpertex_x; - plane.rect.x1 /= plane.pixpertex_x; - plane.rect.x2 /= plane.pixpertex_x; + // clip rect + if (vdpau->crop.x1 > plane.rect.x1) + plane.rect.x1 = vdpau->crop.x1; + if (vdpau->crop.x2 < plane.rect.x2) + plane.rect.x2 = vdpau->crop.x2; + if (vdpau->crop.y1 > plane.rect.y1) + plane.rect.y1 = vdpau->crop.y1; + if (vdpau->crop.y2 < plane.rect.y2) + plane.rect.y2 = vdpau->crop.y2; + + plane.texheight = vdpau->texHeight; + plane.texwidth = vdpau->texWidth; if (m_textureTarget == GL_TEXTURE_2D) { - plane.height /= plane.texheight; plane.rect.y1 /= plane.texheight; plane.rect.y2 /= plane.texheight; - plane.width /= plane.texwidth; plane.rect.x1 /= plane.texwidth; plane.rect.x2 /= plane.texwidth; } 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/OverlayRendererGUI.cpp b/xbmc/cores/VideoRenderers/OverlayRendererGUI.cpp index 0a294822c1..bd56d8b433 100644 --- a/xbmc/cores/VideoRenderers/OverlayRendererGUI.cpp +++ b/xbmc/cores/VideoRenderers/OverlayRendererGUI.cpp @@ -33,6 +33,7 @@ #include "guilib/GUIFont.h" #include "cores/dvdplayer/DVDCodecs/Overlay/DVDOverlayText.h" #include "cores/VideoRenderers/RenderManager.h" +#include "cores/VideoRenderers/OverlayRendererUtil.h" using namespace OVERLAY; @@ -165,7 +166,7 @@ void COverlayText::Render(OVERLAY::SRenderState &state) mat.m[0][3] = rd.x1; mat.m[1][3] = rd.y1; - float x = state.x, y = state.y; + float x = state.x + GetStereoscopicDepth(), y = state.y; mat.InverseTransformPosition(x, y); g_graphicsContext.SetTransform(mat, 1.0f, 1.0f); diff --git a/xbmc/cores/VideoRenderers/OverlayRendererUtil.cpp b/xbmc/cores/VideoRenderers/OverlayRendererUtil.cpp index 14203d91c4..07e1ca1809 100644 --- a/xbmc/cores/VideoRenderers/OverlayRendererUtil.cpp +++ b/xbmc/cores/VideoRenderers/OverlayRendererUtil.cpp @@ -25,6 +25,8 @@ #include "cores/dvdplayer/DVDCodecs/Overlay/DVDOverlaySpu.h" #include "cores/dvdplayer/DVDCodecs/Overlay/DVDOverlaySSA.h" #include "windowing/WindowingFactory.h" +#include "guilib/GraphicContext.h" +#include "settings/Settings.h" namespace OVERLAY { @@ -295,4 +297,13 @@ bool convert_quad(ASS_Image* images, SQuads& quads) return true; } +int GetStereoscopicDepth() +{ + int depth = CSettings::Get().GetInt("subtitles.stereoscopicdepth"); + if (depth && g_graphicsContext.GetStereoMode() && g_graphicsContext.GetStereoMode() != RENDER_STEREO_MODE_MONO) + depth *= (g_graphicsContext.GetStereoView() == RENDER_STEREO_VIEW_LEFT ? 1 : -1); + + return depth; +} + } diff --git a/xbmc/cores/VideoRenderers/OverlayRendererUtil.h b/xbmc/cores/VideoRenderers/OverlayRendererUtil.h index 394994feb7..a132149bee 100644 --- a/xbmc/cores/VideoRenderers/OverlayRendererUtil.h +++ b/xbmc/cores/VideoRenderers/OverlayRendererUtil.h @@ -64,5 +64,6 @@ namespace OVERLAY { , int& min_x, int& max_x , int& min_y, int& max_y); bool convert_quad(ASS_Image* images, SQuads& quads); + int GetStereoscopicDepth(); } 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/DVDCodecs/Video/VDPAU.cpp b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp index 97dea48df9..277802fc1a 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp @@ -1682,11 +1682,6 @@ void CMixer::CreateVdpauMixer() &m_videoMixer); CheckStatus(vdp_st, __LINE__); - // create 3 pitches of black lines needed for clipping top - // and bottom lines when de-interlacing - m_BlackBar = new uint32_t[3*m_config.outWidth]; - memset(m_BlackBar, 0, 3*m_config.outWidth*sizeof(uint32_t)); - } void CMixer::InitCSCMatrix(int Width) @@ -2223,6 +2218,8 @@ void CMixer::Init() m_Sharpness = 0.0; m_DeintMode = 0; m_Deint = 0; + m_Upscale = 0; + m_SeenInterlaceFlag = false; m_ColorMatrix = 0; m_PostProc = false; m_vdpError = false; @@ -2241,8 +2238,6 @@ void CMixer::Uninit() m_outputSurfaces.pop(); } m_config.context->GetProcs().vdp_video_mixer_destroy(m_videoMixer); - - delete [] m_BlackBar; } void CMixer::Flush() @@ -2294,6 +2289,7 @@ void CMixer::InitCycle() EDEINTERLACEMODE mode = CMediaSettings::Get().GetCurrentVideoSettings().m_DeinterlaceMode; EINTERLACEMETHOD method = GetDeinterlacingMethod(); bool interlaced = m_mixerInput[1].DVDPic.iFlags & DVP_FLAG_INTERLACED; + m_SeenInterlaceFlag |= interlaced; // TODO if (//!(flags & DVP_FLAG_NO_POSTPROC) && @@ -2377,6 +2373,12 @@ void CMixer::InitCycle() m_processPicture.outputSurface = m_outputSurfaces.front(); m_mixerInput[1].DVDPic.iWidth = m_config.outWidth; m_mixerInput[1].DVDPic.iHeight = m_config.outHeight; + if (m_SeenInterlaceFlag) + { + double ratio = (double)m_mixerInput[1].DVDPic.iDisplayHeight / m_mixerInput[1].DVDPic.iHeight; + m_mixerInput[1].DVDPic.iHeight -= 6; + m_mixerInput[1].DVDPic.iDisplayHeight = lrint(ratio*m_mixerInput[1].DVDPic.iHeight); + } } else { @@ -2511,32 +2513,6 @@ void CMixer::ProcessPicture() 0, NULL); CheckStatus(vdp_st, __LINE__); - - if (m_mixerfield != VDP_VIDEO_MIXER_PICTURE_STRUCTURE_FRAME) - { - // in order to clip top and bottom lines when de-interlacing - // we black those lines as a work around for not working - // background colour using the mixer - // pixel perfect is preferred over overscanning or zooming - - VdpRect clipRect = destRect; - clipRect.y1 = clipRect.y0 + 2; - uint32_t *data[] = {m_BlackBar}; - uint32_t pitches[] = {destRect.x1}; - vdp_st = m_config.context->GetProcs().vdp_output_surface_put_bits_native(m_processPicture.outputSurface, - (void**)data, - pitches, - &clipRect); - CheckStatus(vdp_st, __LINE__); - - clipRect = destRect; - clipRect.y0 = clipRect.y1 - 2; - vdp_st = m_config.context->GetProcs().vdp_output_surface_put_bits_native(m_processPicture.outputSurface, - (void**)data, - pitches, - &clipRect); - CheckStatus(vdp_st, __LINE__); - } } @@ -3067,7 +3043,12 @@ CVdpauRenderPicture* COutput::ProcessMixerPicture() GLMapSurfaces(); retPic->sourceIdx = procPic.outputSurface; retPic->texture[0] = m_bufferPool.glOutputSurfaceMap[procPic.outputSurface].texture[0]; - retPic->crop = CRect(0,0,0,0); + retPic->texWidth = m_config.outWidth; + retPic->texHeight = m_config.outHeight; + retPic->crop.x1 = 0; + retPic->crop.y1 = (m_config.outHeight - retPic->DVDPic.iHeight) / 2; + retPic->crop.x2 = m_config.outWidth; + retPic->crop.y2 = m_config.outHeight - retPic->crop.y1; } else { diff --git a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h index abe8da2590..2dd3c28314 100644 --- a/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h +++ b/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h @@ -330,8 +330,8 @@ protected: int m_DeintMode; int m_Deint; int m_Upscale; + bool m_SeenInterlaceFlag; unsigned int m_ColorMatrix : 4; - uint32_t *m_BlackBar; VdpVideoMixerPictureStructure m_mixerfield; int m_mixerstep; int m_mixersteps; 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/dvdplayer/DVDOverlayRenderer.cpp b/xbmc/cores/dvdplayer/DVDOverlayRenderer.cpp index dd50844b02..b9ce479423 100644 --- a/xbmc/cores/dvdplayer/DVDOverlayRenderer.cpp +++ b/xbmc/cores/dvdplayer/DVDOverlayRenderer.cpp @@ -24,6 +24,7 @@ #include "DVDCodecs/Overlay/DVDOverlayText.h" #include "DVDCodecs/Overlay/DVDOverlayImage.h" #include "DVDCodecs/Overlay/DVDOverlaySSA.h" +#include "cores/VideoRenderers/OverlayRendererUtil.h" #define CLAMP(a, min, max) ((a) > (max) ? (max) : ( (a) < (min) ? (min) : a )) @@ -72,6 +73,8 @@ void CDVDOverlayRenderer::Render(DVDPictureRenderer* pPicture, CDVDOverlaySSA* p ASS_Image* img = pOverlay->m_libass->RenderImage(width, height, pts); + int depth = OVERLAY::GetStereoscopicDepth(); + while(img) { unsigned int color = img->color; @@ -94,7 +97,7 @@ void CDVDOverlayRenderer::Render(DVDPictureRenderer* pPicture, CDVDOverlaySSA* p uint8_t u = (uint8_t)(127.5 + 255 * CLAMP(-0.169 * r - 0.331 * g + 0.500 * b, -0.5, 0.5)); int y = std::max(0,std::min(img->dst_y, pPicture->height-img->h)); - int x = std::max(0,std::min(img->dst_x, pPicture->width-img->w)); + int x = std::max(0,std::min(img->dst_x + depth, pPicture->width-img->w)); for(int i=0; i<img->h; i++) { 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/File.h b/xbmc/filesystem/File.h index 7c89586e5c..d64acc2e65 100644 --- a/xbmc/filesystem/File.h +++ b/xbmc/filesystem/File.h @@ -100,7 +100,7 @@ class CFile { public: CFile(); - virtual ~CFile(); + ~CFile(); bool Open(const CStdString& strFileName, const unsigned int flags = 0); bool OpenForWrite(const CStdString& strFileName, bool bOverWrite = false); 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/guilib/GUIControl.cpp b/xbmc/guilib/GUIControl.cpp index 218588460f..de77638922 100644 --- a/xbmc/guilib/GUIControl.cpp +++ b/xbmc/guilib/GUIControl.cpp @@ -40,8 +40,6 @@ CGUIControl::CGUIControl() : m_visible = VISIBLE; m_visibleFromSkinCondition = true; m_forceHidden = false; - m_visibleCondition = 0; - m_enableCondition = 0; m_enabled = true; m_posX = 0; m_posY = 0; @@ -71,8 +69,6 @@ CGUIControl::CGUIControl(int parentID, int controlID, float posX, float posY, fl m_visible = VISIBLE; m_visibleFromSkinCondition = true; m_forceHidden = false; - m_visibleCondition = 0; - m_enableCondition = 0; m_enabled = true; ControlType = GUICONTROL_UNKNOWN; m_bInvalidated = true; @@ -543,7 +539,7 @@ void CGUIControl::SetVisible(bool bVisible, bool setVisState) // otherwise we just set m_forceHidden GUIVISIBLE visible; if (m_visibleCondition) - visible = g_infoManager.GetBoolValue(m_visibleCondition) ? VISIBLE : HIDDEN; + visible = m_visibleCondition->Get() ? VISIBLE : HIDDEN; else visible = VISIBLE; if (visible != m_visible) @@ -606,7 +602,7 @@ void CGUIControl::UpdateVisibility(const CGUIListItem *item) if (m_visibleCondition) { bool bWasVisible = m_visibleFromSkinCondition; - m_visibleFromSkinCondition = g_infoManager.GetBoolValue(m_visibleCondition, item); + m_visibleFromSkinCondition = m_visibleCondition->Get(item); if (!bWasVisible && m_visibleFromSkinCondition) { // automatic change of visibility - queue the in effect // CLog::Log(LOGDEBUG, "Visibility changed to visible for control id %i", m_controlID); @@ -629,7 +625,7 @@ void CGUIControl::UpdateVisibility(const CGUIListItem *item) // this may need to be reviewed at a later date bool enabled = m_enabled; if (m_enableCondition) - m_enabled = g_infoManager.GetBoolValue(m_enableCondition, item); + m_enabled = m_enableCondition->Get(item); if (m_enabled != enabled) MarkDirtyRegion(); @@ -651,7 +647,7 @@ void CGUIControl::SetInitialVisibility() { if (m_visibleCondition) { - m_visibleFromSkinCondition = g_infoManager.GetBoolValue(m_visibleCondition); + m_visibleFromSkinCondition = m_visibleCondition->Get(); m_visible = m_visibleFromSkinCondition ? VISIBLE : HIDDEN; // CLog::Log(LOGDEBUG, "Set initial visibility for control %i: %s", m_controlID, m_visible == VISIBLE ? "visible" : "hidden"); } @@ -667,7 +663,7 @@ void CGUIControl::SetInitialVisibility() // and check for conditional enabling - note this overrides SetEnabled() from the code currently // this may need to be reviewed at a later date if (m_enableCondition) - m_enabled = g_infoManager.GetBoolValue(m_enableCondition); + m_enabled = m_enableCondition->Get(); m_allowHiddenFocus.Update(); UpdateColors(); diff --git a/xbmc/guilib/GUIControl.h b/xbmc/guilib/GUIControl.h index e81b7d4ddf..272c0c0c92 100644 --- a/xbmc/guilib/GUIControl.h +++ b/xbmc/guilib/GUIControl.h @@ -210,7 +210,7 @@ public: virtual void SetHeight(float height); virtual void SetVisible(bool bVisible, bool setVisState = false); void SetVisibleCondition(const CStdString &expression, const CStdString &allowHiddenFocus = ""); - unsigned int GetVisibleCondition() const { return m_visibleCondition; }; + bool HasVisibleCondition() const { return m_visibleCondition; }; void SetEnableCondition(const CStdString &expression); virtual void UpdateVisibility(const CGUIListItem *item = NULL); virtual void SetInitialVisibility(); @@ -339,14 +339,14 @@ protected: CGUIControl *m_parentControl; // our parent control if we're part of a group // visibility condition/state - unsigned int m_visibleCondition; + INFO::InfoPtr m_visibleCondition; GUIVISIBLE m_visible; bool m_visibleFromSkinCondition; bool m_forceHidden; // set from the code when a hidden operation is given - overrides m_visible CGUIInfoBool m_allowHiddenFocus; bool m_hasProcessed; // enable/disable state - unsigned int m_enableCondition; + INFO::InfoPtr m_enableCondition; bool m_enabled; bool m_pushedUpdates; diff --git a/xbmc/guilib/GUIDialog.cpp b/xbmc/guilib/GUIDialog.cpp index ee874699a3..65071de864 100644 --- a/xbmc/guilib/GUIDialog.cpp +++ b/xbmc/guilib/GUIDialog.cpp @@ -22,7 +22,6 @@ #include "GUIWindowManager.h" #include "GUILabelControl.h" #include "GUIAudioManager.h" -#include "GUIInfoManager.h" #include "threads/SingleLock.h" #include "utils/TimeUtils.h" #include "Application.h" @@ -137,7 +136,7 @@ void CGUIDialog::UpdateVisibility() { if (m_visibleCondition) { - if (g_infoManager.GetBoolValue(m_visibleCondition)) + if (m_visibleCondition->Get()) Show(); else Close(); diff --git a/xbmc/guilib/GUIIncludes.cpp b/xbmc/guilib/GUIIncludes.cpp index e066df5b67..c622d1a47d 100644 --- a/xbmc/guilib/GUIIncludes.cpp +++ b/xbmc/guilib/GUIIncludes.cpp @@ -180,7 +180,7 @@ bool CGUIIncludes::HasIncludeFile(const CStdString &file) const return false; } -void CGUIIncludes::ResolveIncludes(TiXmlElement *node, std::map<int, bool>* xmlIncludeConditions /* = NULL */) +void CGUIIncludes::ResolveIncludes(TiXmlElement *node, std::map<INFO::InfoPtr, bool>* xmlIncludeConditions /* = NULL */) { if (!node) return; @@ -194,7 +194,7 @@ void CGUIIncludes::ResolveIncludes(TiXmlElement *node, std::map<int, bool>* xmlI } } -void CGUIIncludes::ResolveIncludesForNode(TiXmlElement *node, std::map<int, bool>* xmlIncludeConditions /* = NULL */) +void CGUIIncludes::ResolveIncludesForNode(TiXmlElement *node, std::map<INFO::InfoPtr, bool>* xmlIncludeConditions /* = NULL */) { // we have a node, find any <include file="fileName">tagName</include> tags and replace // recursively with their real includes @@ -242,8 +242,8 @@ void CGUIIncludes::ResolveIncludesForNode(TiXmlElement *node, std::map<int, bool const char *condition = include->Attribute("condition"); if (condition) { // check this condition - int conditionID = g_infoManager.Register(condition); - bool value = g_infoManager.GetBoolValue(conditionID); + INFO::InfoPtr conditionID = g_infoManager.Register(condition); + bool value = conditionID->Get(); if (xmlIncludeConditions) (*xmlIncludeConditions)[conditionID] = value; diff --git a/xbmc/guilib/GUIIncludes.h b/xbmc/guilib/GUIIncludes.h index 8b08fdcd35..004d401221 100644 --- a/xbmc/guilib/GUIIncludes.h +++ b/xbmc/guilib/GUIIncludes.h @@ -24,6 +24,7 @@ #include <map> #include <set> +#include "interfaces/info/InfoBool.h" // forward definitions class TiXmlElement; @@ -47,11 +48,11 @@ public: "bar" from the include file "foo". \param node an XML Element - all child elements are traversed. */ - void ResolveIncludes(TiXmlElement *node, std::map<int, bool>* xmlIncludeConditions = NULL); + void ResolveIncludes(TiXmlElement *node, std::map<INFO::InfoPtr, bool>* xmlIncludeConditions = NULL); const INFO::CSkinVariableString* CreateSkinVariable(const CStdString& name, int context); private: - void ResolveIncludesForNode(TiXmlElement *node, std::map<int, bool>* xmlIncludeConditions = NULL); + void ResolveIncludesForNode(TiXmlElement *node, std::map<INFO::InfoPtr, bool>* xmlIncludeConditions = NULL); CStdString ResolveConstant(const CStdString &constant) const; bool HasIncludeFile(const CStdString &includeFile) const; std::map<CStdString, TiXmlElement> m_includes; diff --git a/xbmc/guilib/GUIInfoTypes.cpp b/xbmc/guilib/GUIInfoTypes.cpp index d2039d2242..5648a77548 100644 --- a/xbmc/guilib/GUIInfoTypes.cpp +++ b/xbmc/guilib/GUIInfoTypes.cpp @@ -33,7 +33,6 @@ using ADDON::CAddonMgr; CGUIInfoBool::CGUIInfoBool(bool value) { - m_info = 0; m_value = value; } @@ -57,7 +56,7 @@ void CGUIInfoBool::Parse(const CStdString &expression, int context) void CGUIInfoBool::Update(const CGUIListItem *item /*= NULL*/) { if (m_info) - m_value = g_infoManager.GetBoolValue(m_info, item); + m_value = m_info->Get(item); } diff --git a/xbmc/guilib/GUIInfoTypes.h b/xbmc/guilib/GUIInfoTypes.h index 80f79955c0..8c1c1dc9fe 100644 --- a/xbmc/guilib/GUIInfoTypes.h +++ b/xbmc/guilib/GUIInfoTypes.h @@ -29,6 +29,7 @@ */ #include "utils/StdString.h" +#include "interfaces/info/InfoBool.h" class CGUIListItem; @@ -43,7 +44,7 @@ public: void Update(const CGUIListItem *item = NULL); void Parse(const CStdString &expression, int context); private: - unsigned int m_info; + INFO::InfoPtr m_info; bool m_value; }; diff --git a/xbmc/guilib/GUIListItemLayout.cpp b/xbmc/guilib/GUIListItemLayout.cpp index ebb3754851..ce31fc525d 100644 --- a/xbmc/guilib/GUIListItemLayout.cpp +++ b/xbmc/guilib/GUIListItemLayout.cpp @@ -34,7 +34,6 @@ CGUIListItemLayout::CGUIListItemLayout() { m_width = 0; m_height = 0; - m_condition = 0; m_focused = false; m_invalidated = true; m_group.SetPushUpdates(true); @@ -143,7 +142,7 @@ bool CGUIListItemLayout::MoveRight() bool CGUIListItemLayout::CheckCondition() { - return !m_condition || g_infoManager.GetBoolValue(m_condition); + return !m_condition || m_condition->Get(); } void CGUIListItemLayout::LoadControl(TiXmlElement *child, CGUIControlGroup *group) diff --git a/xbmc/guilib/GUIListItemLayout.h b/xbmc/guilib/GUIListItemLayout.h index 6ff4f4f313..28141c9671 100644 --- a/xbmc/guilib/GUIListItemLayout.h +++ b/xbmc/guilib/GUIListItemLayout.h @@ -70,7 +70,7 @@ protected: bool m_focused; bool m_invalidated; - unsigned int m_condition; + INFO::InfoPtr m_condition; CGUIInfoBool m_isPlaying; }; diff --git a/xbmc/guilib/GUIRadioButtonControl.cpp b/xbmc/guilib/GUIRadioButtonControl.cpp index 3c404001a7..5ba965d518 100644 --- a/xbmc/guilib/GUIRadioButtonControl.cpp +++ b/xbmc/guilib/GUIRadioButtonControl.cpp @@ -36,7 +36,6 @@ CGUIRadioButtonControl::CGUIRadioButtonControl(int parentID, int controlID, floa { m_radioPosX = 0; m_radioPosY = 0; - m_toggleSelect = 0; m_imgRadioOnFocus.SetAspectRatio(CAspectRatio::AR_KEEP); m_imgRadioOnNoFocus.SetAspectRatio(CAspectRatio::AR_KEEP); m_imgRadioOffFocus.SetAspectRatio(CAspectRatio::AR_KEEP); @@ -72,7 +71,7 @@ void CGUIRadioButtonControl::Process(unsigned int currentTime, CDirtyRegionList if (m_toggleSelect) { // ask our infoManager whether we are selected or not... - bool selected = g_infoManager.GetBoolValue(m_toggleSelect); + bool selected = m_toggleSelect->Get(); if (selected != m_bSelected) { diff --git a/xbmc/guilib/GUIRadioButtonControl.h b/xbmc/guilib/GUIRadioButtonControl.h index 65315d206f..7c342597dd 100644 --- a/xbmc/guilib/GUIRadioButtonControl.h +++ b/xbmc/guilib/GUIRadioButtonControl.h @@ -68,5 +68,5 @@ protected: CGUITexture m_imgRadioOffNoFocus; float m_radioPosX; float m_radioPosY; - unsigned int m_toggleSelect; + INFO::InfoPtr m_toggleSelect; }; diff --git a/xbmc/guilib/GUIStaticItem.cpp b/xbmc/guilib/GUIStaticItem.cpp index 9088b72eec..d371691cee 100644 --- a/xbmc/guilib/GUIStaticItem.cpp +++ b/xbmc/guilib/GUIStaticItem.cpp @@ -28,7 +28,6 @@ using namespace std; CGUIStaticItem::CGUIStaticItem(const TiXmlElement *item, int parentID) : CFileItem() { - m_visCondition = 0; m_visState = false; assert(item); @@ -91,7 +90,6 @@ CGUIStaticItem::CGUIStaticItem(const TiXmlElement *item, int parentID) : CFileIt CGUIStaticItem::CGUIStaticItem(const CFileItem &item) : CFileItem(item) { - m_visCondition = 0; m_visState = false; } @@ -120,7 +118,7 @@ bool CGUIStaticItem::UpdateVisibility(int contextWindow) { if (!m_visCondition) return false; - bool state = g_infoManager.GetBoolValue(m_visCondition); + bool state = m_visCondition->Get(); if (state != m_visState) { m_visState = state; diff --git a/xbmc/guilib/GUIStaticItem.h b/xbmc/guilib/GUIStaticItem.h index c2d264a46f..098d8e1eb7 100644 --- a/xbmc/guilib/GUIStaticItem.h +++ b/xbmc/guilib/GUIStaticItem.h @@ -89,7 +89,7 @@ public: private: typedef std::vector< std::pair<CGUIInfoLabel, CStdString> > InfoVector; InfoVector m_info; - unsigned int m_visCondition; + INFO::InfoPtr m_visCondition; bool m_visState; CGUIAction m_clickActions; }; diff --git a/xbmc/guilib/GUITextBox.cpp b/xbmc/guilib/GUITextBox.cpp index 81059ea0b9..4483474f96 100644 --- a/xbmc/guilib/GUITextBox.cpp +++ b/xbmc/guilib/GUITextBox.cpp @@ -41,7 +41,6 @@ CGUITextBox::CGUITextBox(int parentID, int controlID, float posX, float posY, fl m_pageControl = 0; m_lastRenderTime = 0; m_scrollTime = scrollTime; - m_autoScrollCondition = 0; m_autoScrollTime = 0; m_autoScrollDelay = 3000; m_autoScrollDelayTime = 0; @@ -124,7 +123,7 @@ void CGUITextBox::Process(unsigned int currentTime, CDirtyRegionList &dirtyregio // update our auto-scrolling as necessary if (m_autoScrollTime && m_lines.size() > m_itemsPerPage) { - if (!m_autoScrollCondition || g_infoManager.GetBoolValue(m_autoScrollCondition)) + if (!m_autoScrollCondition || m_autoScrollCondition->Get()) { if (m_lastRenderTime) m_autoScrollDelayTime += currentTime - m_lastRenderTime; diff --git a/xbmc/guilib/GUITextBox.h b/xbmc/guilib/GUITextBox.h index 2a24de7722..40edfb4822 100644 --- a/xbmc/guilib/GUITextBox.h +++ b/xbmc/guilib/GUITextBox.h @@ -86,7 +86,7 @@ protected: TransformMatrix m_cachedTextMatrix; // autoscrolling - unsigned int m_autoScrollCondition; + INFO::InfoPtr m_autoScrollCondition; int m_autoScrollTime; // time to scroll 1 line (ms) int m_autoScrollDelay; // delay before scroll (ms) unsigned int m_autoScrollDelayTime; // current offset into the delay diff --git a/xbmc/guilib/GUITextLayout.cpp b/xbmc/guilib/GUITextLayout.cpp index ee0775b8a9..1c80aadaac 100644 --- a/xbmc/guilib/GUITextLayout.cpp +++ b/xbmc/guilib/GUITextLayout.cpp @@ -217,19 +217,28 @@ void CGUITextLayout::RenderOutline(float x, float y, color_t color, color_t outl bool CGUITextLayout::Update(const CStdString &text, float maxWidth, bool forceUpdate /*= false*/, bool forceLTRReadingOrder /*= false*/) { - // convert to utf16 + if (text == m_lastUtf8Text && !forceUpdate) + return false; + + m_lastUtf8Text = text; CStdStringW utf16; utf8ToW(text, utf16); - - // update - return UpdateW(utf16, maxWidth, forceUpdate, forceLTRReadingOrder); + UpdateCommon(utf16, maxWidth, forceLTRReadingOrder); + return true; } bool CGUITextLayout::UpdateW(const CStdStringW &text, float maxWidth /*= 0*/, bool forceUpdate /*= false*/, bool forceLTRReadingOrder /*= false*/) { - if (text.Equals(m_lastText) && !forceUpdate) + if (text == m_lastText && !forceUpdate) return false; + m_lastText = text; + UpdateCommon(text, maxWidth, forceLTRReadingOrder); + return true; +} + +void CGUITextLayout::UpdateCommon(const CStdStringW &text, float maxWidth, bool forceLTRReadingOrder) +{ // parse the text for style information vecText parsedText; vecColors colors; @@ -237,8 +246,6 @@ bool CGUITextLayout::UpdateW(const CStdStringW &text, float maxWidth /*= 0*/, bo // and update UpdateStyled(parsedText, colors, maxWidth, forceLTRReadingOrder); - m_lastText = text; - return true; } void CGUITextLayout::UpdateStyled(const vecText &text, const vecColors &colors, float maxWidth, bool forceLTRReadingOrder) diff --git a/xbmc/guilib/GUITextLayout.h b/xbmc/guilib/GUITextLayout.h index bc2bdfea47..2c98e85420 100644 --- a/xbmc/guilib/GUITextLayout.h +++ b/xbmc/guilib/GUITextLayout.h @@ -116,6 +116,7 @@ protected: static void BidiTransform(std::vector<CGUIString> &lines, bool forceLTRReadingOrder); static CStdStringW BidiFlip(const CStdStringW &text, bool forceLTRReadingOrder); void CalcTextExtent(); + void UpdateCommon(const CStdStringW &text, float maxWidth, bool forceLTRReadingOrder); // our text to render vecColors m_colors; @@ -131,6 +132,7 @@ protected: // the default color (may differ from the font objects defaults) color_t m_textColor; + std::string m_lastUtf8Text; CStdStringW m_lastText; float m_textWidth; float m_textHeight; diff --git a/xbmc/guilib/GUIToggleButtonControl.cpp b/xbmc/guilib/GUIToggleButtonControl.cpp index 703373f7ab..3a3e343c71 100644 --- a/xbmc/guilib/GUIToggleButtonControl.cpp +++ b/xbmc/guilib/GUIToggleButtonControl.cpp @@ -30,7 +30,6 @@ CGUIToggleButtonControl::CGUIToggleButtonControl(int parentID, int controlID, fl : CGUIButtonControl(parentID, controlID, posX, posY, width, height, textureFocus, textureNoFocus, labelInfo) , m_selectButton(parentID, controlID, posX, posY, width, height, altTextureFocus, altTextureNoFocus, labelInfo) { - m_toggleSelect = 0; ControlType = GUICONTROL_TOGGLEBUTTON; } @@ -43,7 +42,7 @@ void CGUIToggleButtonControl::Process(unsigned int currentTime, CDirtyRegionList // ask our infoManager whether we are selected or not... bool selected = m_bSelected; if (m_toggleSelect) - selected = g_infoManager.GetBoolValue(m_toggleSelect); + selected = m_toggleSelect->Get(); if (selected != m_bSelected) { MarkDirtyRegion(); diff --git a/xbmc/guilib/GUIToggleButtonControl.h b/xbmc/guilib/GUIToggleButtonControl.h index 5d7c544aa8..f16b1221b7 100644 --- a/xbmc/guilib/GUIToggleButtonControl.h +++ b/xbmc/guilib/GUIToggleButtonControl.h @@ -61,6 +61,6 @@ protected: virtual bool UpdateColors(); virtual void OnClick(); CGUIButtonControl m_selectButton; - unsigned int m_toggleSelect; + INFO::InfoPtr m_toggleSelect; }; #endif diff --git a/xbmc/guilib/GUIWindow.cpp b/xbmc/guilib/GUIWindow.cpp index ed6000ef2f..c736700adf 100644 --- a/xbmc/guilib/GUIWindow.cpp +++ b/xbmc/guilib/GUIWindow.cpp @@ -447,7 +447,7 @@ CPoint CGUIWindow::GetPosition() const for (unsigned int i = 0; i < m_origins.size(); i++) { // no condition implies true - if (!m_origins[i].condition || g_infoManager.GetBoolValue(m_origins[i].condition)) + if (!m_origins[i].condition || m_origins[i].condition->Get()) { // found origin return CPoint(m_origins[i].x, m_origins[i].y); } @@ -776,6 +776,7 @@ void CGUIWindow::FreeResources(bool forceUnload /*= FALSE */) { delete m_windowXMLRootElement; m_windowXMLRootElement = NULL; + m_xmlIncludeConditions.clear(); } } @@ -791,6 +792,7 @@ void CGUIWindow::ClearAll() CGUIControlGroup::ClearAll(); m_windowLoaded = false; m_dynamicResourceAlloc = true; + m_visibleCondition.reset(); } bool CGUIWindow::Initialize() @@ -967,7 +969,6 @@ void CGUIWindow::SetDefaults() m_defaultControl = 0; m_posX = m_posY = m_width = m_height = 0; m_overlayState = OVERLAY_STATE_PARENT_WINDOW; // Use parent or previous window's state - m_visibleCondition = 0; m_previousWindow = WINDOW_INVALID; m_animations.clear(); m_origins.clear(); diff --git a/xbmc/guilib/GUIWindow.h b/xbmc/guilib/GUIWindow.h index 8e5cd2a752..34dd833e6f 100644 --- a/xbmc/guilib/GUIWindow.h +++ b/xbmc/guilib/GUIWindow.h @@ -63,11 +63,10 @@ public: COrigin() { x = y = 0; - condition = 0; }; float x; float y; - unsigned int condition; + INFO::InfoPtr condition; }; /*! @@ -281,7 +280,7 @@ protected: private: std::map<CStdString, CVariant, icompare> m_mapProperties; - std::map<int, bool> m_xmlIncludeConditions; ///< \brief used to store conditions used to resolve includes for this window + std::map<INFO::InfoPtr, bool> m_xmlIncludeConditions; ///< \brief used to store conditions used to resolve includes for this window }; #endif diff --git a/xbmc/guilib/VisibleEffect.cpp b/xbmc/guilib/VisibleEffect.cpp index d4abdcfaad..170d44591e 100644 --- a/xbmc/guilib/VisibleEffect.cpp +++ b/xbmc/guilib/VisibleEffect.cpp @@ -360,7 +360,6 @@ CAnimation::CAnimation() { m_type = ANIM_TYPE_NONE; m_reversible = true; - m_condition = 0; m_repeatAnim = ANIM_REPEAT_NONE; m_currentState = ANIM_STATE_NONE; m_currentProcess = ANIM_PROCESS_NONE; @@ -389,7 +388,7 @@ CAnimation &CAnimation::operator =(const CAnimation &src) if (this == &src) return *this; // same m_type = src.m_type; m_reversible = src.m_reversible; - m_condition = src.m_condition; // TODO: register/unregister + m_condition = src.m_condition; m_repeatAnim = src.m_repeatAnim; m_lastCondition = src.m_lastCondition; m_queuedProcess = src.m_queuedProcess; @@ -581,12 +580,14 @@ CAnimation CAnimation::CreateFader(float start, float end, unsigned int delay, u bool CAnimation::CheckCondition() { - return !m_condition || g_infoManager.GetBoolValue(m_condition); + return !m_condition || m_condition->Get(); } void CAnimation::UpdateCondition(const CGUIListItem *item) { - bool condition = g_infoManager.GetBoolValue(m_condition, item); + if (!m_condition) + return; + bool condition = m_condition->Get(item); if (condition && !m_lastCondition) QueueAnimation(ANIM_PROCESS_NORMAL); else if (!condition && m_lastCondition) @@ -601,7 +602,7 @@ void CAnimation::UpdateCondition(const CGUIListItem *item) void CAnimation::SetInitialCondition() { - m_lastCondition = g_infoManager.GetBoolValue(m_condition); + m_lastCondition = m_condition ? m_condition->Get() : false; if (m_lastCondition) ApplyAnimation(); else diff --git a/xbmc/guilib/VisibleEffect.h b/xbmc/guilib/VisibleEffect.h index 0d444553ce..c065b43552 100644 --- a/xbmc/guilib/VisibleEffect.h +++ b/xbmc/guilib/VisibleEffect.h @@ -33,6 +33,7 @@ class CGUIListItem; #include "Geometry.h" // for CPoint, CRect #include "utils/StdString.h" #include "boost/shared_ptr.hpp" +#include "interfaces/info/InfoBool.h" enum ANIMATION_TYPE { @@ -184,7 +185,7 @@ private: // type of animation ANIMATION_TYPE m_type; bool m_reversible; - unsigned int m_condition; + INFO::InfoPtr m_condition; // conditional anims can repeat ANIM_REPEAT m_repeatAnim; 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/interfaces/info/InfoBool.h b/xbmc/interfaces/info/InfoBool.h index 2674cac3f5..86a16966b3 100644 --- a/xbmc/interfaces/info/InfoBool.h +++ b/xbmc/interfaces/info/InfoBool.h @@ -20,9 +20,8 @@ #pragma once -#include <vector> -#include <map> -#include "utils/StdString.h" +#include <string> +#include "boost/shared_ptr.hpp" class CGUIListItem; @@ -35,79 +34,63 @@ namespace INFO class InfoBool { public: - InfoBool(const CStdString &expression, int context) + InfoBool(const std::string &expression, int context) : m_value(false), m_context(context), + m_listItemDependent(false), m_expression(expression), - m_lastUpdate(0) + m_dirty(true) { }; virtual ~InfoBool() {}; + /*! \brief Set the info bool dirty. + Will cause the info bool to be re-evaluated next call to Get() + */ + void SetDirty() + { + m_dirty = true; + } /*! \brief Get the value of this info bool - This is called to update (if necessary) and fetch the value of the info bool - \param time current time (used to test if we need to update yet) + This is called to update (if dirty) and fetch the value of the info bool \param item the item used to evaluate the bool */ - inline bool Get(unsigned int time, const CGUIListItem *item = NULL) + inline bool Get(const CGUIListItem *item = NULL) { - if (item) + if (item && m_listItemDependent) Update(item); - else if (time - m_lastUpdate > 0) + else if (m_dirty) { Update(NULL); - m_lastUpdate = time; + m_dirty = false; } return m_value; } - bool operator==(const InfoBool &right) const; + bool operator==(const InfoBool &right) const + { + return (m_context == right.m_context && + m_expression == right.m_expression); + } /*! \brief Update the value of this info bool This is called if and only if the info bool is dirty, allowing it to update it's current value */ virtual void Update(const CGUIListItem *item) {}; + const std::string &GetExpression() const { return m_expression; } + bool ListItemDependent() const { return m_listItemDependent; } protected: bool m_value; ///< current value int m_context; ///< contextual information to go with the condition + bool m_listItemDependent; ///< do not cache if a listitem pointer is given private: - CStdString m_expression; ///< original expression - unsigned int m_lastUpdate; ///< last update time (to determine dirty status) -}; - -/*! \brief Class to wrap active boolean conditions - */ -class InfoSingle : public InfoBool -{ -public: - InfoSingle(const CStdString &condition, int context); - virtual ~InfoSingle() {}; - - virtual void Update(const CGUIListItem *item); -private: - int m_condition; ///< actual condition this represents -}; - -/*! \brief Class to wrap active boolean expressions - */ -class InfoExpression : public InfoBool -{ -public: - InfoExpression(const CStdString &expression, int context); - virtual ~InfoExpression() {}; - - virtual void Update(const CGUIListItem *item); -private: - void Parse(const CStdString &expression); - bool Evaluate(const CGUIListItem *item, bool &result); - short GetOperator(const char ch) const; - - std::vector<short> m_postfix; ///< the postfix form of the expression (operators and operand indicies) - std::vector<unsigned int> m_operands; ///< the operands in the expression + std::string m_expression; ///< original expression + bool m_dirty; ///< whether we need an update }; +typedef boost::shared_ptr<InfoBool> InfoPtr; }; diff --git a/xbmc/interfaces/info/InfoBool.cpp b/xbmc/interfaces/info/InfoExpression.cpp index db4926caed..d84f0c6c2e 100644 --- a/xbmc/interfaces/info/InfoBool.cpp +++ b/xbmc/interfaces/info/InfoExpression.cpp @@ -18,25 +18,18 @@ * */ -#include "InfoBool.h" +#include "InfoExpression.h" #include <stack> #include "utils/log.h" -#include "utils/StringUtils.h" #include "GUIInfoManager.h" using namespace std; using namespace INFO; -bool InfoBool::operator==(const InfoBool &right) const -{ - return (m_context == right.m_context && - StringUtils::EqualsNoCase(m_expression, right.m_expression)); -} - -InfoSingle::InfoSingle(const CStdString &expression, int context) +InfoSingle::InfoSingle(const std::string &expression, int context) : InfoBool(expression, context) { - m_condition = g_infoManager.TranslateSingleString(expression); + m_condition = g_infoManager.TranslateSingleString(expression, m_listItemDependent); } void InfoSingle::Update(const CGUIListItem *item) @@ -44,7 +37,7 @@ void InfoSingle::Update(const CGUIListItem *item) m_value = g_infoManager.GetBool(m_condition, m_context, item); } -InfoExpression::InfoExpression(const CStdString &expression, int context) +InfoExpression::InfoExpression(const std::string &expression, int context) : InfoBool(expression, context) { Parse(expression); @@ -77,10 +70,10 @@ short InfoExpression::GetOperator(const char ch) const return 0; } -void InfoExpression::Parse(const CStdString &expression) +void InfoExpression::Parse(const std::string &expression) { stack<char> operators; - CStdString operand; + std::string operand; for (unsigned int i = 0; i < expression.size(); i++) { if (GetOperator(expression[i])) @@ -88,9 +81,10 @@ void InfoExpression::Parse(const CStdString &expression) // cleanup any operand, translate and put into our expression list if (!operand.empty()) { - unsigned int info = g_infoManager.Register(operand, m_context); + InfoPtr info = g_infoManager.Register(operand, m_context); if (info) { + m_listItemDependent |= info->ListItemDependent(); m_postfix.push_back(m_operands.size()); m_operands.push_back(info); } @@ -134,9 +128,10 @@ void InfoExpression::Parse(const CStdString &expression) if (!operand.empty()) { - unsigned int info = g_infoManager.Register(operand, m_context); + InfoPtr info = g_infoManager.Register(operand, m_context); if (info) { + m_listItemDependent |= info->ListItemDependent(); m_postfix.push_back(m_operands.size()); m_operands.push_back(info); } @@ -183,7 +178,7 @@ bool InfoExpression::Evaluate(const CGUIListItem *item, bool &result) save.push(left || right); } else // operand - save.push(g_infoManager.GetBoolValue(m_operands[expr], item)); + save.push(m_operands[expr]->Get(item)); } if (save.size() != 1) return false; diff --git a/xbmc/interfaces/info/InfoExpression.h b/xbmc/interfaces/info/InfoExpression.h new file mode 100644 index 0000000000..4e0faee202 --- /dev/null +++ b/xbmc/interfaces/info/InfoExpression.h @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2005-2013 Team XBMC + * http://xbmc.org + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with XBMC; see the file COPYING. If not, see + * <http://www.gnu.org/licenses/>. + * + */ + +#pragma once + +#include <vector> +#include "InfoBool.h" + +class CGUIListItem; + +namespace INFO +{ +/*! \brief Class to wrap active boolean conditions + */ +class InfoSingle : public InfoBool +{ +public: + InfoSingle(const std::string &condition, int context); + virtual ~InfoSingle() {}; + + virtual void Update(const CGUIListItem *item); +private: + int m_condition; ///< actual condition this represents +}; + +/*! \brief Class to wrap active boolean expressions + */ +class InfoExpression : public InfoBool +{ +public: + InfoExpression(const std::string &expression, int context); + virtual ~InfoExpression() {}; + + virtual void Update(const CGUIListItem *item); +private: + void Parse(const std::string &expression); + bool Evaluate(const CGUIListItem *item, bool &result); + short GetOperator(const char ch) const; + + std::vector<short> m_postfix; ///< the postfix form of the expression (operators and operand indicies) + std::vector<InfoPtr> m_operands; ///< the operands in the expression +}; + +}; diff --git a/xbmc/interfaces/info/Makefile b/xbmc/interfaces/info/Makefile index a5a18ca150..01fdca7aba 100644 --- a/xbmc/interfaces/info/Makefile +++ b/xbmc/interfaces/info/Makefile @@ -1,4 +1,4 @@ -SRCS=InfoBool.cpp \ +SRCS=InfoExpression.cpp \ SkinVariable.cpp \ LIB=info.a diff --git a/xbmc/interfaces/info/SkinVariable.cpp b/xbmc/interfaces/info/SkinVariable.cpp index 3bb3592d48..5ca762820b 100644 --- a/xbmc/interfaces/info/SkinVariable.cpp +++ b/xbmc/interfaces/info/SkinVariable.cpp @@ -25,8 +25,6 @@ using namespace std; using namespace INFO; -#define DEFAULT_VALUE -1 - const CSkinVariableString* CSkinVariable::CreateFromXML(const TiXmlElement& node, int context) { const char* name = node.Attribute("name"); @@ -43,12 +41,10 @@ const CSkinVariableString* CSkinVariable::CreateFromXML(const TiXmlElement& node CSkinVariableString::ConditionLabelPair pair; if (valuenode->Attribute("condition")) pair.m_condition = g_infoManager.Register(valuenode->Attribute("condition"), context); - else - pair.m_condition = DEFAULT_VALUE; pair.m_label = CGUIInfoLabel(valuenode->FirstChild()->Value()); tmp->m_conditionLabelPairs.push_back(pair); - if (pair.m_condition == DEFAULT_VALUE) + if (!pair.m_condition) break; // once we reach default value (without condition) break iterating } valuenode = valuenode->NextSiblingElement("value"); @@ -78,7 +74,7 @@ CStdString CSkinVariableString::GetValue(bool preferImage /* = false*/, const CG { for (VECCONDITIONLABELPAIR::const_iterator it = m_conditionLabelPairs.begin() ; it != m_conditionLabelPairs.end(); ++it) { - if (it->m_condition == DEFAULT_VALUE || g_infoManager.GetBoolValue(it->m_condition, item)) + if (!it->m_condition || it->m_condition->Get(item)) { if (item) return it->m_label.GetItemLabel(item, preferImage); diff --git a/xbmc/interfaces/info/SkinVariable.h b/xbmc/interfaces/info/SkinVariable.h index da289b8937..b1022b8362 100644 --- a/xbmc/interfaces/info/SkinVariable.h +++ b/xbmc/interfaces/info/SkinVariable.h @@ -20,6 +20,7 @@ */ #include "guilib/GUIInfoTypes.h" +#include "interfaces/info/InfoBool.h" class TiXmlElement; @@ -47,7 +48,7 @@ private: struct ConditionLabelPair { - int m_condition; + INFO::InfoPtr m_condition; CGUIInfoLabel m_label; }; 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/Archive.cpp b/xbmc/utils/Archive.cpp index 15c272f4b9..fd54d13b27 100644 --- a/xbmc/utils/Archive.cpp +++ b/xbmc/utils/Archive.cpp @@ -455,7 +455,7 @@ inline CArchive& CArchive::streamin(void* dataPtr, const size_t size) size_t read = m_pFile->Read(dataPtr, size); if (read < size) { - CLog::Log(LOGERROR, "%s: can't stream out: requested %lu bytes, was read %lu bytes", (unsigned long)size, (unsigned long)read); + CLog::Log(LOGERROR, "%s: can't stream out: requested %lu bytes, was read %lu bytes", __FUNCTION__, (unsigned long)size, (unsigned long)read); memset(dataPtr, 0, size); } 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 cee1a87f9c..33d298b184 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 3354edd049..54c835abe0 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/utils/test/TestCPUInfo.cpp b/xbmc/utils/test/TestCPUInfo.cpp index 08f65bb834..b43289933b 100644 --- a/xbmc/utils/test/TestCPUInfo.cpp +++ b/xbmc/utils/test/TestCPUInfo.cpp @@ -22,6 +22,10 @@ #include "Temperature.h" #include "settings/AdvancedSettings.h" +#ifdef TARGET_POSIX +#include "../linux/XTimeUtils.h" +#endif + #include "gtest/gtest.h" TEST(TestCPUInfo, getUsedPercentage) @@ -111,7 +115,7 @@ TEST(TestCPUInfo, CoreInfo) TEST(TestCPUInfo, GetCoresUsageString) { - EXPECT_STRNE("", g_cpuInfo.GetCoresUsageString()); + EXPECT_STRNE("", g_cpuInfo.GetCoresUsageString().c_str()); } TEST(TestCPUInfo, GetCPUFeatures) diff --git a/xbmc/utils/test/TestCharsetConverter.cpp b/xbmc/utils/test/TestCharsetConverter.cpp index 9b49de8f2b..fdd4584470 100644 --- a/xbmc/utils/test/TestCharsetConverter.cpp +++ b/xbmc/utils/test/TestCharsetConverter.cpp @@ -21,6 +21,7 @@ #include "settings/Settings.h" #include "utils/CharsetConverter.h" #include "utils/StdString.h" +#include "utils/Utf8Utils.h" #include "gtest/gtest.h" @@ -212,27 +213,25 @@ TEST_F(TestCharsetConverter, isValidUtf8_1) { varstra1.clear(); g_charsetConverter.ToUtf8("UTF-16LE", refutf16LE3, varstra1); - EXPECT_TRUE(g_charsetConverter.isValidUtf8(varstra1.c_str())); + EXPECT_TRUE(CUtf8Utils::isValidUtf8(varstra1.c_str())); } TEST_F(TestCharsetConverter, isValidUtf8_2) { refstr1 = refutf16LE3; - EXPECT_FALSE(g_charsetConverter.isValidUtf8(refstr1)); + EXPECT_FALSE(CUtf8Utils::isValidUtf8(refstr1)); } TEST_F(TestCharsetConverter, isValidUtf8_3) { varstra1.clear(); g_charsetConverter.ToUtf8("UTF-16LE", refutf16LE3, varstra1); - EXPECT_TRUE(g_charsetConverter.isValidUtf8(varstra1.c_str(), - varstra1.length() + 1)); + EXPECT_TRUE(CUtf8Utils::isValidUtf8(varstra1.c_str())); } TEST_F(TestCharsetConverter, isValidUtf8_4) { - EXPECT_FALSE(g_charsetConverter.isValidUtf8(refutf16LE3, - sizeof(refutf16LE3))); + EXPECT_FALSE(CUtf8Utils::isValidUtf8(refutf16LE3)); } /* TODO: Resolve correct input/output for this function */ 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/GUIWindowFullScreen.cpp b/xbmc/video/windows/GUIWindowFullScreen.cpp index 8a45593737..d51e7f72c7 100644 --- a/xbmc/video/windows/GUIWindowFullScreen.cpp +++ b/xbmc/video/windows/GUIWindowFullScreen.cpp @@ -339,7 +339,7 @@ void CGUIWindowFullScreen::OnWindowLoaded() CGUIProgressControl* pProgress = (CGUIProgressControl*)GetControl(CONTROL_PROGRESS); if(pProgress) { - if( pProgress->GetInfo() == 0 || pProgress->GetVisibleCondition() == 0) + if( pProgress->GetInfo() == 0 || !pProgress->HasVisibleCondition()) { pProgress->SetInfo(PLAYER_PROGRESS); pProgress->SetVisibleCondition("player.displayafterseek"); @@ -348,14 +348,14 @@ void CGUIWindowFullScreen::OnWindowLoaded() } CGUILabelControl* pLabel = (CGUILabelControl*)GetControl(LABEL_BUFFERING); - if(pLabel && pLabel->GetVisibleCondition() == 0) + if(pLabel && !pLabel->HasVisibleCondition()) { pLabel->SetVisibleCondition("player.caching"); pLabel->SetVisible(true); } pLabel = (CGUILabelControl*)GetControl(LABEL_CURRENT_TIME); - if(pLabel && pLabel->GetVisibleCondition() == 0) + if(pLabel && !pLabel->HasVisibleCondition()) { pLabel->SetVisibleCondition("player.displayafterseek"); pLabel->SetVisible(true); 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/view/GUIViewControl.cpp b/xbmc/view/GUIViewControl.cpp index 85edf66791..bf63791d4e 100644 --- a/xbmc/view/GUIViewControl.cpp +++ b/xbmc/view/GUIViewControl.cpp @@ -327,7 +327,7 @@ void CGUIViewControl::UpdateViewVisibility() for (unsigned int i = 0; i < m_allViews.size(); i++) { CGUIControl *view = m_allViews[i]; - if (view->GetVisibleCondition()) + if (view->HasVisibleCondition()) { view->UpdateVisibility(); if (view->IsVisibleFromSkin()) 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 |