Permalink
Browse files

MP1-4928V3 :

1- Reduce the minimal value to 1 and step at 1 ms
2- Removed UpDown box for a default start value, now the value will be kept on stop (if 'Don't set a delay to 0 on playback start' is checked)
  • Loading branch information...
Sebastiii committed Dec 29, 2018
1 parent 1fe04f3 commit 259555c36448200af5ab3ff42c04ed500f03d606
Showing with 2 additions and 56 deletions.
  1. +2 −48 mediaportal/Configuration/Sections/Movies.cs
  2. +0 −8 mediaportal/Core/Player/VMR9.cs
@@ -105,9 +105,6 @@ public class Movies : SectionSettings
private MPCheckBox chbKeepFoldersTogether;
private static bool SubtitleComboMessageDone = false;
private MPCheckBox NoAudioResetCheckBox;
private NumericUpDown IntialDelayUpDown;
private MPLabel mpLabelInitialDelay;
private MPLabel mpLabel11;
internal bool MadVrInUse = false;

//private int
@@ -199,7 +196,6 @@ public override void LoadSettings()
saveAlwaysRadioButton.Checked = !saveNeverRadioButton.Checked && !saveAskRadioButton.Checked;

NoAudioResetCheckBox.Checked = xmlreader.GetValueAsBool("audiodelay", "noaudioresetzero", false);
IntialDelayUpDown.Value = xmlreader.GetValueAsInt("audiodelay", "initialaudiodelay", 0);

//
// Get font settings
@@ -339,7 +335,6 @@ public override void SaveSettings()
xmlwriter.SetValueAsBool("movieplayer", "audiodefaultlanguage", audioDefaultCheckBox.Checked);
xmlwriter.SetValueAsBool("movieplayer", "streamlavselection", streamLAVSelectionCheckBox.Checked);
xmlwriter.SetValueAsBool("audiodelay", "noaudioresetzero", NoAudioResetCheckBox.Checked);
xmlwriter.SetValue("audiodelay", "initialaudiodelay", IntialDelayUpDown.Value);
}
}

