Permalink
Browse files

Merge branch 'EXP-ADDON-Add_Option_Disable_Internal_Bluray'

  • Loading branch information...
2 parents f5e00db + 7b531e8 commit 03238a9a38b5123443ac45f47c148eb6275e69e8 @Sebastiii Sebastiii committed Mar 30, 2013
@@ -53,6 +53,7 @@ public class BD : SectionSettings
private MPTabPage tabPage1;
private MPGroupBox groupBox1;
private MPLabel labelPlayAll;
+ private MPCheckBox useInternalBDPlayer;
private PictureBox pictureBoxRegions;
private NumericUpDown ParentalControlUpDown;
private Label label2;
@@ -101,13 +102,16 @@ public override void LoadSettings()
preferredAudioTypeComboBox.SelectedItem = xmlreader.GetValueAsString("bdplayer", "audiotype", "AC3");
ParentalControlUpDown.Value = xmlreader.GetValueAsInt("bdplayer", "parentalcontrol", 99);
SubsEnabled.Checked = xmlreader.GetValueAsBool("bdplayer", "subtitlesenabled", true);
+ useInternalBDPlayer.Checked = xmlreader.GetValueAsBool("bdplayer", "useInternalBDPlayer", true);
}
}
public override void SaveSettings()
{
using (Settings xmlwriter = new MPSettings())
{
+ //Use Internel Menu
+ xmlwriter.SetValueAsBool("bdplayer", "useInternalBDPlayer", useInternalBDPlayer.Checked);
xmlwriter.SetValue("bdplayer", "audiolanguage", defaultAudioLanguageComboBox.Text);
xmlwriter.SetValue("bdplayer", "subtitlelanguage", defaultSubtitleLanguageComboBox.Text);
xmlwriter.SetValue("bdplayer", "audiotype", preferredAudioTypeComboBox.Text);
@@ -136,6 +140,7 @@ private void InitializeComponent()
this.RegionCodeComboBox = new System.Windows.Forms.ComboBox();
this.pictureBoxRegions = new System.Windows.Forms.PictureBox();
this.labelPlayAll = new MediaPortal.UserInterface.Controls.MPLabel();
+ this.useInternalBDPlayer = new MediaPortal.UserInterface.Controls.MPCheckBox();
this.mpTabPage1 = new MediaPortal.UserInterface.Controls.MPTabPage();
this.mpGroupBox4 = new MediaPortal.UserInterface.Controls.MPGroupBox();
this.preferredAudioTypeComboBox = new MediaPortal.UserInterface.Controls.MPComboBox();
@@ -154,6 +159,10 @@ private void InitializeComponent()
this.mpGroupBox4.SuspendLayout();
this.SuspendLayout();
//
+ // fontDialog
+ //
+ this.fontDialog.Color = System.Drawing.SystemColors.ControlText;
+ //
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@@ -170,6 +179,7 @@ private void InitializeComponent()
// tabPage1
//
this.tabPage1.Controls.Add(this.groupBox1);
+ this.tabPage1.Controls.Add(this.useInternalBDPlayer);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(464, 382);
@@ -247,7 +257,7 @@ private void InitializeComponent()
// pictureBoxRegions
//
this.pictureBoxRegions.Image = global::MediaPortal.Configuration.Properties.Resources.blu_ray_regions;
- this.pictureBoxRegions.Location = new System.Drawing.Point(28, 19);
+ this.pictureBoxRegions.Location = new System.Drawing.Point(28, 26);
this.pictureBoxRegions.Name = "pictureBoxRegions";
this.pictureBoxRegions.Size = new System.Drawing.Size(376, 185);
this.pictureBoxRegions.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
@@ -261,6 +271,17 @@ private void InitializeComponent()
this.labelPlayAll.Size = new System.Drawing.Size(100, 23);
this.labelPlayAll.TabIndex = 0;
//
+ // useInternalBDPlayer
+ //
+ this.useInternalBDPlayer.AutoSize = true;
+ this.useInternalBDPlayer.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.useInternalBDPlayer.Location = new System.Drawing.Point(19, 332);
+ this.useInternalBDPlayer.Name = "useInternalBDPlayer";
+ this.useInternalBDPlayer.Size = new System.Drawing.Size(180, 17);
+ this.useInternalBDPlayer.TabIndex = 6;
+ this.useInternalBDPlayer.Text = "Use internal Blu-Ray menu player";
+ this.useInternalBDPlayer.UseVisualStyleBackColor = true;
+ //
// mpTabPage1
//
this.mpTabPage1.Controls.Add(this.mpGroupBox4);
@@ -367,6 +388,7 @@ private void InitializeComponent()
this.Size = new System.Drawing.Size(472, 408);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
+ this.tabPage1.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.ParentalControlUpDown)).EndInit();
@@ -241,7 +241,8 @@ private IPlayer Create(string aFileName, g_Player.MediaType? aMediaType)
{
string strAudioPlayer = xmlreader.GetValueAsString("audioplayer", "player", "Internal dshow player");
int streamPlayer = xmlreader.GetValueAsInt("audioscrobbler", "streamplayertype", 0);
- bool Vmr9Enabled = xmlreader.GetValueAsBool("musicvideo", "useVMR9", true);
+ bool Vmr9Enabled = xmlreader.GetValueAsBool("musicvideo", "useVMR9", true);
+ bool InternalBDPlayer = xmlreader.GetValueAsBool("bdplayer", "useInternalBDPlayer", true);
// Free BASS to avoid problems with Digital Audio, when watching movies
if (BassMusicPlayer.IsDefaultMusicPlayer)
@@ -278,8 +279,15 @@ private IPlayer Create(string aFileName, g_Player.MediaType? aMediaType)
string extension = Path.GetExtension(aFileName).ToLower();
if (extension == ".bdmv")
- {
- return new BDPlayer();
+ {
+ if (InternalBDPlayer)
+ {
+ return new BDPlayer();
+ }
+ else
+ {
+ return new VideoPlayerVMR9();
+ }
}
if (extension != ".tv" && extension != ".sbe" && extension != ".dvr-ms" &&
@@ -1294,7 +1294,7 @@ public static bool Play(string strFile, MediaType type, TextReader chapters, boo
}
// Refreshrate change done here. Blu-ray player will handle the refresh rate changes by itself
- if (strFile.ToUpper().IndexOf(@"\BDMV\INDEX.BDMV") == -1)
+ if (strFile.IndexOf(@"\BDMV\INDEX.BDMV") == -1)
{
RefreshRateChanger.AdaptRefreshRate(strFile, (RefreshRateChanger.MediaType)(int)type);
}
@@ -995,6 +995,7 @@
<String id="1196">Enable Subtitles</String>
<String id="1197">Turn off DXVA</String>
<String id="1198">DVD Navigator</String>
+ <String id="1199">Enable Internal Blu-ray Player</String>
<String id="1200">Set-up Wizard</String>
<String id="1201">Play video from beginning</String>
<String id="1202">Auto</String>
@@ -84,6 +84,14 @@
<id>6</id>
<label>1196</label>
<width>262</width>
+ <ondown>8</ondown>
+ </control>
+ <control>
+ <description>Internal Blu_ray On/Off</description>
+ <type>checkbutton</type>
+ <id>8</id>
+ <label>1199</label>
+ <width>262</width>
<ondown>7</ondown>
</control>
</control>
@@ -92,17 +100,17 @@
<type>label</type>
<id>102</id>
<posX>82</posX>
- <posY>380</posY>
+ <posY>425</posY>
<label>300220</label>
</control>
<control>
<description>Age limit value</description>
<type>spincontrol</type>
<id>7</id>
<posX>210</posX>
- <posY>425</posY>
+ <posY>470</posY>
<onleft>7</onleft>
- <onup>6</onup>
+ <onup>8</onup>
<ondown>2</ondown>
<align>right</align>
<buddycontrolid>102</buddycontrolid>
@@ -6,8 +6,7 @@
<rememberLastFocusedControl>yes</rememberLastFocusedControl>
<controls>
<import>common.settings.xml</import>
-
- <import>common.time.xml</import>
+ <import>common.time.xml</import>
<control>
<description>background</description>
<type>image</type>
@@ -30,7 +29,7 @@
<texture>backslide2.png</texture>
<colordiffuse>aaffffff</colordiffuse>
</control>
- <control>
+ <control>
<description>Bluray regions</description>
<type>image</type>
<id>1</id>
@@ -39,7 +38,7 @@
<height>325</height>
<width>650</width>
<texture mask="picturethumbmask.png">Blu-Ray_regions.png</texture>
- <visible>yes</visible>
+ <visible>yes</visible>
</control>
<control>
<description>buttons</description>
@@ -57,7 +56,7 @@
<width>350</width>
<onup>7</onup>
</control>
- <control>
+ <control>
<description>AudioType</description>
<type>button</type>
<id>3</id>
@@ -78,37 +77,42 @@
<label>2135</label>
<width>350</width>
</control>
- <control>
+ <control>
<description>Subtitles On/Off</description>
<type>checkbutton</type>
<id>6</id>
<label>1196</label>
<width>350</width>
- <ondown>7</ondown>
- </control>
+ <ondown>8</ondown>
+ </control>
+ <control>
+ <description>Internal Blu_ray On/Off</description>
+ <type>checkbutton</type>
+ <id>8</id>
+ <label>1199</label>
+ <width>350</width>
+ <ondown>7</ondown>
+ </control>
+ </control>
+ <control>
+ <description>Parental age limit</description>
+ <type>label</type>
+ <id>102</id>
+ <posX>110</posX>
+ <posY>425</posY>
+ <label>300220</label>
+ </control>
+ <control>
+ <description>Age limit value</description>
+ <type>spincontrol</type>
+ <id>7</id>
+ <posX>280</posX>
+ <posY>470</posY>
+ <onleft>7</onleft>
+ <onup>8</onup>
+ <ondown>2</ondown>
+ <align>right</align>
+ <buddycontrolid>102</buddycontrolid>
</control>
-
- <control>
- <description>Parental age limit</description>
- <type>label</type>
- <id>102</id>
- <posX>110</posX>
- <posY>380</posY>
- <label>300220</label>
- </control>
- <control>
- <description>Age limit value</description>
- <type>spincontrol</type>
- <id>7</id>
- <posX>280</posX>
- <posY>425</posY>
- <onleft>7</onleft>
- <onup>6</onup>
- <ondown>2</ondown>
- <align>right</align>
- <buddycontrolid>102</buddycontrolid>
- </control>
-
-
</controls>
</window>
@@ -27,8 +27,8 @@
<description>Bluray regions</description>
<type>image</type>
<id>1</id>
- <posX>986</posX>
- <posY>685</posY>
+ <posX>1036</posX>
+ <posY>715</posY>
<height>325</height>
<width>650</width>
<texture>BluRay_regions.png</texture>
@@ -84,17 +84,25 @@
<type>checkbutton</type>
<id>6</id>
<label>1196</label>
- <ondown>7</ondown>
+ <ondown>8</ondown>
<onleft>#defaultcontrol.onleft</onleft>
</control>
+ <control Style="SettingsCheckButtonLarge">
+ <description>Internal Blu_ray On/Off</description>
+ <type>checkbutton</type>
+ <id>8</id>
+ <label>1199</label>
+ <ondown>7</ondown>
+ <onleft>#defaultcontrol.onleft</onleft>
+ </control>
</control>
<control>
<description>Dynamic content label</description>
<type>label</type>
<id>1</id>
<posX>686</posX>
- <posY>646</posY>
+ <posY>706</posY>
<label>300220</label>
<textcolor>00b7ff</textcolor>
<font>fontB14</font>
@@ -107,9 +115,9 @@
<type>spincontrol</type>
<id>7</id>
<posX>820</posX>
- <posY>706</posY>
+ <posY>766</posY>
<onleft>7</onleft>
- <onup>6</onup>
+ <onup>8</onup>
<ondown>2</ondown>
<align>right</align>
<textcolor>ffffff</textcolor>
@@ -40,14 +40,16 @@ public class GUISettingsBluRay : GUIInternalWindow
[SkinControl(3)] protected GUIButtonControl btnAudioType = null;
[SkinControl(4)] protected GUIButtonControl btnVideo = null;
[SkinControl(5)] protected GUIButtonControl btnAudio = null;
- [SkinControl(6)] protected GUICheckButton btnEnableSubtitles = null;
+ [SkinControl(6)] protected GUICheckButton btnEnableSubtitles = null;
+ [SkinControl(8)] protected GUICheckButton btnUseInternalBDPlayer = null;
private enum Controls
{
CONTROL_PARENTALAGELIMIT = 7
} ;
- private bool _subtitleSettings;
+ private bool _subtitleSettings;
+ private bool _useInternalBDPlayer;
private int _selectedOption;
private string _strVideoCodec;
@@ -112,8 +114,10 @@ private void LoadSettings()
_subtitleSettings = xmlreader.GetValueAsBool("bdplayer", "subtitlesenabled", true);
_defaultAudioType = xmlreader.GetValueAsString("bdplayer", "audiotype", "AC3");
_defaultRegion = xmlreader.GetValueAsString("bdplayer", "regioncode", "B");
- i_ageLimit = xmlreader.GetValueAsInt("bdplayer", "parentalcontrol", 99);
- btnEnableSubtitles.Selected = _subtitleSettings;
+ i_ageLimit = xmlreader.GetValueAsInt("bdplayer", "parentalcontrol", 99);
+ _useInternalBDPlayer = xmlreader.GetValueAsBool("bdplayer", "useInternalBDPlayer", true);
+ btnEnableSubtitles.Selected = _subtitleSettings;
+ btnUseInternalBDPlayer.Selected = _useInternalBDPlayer;
}
}
@@ -140,7 +144,8 @@ private void SaveSettings()
xmlwriter.SetValueAsBool("bdplayer", "subtitlesenabled", btnEnableSubtitles.Selected);
xmlwriter.SetValue("bdplayer", "audiotype", _defaultAudioType);
xmlwriter.SetValue("bdplayer", "regioncode", _defaultRegion);
- xmlwriter.SetValue("bdplayer", "parentalcontrol", i_ageLimit);
+ xmlwriter.SetValue("bdplayer", "parentalcontrol", i_ageLimit);
+ xmlwriter.SetValueAsBool("bdplayer", "useInternalBDPlayer", btnUseInternalBDPlayer.Selected);
}
}
@@ -246,7 +246,7 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="GUIPictures\PictureSort.cs" />
- <Compile Include="GUISettings\BluRay\GUISetingsBluRay.cs" />
+ <Compile Include="GUISettings\BluRay\GUISettingsBluRay.cs" />
<Compile Include="GUISettings\MyVideos\GUISettingsMyVideos_OtherSettings.cs" />
<Compile Include="GUISettings\Weather\GUISettingsWeather.cs" />
<Compile Include="GUIVideoFiles\SelectBDHandler.cs" />

0 comments on commit 03238a9

Please sign in to comment.