@@ -389,10 +384,7 @@ private void InitializeComponent()
this.fontDialog = new System.Windows.Forms.FontDialog();
this.tabPage1 = new MediaPortal.UserInterface.Controls.MPTabPage();
this.mpGroupBoxVideoAudioDelay = new MediaPortal.UserInterface.Controls.MPGroupBox();
this.mpLabel11 = new MediaPortal.UserInterface.Controls.MPLabel();
this.NoAudioResetCheckBox = new MediaPortal.UserInterface.Controls.MPCheckBox();
this.IntialDelayUpDown = new System.Windows.Forms.NumericUpDown();
this.mpLabelInitialDelay = new MediaPortal.UserInterface.Controls.MPLabel();
this.delayVideoTextBox = new System.Windows.Forms.NumericUpDown();
this.mpLabelAVDelayTime = new MediaPortal.UserInterface.Controls.MPLabel();
this.mpLabelAVDelay = new MediaPortal.UserInterface.Controls.MPLabel();
@@ -435,7 +427,6 @@ private void InitializeComponent()
((System.ComponentModel.ISupportInitialize)(this.shadowDepthUpDown)).BeginInit();
this.tabPage1.SuspendLayout();
this.mpGroupBoxVideoAudioDelay.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.IntialDelayUpDown)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.delayVideoTextBox)).BeginInit();
this.mpGroupBoxComSkip.SuspendLayout();
this.groupBox1.SuspendLayout();
@@ -842,10 +833,7 @@ private void InitializeComponent()
//
this.mpGroupBoxVideoAudioDelay.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.mpGroupBoxVideoAudioDelay.Controls.Add(this.mpLabel11);
this.mpGroupBoxVideoAudioDelay.Controls.Add(this.NoAudioResetCheckBox);
this.mpGroupBoxVideoAudioDelay.Controls.Add(this.IntialDelayUpDown);
this.mpGroupBoxVideoAudioDelay.Controls.Add(this.mpLabelInitialDelay);
this.mpGroupBoxVideoAudioDelay.Controls.Add(this.delayVideoTextBox);
this.mpGroupBoxVideoAudioDelay.Controls.Add(this.mpLabelAVDelayTime);
this.mpGroupBoxVideoAudioDelay.Controls.Add(this.mpLabelAVDelay);
@@ -857,60 +845,27 @@ private void InitializeComponent()
this.mpGroupBoxVideoAudioDelay.TabStop = false;
this.mpGroupBoxVideoAudioDelay.Text = "Video/Audio Delay";
//
// mpLabel11
//
this.mpLabel11.Location = new System.Drawing.Point(195, 43);
this.mpLabel11.Name = "mpLabel11";
this.mpLabel11.Size = new System.Drawing.Size(25, 16);
this.mpLabel11.TabIndex = 19;
this.mpLabel11.Text = "ms";
//
// NoAudioResetCheckBox
//
this.NoAudioResetCheckBox.AutoSize = true;
this.NoAudioResetCheckBox.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.NoAudioResetCheckBox.Location = new System.Drawing.Point(220, 20);
this.NoAudioResetCheckBox.Location = new System.Drawing.Point(20, 44);
this.NoAudioResetCheckBox.Name = "NoAudioResetCheckBox";
this.NoAudioResetCheckBox.Size = new System.Drawing.Size(208, 17);
this.NoAudioResetCheckBox.TabIndex = 9;
this.NoAudioResetCheckBox.Text = "Don\'t set a delay to 0 on playback start";
this.NoAudioResetCheckBox.UseVisualStyleBackColor = true;
//
// IntialDelayUpDown
//
this.IntialDelayUpDown.Location = new System.Drawing.Point(116, 41);
this.IntialDelayUpDown.Maximum = new decimal(new int[] {
50000,
0,
0,
0});
this.IntialDelayUpDown.Name = "IntialDelayUpDown";
this.IntialDelayUpDown.Size = new System.Drawing.Size(80, 20);
this.IntialDelayUpDown.TabIndex = 18;
//
// mpLabelInitialDelay
//
this.mpLabelInitialDelay.Location = new System.Drawing.Point(16, 43);
this.mpLabelInitialDelay.Name = "mpLabelInitialDelay";
this.mpLabelInitialDelay.Size = new System.Drawing.Size(107, 16);
this.mpLabelInitialDelay.TabIndex = 17;
this.mpLabelInitialDelay.Text = "Intial delay :";
//
// delayVideoTextBox
//
this.delayVideoTextBox.Increment = new decimal(new int[] {
5,
0,
0,
0});
this.delayVideoTextBox.Location = new System.Drawing.Point(116, 18);
this.delayVideoTextBox.Maximum = new decimal(new int[] {
500,
0,
0,
0});
this.delayVideoTextBox.Minimum = new decimal(new int[] {
5,
1,
0,
0,
0});
@@ -1238,7 +1193,6 @@ private void InitializeComponent()
this.tabPage1.ResumeLayout(false);
this.mpGroupBoxVideoAudioDelay.ResumeLayout(false);
this.mpGroupBoxVideoAudioDelay.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.IntialDelayUpDown)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.delayVideoTextBox)).EndInit();
this.mpGroupBoxComSkip.ResumeLayout(false);
this.mpGroupBoxComSkip.PerformLayout();
@@ -254,7 +254,6 @@ private enum Vmr9PlayState
protected bool UseMadVideoRenderer3D;
protected bool UseEnhancedVideoRenderer;
protected bool NoAudioResetCheckBox;
protected int IntialDelayUpDown;
protected internal DateTime playbackTimer;
protected internal DateTime PlaneSceneMadvrTimer = new DateTime(0);
protected IVideoWindow videoWinMadVr;
@@ -892,7 +891,6 @@ public bool AddVMR9(IGraphBuilder graphBuilder)
UseMadVideoRenderer3D = xmlreader.GetValueAsBool("general", "useMadVideoRenderer3D", false);
UseEnhancedVideoRenderer = xmlreader.GetValueAsBool("general", "useEVRenderer", false);
NoAudioResetCheckBox = xmlreader.GetValueAsBool("audiodelay", "noaudioresetzero", false);
IntialDelayUpDown = xmlreader.GetValueAsInt("audiodelay", "initialaudiodelay", 0);
}
Log.Debug("VMR9: addvmr9 - thread : {0}", Thread.CurrentThread.Name);
if (!_useVmr9)
@@ -1797,12 +1795,6 @@ public int StartMediaCtrl(IMediaControl mediaCtrl)
asett?.SetAudioDelay(true, 0);
DirectShowUtil.ReleaseComObject(baseFilterLavAudio);
}
else if (NoAudioResetCheckBox)
{
ILAVAudioSettings asett = baseFilterLavAudio as ILAVAudioSettings;
asett?.SetAudioDelay(true, IntialDelayUpDown);
DirectShowUtil.ReleaseComObject(baseFilterLavAudio);
}
}
}
}

0 comments on commit 259555c

Please sign in to comment.