Added video/audio play rate (speed)

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@274 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2011-01-21 21:46:49 +00:00
parent 71f919deb2
commit 84dae33fb8
10 changed files with 380 additions and 122 deletions

View File

@ -221,7 +221,6 @@
this.toolStripButtonWaveFormPause = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonWaveFormPlay = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonLockCenter = new System.Windows.Forms.ToolStripButton();
this.AudioWaveForm = new Nikse.SubtitleEdit.Controls.WaveForm();
this.tabControlButtons = new System.Windows.Forms.TabControl();
this.tabPageTranslate = new System.Windows.Forms.TabPage();
this.labelTranslateTip = new System.Windows.Forms.Label();
@ -243,7 +242,6 @@
this.buttonPlayCurrent = new System.Windows.Forms.Button();
this.buttonPlayNext = new System.Windows.Forms.Button();
this.tabPageCreate = new System.Windows.Forms.TabPage();
this.timeUpDownVideoPosition = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.buttonGotoSub = new System.Windows.Forms.Button();
this.buttonBeforeText = new System.Windows.Forms.Button();
this.buttonSetEnd = new System.Windows.Forms.Button();
@ -262,7 +260,6 @@
this.labelVideoPosition = new System.Windows.Forms.Label();
this.buttonSecBack1 = new System.Windows.Forms.Button();
this.tabPageAdjust = new System.Windows.Forms.TabPage();
this.timeUpDownVideoPositionAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.buttonAdjustSetEndTime = new System.Windows.Forms.Button();
this.buttonSetEndAndGoToNext = new System.Windows.Forms.Button();
this.buttonSetStartAndOffsetRest = new System.Windows.Forms.Button();
@ -312,7 +309,6 @@
this.labelTextLineTotal = new System.Windows.Forms.Label();
this.labelCharactersPerSecond = new System.Windows.Forms.Label();
this.buttonUnBreak = new System.Windows.Forms.Button();
this.timeUpDownStartTime = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.buttonUndoListViewChanges = new System.Windows.Forms.Button();
this.labelStartTimeWarning = new System.Windows.Forms.Label();
this.labelDurationWarning = new System.Windows.Forms.Label();
@ -323,13 +319,23 @@
this.textBoxListViewText = new System.Windows.Forms.TextBox();
this.labelDuration = new System.Windows.Forms.Label();
this.labelAutoDuration = new System.Windows.Forms.Label();
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.textBoxSource = new System.Windows.Forms.TextBox();
this.panelVideoPlayer = new System.Windows.Forms.Panel();
this.mediaPlayer = new Nikse.SubtitleEdit.Controls.VideoPlayerContainer();
this.contextMenuStripEmpty = new System.Windows.Forms.ContextMenuStrip(this.components);
this.insertLineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSplitButtonPlayRate = new System.Windows.Forms.ToolStripSplitButton();
this.toolStripMenuItemPlayRateNormal = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemPlayRateFast = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemPlayRateSlow = new System.Windows.Forms.ToolStripMenuItem();
this.imageListPlayRate = new System.Windows.Forms.ImageList(this.components);
this.timeUpDownStartTime = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.mediaPlayer = new Nikse.SubtitleEdit.Controls.VideoPlayerContainer();
this.AudioWaveForm = new Nikse.SubtitleEdit.Controls.WaveForm();
this.timeUpDownVideoPosition = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.timeUpDownVideoPositionAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.toolStripMenuItemPlayRateVeryFast = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
@ -1621,7 +1627,7 @@
this.fixCommonErrorsInSelectedLinesToolStripMenuItem,
this.changeCasingForSelectedLinesToolStripMenuItem});
this.contextMenuStripListview.Name = "contextMenuStripListview";
this.contextMenuStripListview.Size = new System.Drawing.Size(276, 584);
this.contextMenuStripListview.Size = new System.Drawing.Size(276, 562);
this.contextMenuStripListview.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripListviewOpening);
//
// toolStripMenuItemDelete
@ -1875,10 +1881,10 @@
this.trackBarWaveFormPosition.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.trackBarWaveFormPosition.AutoSize = false;
this.trackBarWaveFormPosition.Location = new System.Drawing.Point(638, 264);
this.trackBarWaveFormPosition.Location = new System.Drawing.Point(687, 264);
this.trackBarWaveFormPosition.Maximum = 1000;
this.trackBarWaveFormPosition.Name = "trackBarWaveFormPosition";
this.trackBarWaveFormPosition.Size = new System.Drawing.Size(599, 20);
this.trackBarWaveFormPosition.Size = new System.Drawing.Size(550, 20);
this.trackBarWaveFormPosition.TabIndex = 11;
this.trackBarWaveFormPosition.TickStyle = System.Windows.Forms.TickStyle.None;
this.trackBarWaveFormPosition.ValueChanged += new System.EventHandler(this.trackBarWaveFormPosition_ValueChanged);
@ -1889,7 +1895,7 @@
this.panelWaveFormControls.Controls.Add(this.toolStripWaveControls);
this.panelWaveFormControls.Location = new System.Drawing.Point(477, 262);
this.panelWaveFormControls.Name = "panelWaveFormControls";
this.panelWaveFormControls.Size = new System.Drawing.Size(167, 30);
this.panelWaveFormControls.Size = new System.Drawing.Size(252, 30);
this.panelWaveFormControls.TabIndex = 10;
//
// toolStripWaveControls
@ -1904,10 +1910,11 @@
this.toolStripSeparator16,
this.toolStripButtonWaveFormPause,
this.toolStripButtonWaveFormPlay,
this.toolStripButtonLockCenter});
this.toolStripButtonLockCenter,
this.toolStripSplitButtonPlayRate});
this.toolStripWaveControls.Location = new System.Drawing.Point(0, 3);
this.toolStripWaveControls.Name = "toolStripWaveControls";
this.toolStripWaveControls.Size = new System.Drawing.Size(165, 25);
this.toolStripWaveControls.Size = new System.Drawing.Size(235, 25);
this.toolStripWaveControls.TabIndex = 0;
this.toolStripWaveControls.Text = "toolStrip2";
//
@ -1976,34 +1983,6 @@
this.toolStripButtonLockCenter.Text = "Center";
this.toolStripButtonLockCenter.Click += new System.EventHandler(this.toolStripButtonLockCenter_Click);
//
// AudioWaveForm
//
this.AudioWaveForm.AllowDrop = true;
this.AudioWaveForm.AllowNewSelection = true;
this.AudioWaveForm.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.AudioWaveForm.BackColor = System.Drawing.Color.Black;
this.AudioWaveForm.BackgroundColor = System.Drawing.Color.Black;
this.AudioWaveForm.Color = System.Drawing.Color.GreenYellow;
this.AudioWaveForm.DrawGridLines = true;
this.AudioWaveForm.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(18)))));
this.AudioWaveForm.Location = new System.Drawing.Point(475, 35);
this.AudioWaveForm.Margin = new System.Windows.Forms.Padding(0);
this.AudioWaveForm.Name = "AudioWaveForm";
this.AudioWaveForm.NewSelectionParagraph = null;
this.AudioWaveForm.SelectedColor = System.Drawing.Color.Red;
this.AudioWaveForm.Size = new System.Drawing.Size(762, 223);
this.AudioWaveForm.StartPositionSeconds = 0D;
this.AudioWaveForm.TabIndex = 6;
this.AudioWaveForm.TextColor = System.Drawing.Color.Gray;
this.AudioWaveForm.WaveFormNotLoadedText = "Click to add wave form";
this.AudioWaveForm.WavePeaks = null;
this.AudioWaveForm.ZoomFactor = 1D;
this.AudioWaveForm.Click += new System.EventHandler(this.AudioWaveForm_Click);
this.AudioWaveForm.DragDrop += new System.Windows.Forms.DragEventHandler(this.AudioWaveForm_DragDrop);
this.AudioWaveForm.DragEnter += new System.Windows.Forms.DragEventHandler(this.AudioWaveForm_DragEnter);
//
// tabControlButtons
//
this.tabControlButtons.Controls.Add(this.tabPageTranslate);
@ -2279,16 +2258,6 @@
this.tabPageCreate.Text = "Create";
this.tabPageCreate.UseVisualStyleBackColor = true;
//
// timeUpDownVideoPosition
//
this.timeUpDownVideoPosition.AutoSize = true;
this.timeUpDownVideoPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownVideoPosition.Location = new System.Drawing.Point(86, 192);
this.timeUpDownVideoPosition.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownVideoPosition.Name = "timeUpDownVideoPosition";
this.timeUpDownVideoPosition.Size = new System.Drawing.Size(92, 25);
this.timeUpDownVideoPosition.TabIndex = 12;
//
// buttonGotoSub
//
this.buttonGotoSub.Location = new System.Drawing.Point(6, 58);
@ -2512,16 +2481,6 @@
this.tabPageAdjust.Text = "Adjust";
this.tabPageAdjust.UseVisualStyleBackColor = true;
//
// timeUpDownVideoPositionAdjust
//
this.timeUpDownVideoPositionAdjust.AutoSize = true;
this.timeUpDownVideoPositionAdjust.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownVideoPositionAdjust.Location = new System.Drawing.Point(87, 214);
this.timeUpDownVideoPositionAdjust.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownVideoPositionAdjust.Name = "timeUpDownVideoPositionAdjust";
this.timeUpDownVideoPositionAdjust.Size = new System.Drawing.Size(92, 25);
this.timeUpDownVideoPositionAdjust.TabIndex = 13;
//
// buttonAdjustSetEndTime
//
this.buttonAdjustSetEndTime.Location = new System.Drawing.Point(6, 84);
@ -3040,16 +2999,6 @@
this.buttonUnBreak.UseVisualStyleBackColor = true;
this.buttonUnBreak.Click += new System.EventHandler(this.ButtonUnBreakClick);
//
// timeUpDownStartTime
//
this.timeUpDownStartTime.AutoSize = true;
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownStartTime.Location = new System.Drawing.Point(9, 27);
this.timeUpDownStartTime.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
this.timeUpDownStartTime.Size = new System.Drawing.Size(92, 25);
this.timeUpDownStartTime.TabIndex = 0;
//
// buttonUndoListViewChanges
//
this.buttonUndoListViewChanges.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@ -3170,31 +3119,6 @@
this.labelAutoDuration.TabIndex = 30;
this.labelAutoDuration.Text = "Auto";
//
// SubtitleListview1
//
this.SubtitleListview1.AllowDrop = true;
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.SubtitleListview1.ContextMenuStrip = this.contextMenuStripListview;
this.SubtitleListview1.FirstVisibleIndex = -1;
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.SubtitleListview1.FullRowSelect = true;
this.SubtitleListview1.GridLines = true;
this.SubtitleListview1.HideSelection = false;
this.SubtitleListview1.Location = new System.Drawing.Point(1, 3);
this.SubtitleListview1.Name = "SubtitleListview1";
this.SubtitleListview1.Size = new System.Drawing.Size(932, 148);
this.SubtitleListview1.SmallImageList = this.imageList1;
this.SubtitleListview1.TabIndex = 0;
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
this.SubtitleListview1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListview1_SelectedIndexChanged);
this.SubtitleListview1.DragDrop += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragDrop);
this.SubtitleListview1.DragEnter += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragEnter);
this.SubtitleListview1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SubtitleListview1_KeyDown);
this.SubtitleListview1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseDoubleClick);
//
// tabPage2
//
this.tabPage2.Controls.Add(this.textBoxSource);
@ -3239,6 +3163,98 @@
this.panelVideoPlayer.Size = new System.Drawing.Size(282, 278);
this.panelVideoPlayer.TabIndex = 5;
//
// contextMenuStripEmpty
//
this.contextMenuStripEmpty.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.insertLineToolStripMenuItem});
this.contextMenuStripEmpty.Name = "contextMenuStripEmpty";
this.contextMenuStripEmpty.Size = new System.Drawing.Size(126, 26);
//
// insertLineToolStripMenuItem
//
this.insertLineToolStripMenuItem.Name = "insertLineToolStripMenuItem";
this.insertLineToolStripMenuItem.Size = new System.Drawing.Size(125, 22);
this.insertLineToolStripMenuItem.Text = "Insert line";
this.insertLineToolStripMenuItem.Click += new System.EventHandler(this.insertLineToolStripMenuItem_Click);
//
// toolStripSplitButtonPlayRate
//
this.toolStripSplitButtonPlayRate.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripSplitButtonPlayRate.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItemPlayRateSlow,
this.toolStripMenuItemPlayRateNormal,
this.toolStripMenuItemPlayRateFast,
this.toolStripMenuItemPlayRateVeryFast});
this.toolStripSplitButtonPlayRate.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripSplitButtonPlayRate.Name = "toolStripSplitButtonPlayRate";
this.toolStripSplitButtonPlayRate.Size = new System.Drawing.Size(16, 22);
this.toolStripSplitButtonPlayRate.Text = "Play rate (speed)";
//
// toolStripMenuItemPlayRateNormal
//
this.toolStripMenuItemPlayRateNormal.Checked = true;
this.toolStripMenuItemPlayRateNormal.CheckState = System.Windows.Forms.CheckState.Checked;
this.toolStripMenuItemPlayRateNormal.Name = "toolStripMenuItemPlayRateNormal";
this.toolStripMenuItemPlayRateNormal.Size = new System.Drawing.Size(152, 22);
this.toolStripMenuItemPlayRateNormal.Text = "Normal speed";
this.toolStripMenuItemPlayRateNormal.Click += new System.EventHandler(this.toolStripMenuItemPlayRateNormal_Click);
//
// toolStripMenuItemPlayRateFast
//
this.toolStripMenuItemPlayRateFast.Name = "toolStripMenuItemPlayRateFast";
this.toolStripMenuItemPlayRateFast.Size = new System.Drawing.Size(152, 22);
this.toolStripMenuItemPlayRateFast.Text = "Fast ";
this.toolStripMenuItemPlayRateFast.Click += new System.EventHandler(this.toolStripMenuItemPlayRateFast_Click);
//
// toolStripMenuItemPlayRateSlow
//
this.toolStripMenuItemPlayRateSlow.Name = "toolStripMenuItemPlayRateSlow";
this.toolStripMenuItemPlayRateSlow.Size = new System.Drawing.Size(152, 22);
this.toolStripMenuItemPlayRateSlow.Text = "Slow";
this.toolStripMenuItemPlayRateSlow.Click += new System.EventHandler(this.toolStripMenuItemPlayRateSlow_Click);
//
// imageListPlayRate
//
this.imageListPlayRate.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListPlayRate.ImageStream")));
this.imageListPlayRate.TransparentColor = System.Drawing.Color.Transparent;
this.imageListPlayRate.Images.SetKeyName(0, "FastForward.png");
this.imageListPlayRate.Images.SetKeyName(1, "FastForwardHighLight.png");
//
// timeUpDownStartTime
//
this.timeUpDownStartTime.AutoSize = true;
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownStartTime.Location = new System.Drawing.Point(9, 27);
this.timeUpDownStartTime.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
this.timeUpDownStartTime.Size = new System.Drawing.Size(92, 25);
this.timeUpDownStartTime.TabIndex = 0;
//
// SubtitleListview1
//
this.SubtitleListview1.AllowDrop = true;
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.SubtitleListview1.ContextMenuStrip = this.contextMenuStripListview;
this.SubtitleListview1.FirstVisibleIndex = -1;
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.SubtitleListview1.FullRowSelect = true;
this.SubtitleListview1.GridLines = true;
this.SubtitleListview1.HideSelection = false;
this.SubtitleListview1.Location = new System.Drawing.Point(1, 3);
this.SubtitleListview1.Name = "SubtitleListview1";
this.SubtitleListview1.Size = new System.Drawing.Size(932, 148);
this.SubtitleListview1.SmallImageList = this.imageList1;
this.SubtitleListview1.TabIndex = 0;
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
this.SubtitleListview1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListview1_SelectedIndexChanged);
this.SubtitleListview1.DragDrop += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragDrop);
this.SubtitleListview1.DragEnter += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragEnter);
this.SubtitleListview1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SubtitleListview1_KeyDown);
this.SubtitleListview1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseDoubleClick);
//
// mediaPlayer
//
this.mediaPlayer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -3258,19 +3274,60 @@
this.mediaPlayer.DragDrop += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragDrop);
this.mediaPlayer.DragEnter += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragEnter);
//
// contextMenuStripEmpty
// AudioWaveForm
//
this.contextMenuStripEmpty.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.insertLineToolStripMenuItem});
this.contextMenuStripEmpty.Name = "contextMenuStripEmpty";
this.contextMenuStripEmpty.Size = new System.Drawing.Size(126, 26);
this.AudioWaveForm.AllowDrop = true;
this.AudioWaveForm.AllowNewSelection = true;
this.AudioWaveForm.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.AudioWaveForm.BackColor = System.Drawing.Color.Black;
this.AudioWaveForm.BackgroundColor = System.Drawing.Color.Black;
this.AudioWaveForm.Color = System.Drawing.Color.GreenYellow;
this.AudioWaveForm.DrawGridLines = true;
this.AudioWaveForm.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(18)))));
this.AudioWaveForm.Location = new System.Drawing.Point(475, 35);
this.AudioWaveForm.Margin = new System.Windows.Forms.Padding(0);
this.AudioWaveForm.Name = "AudioWaveForm";
this.AudioWaveForm.NewSelectionParagraph = null;
this.AudioWaveForm.SelectedColor = System.Drawing.Color.Red;
this.AudioWaveForm.Size = new System.Drawing.Size(762, 223);
this.AudioWaveForm.StartPositionSeconds = 0D;
this.AudioWaveForm.TabIndex = 6;
this.AudioWaveForm.TextColor = System.Drawing.Color.Gray;
this.AudioWaveForm.WaveFormNotLoadedText = "Click to add wave form";
this.AudioWaveForm.WavePeaks = null;
this.AudioWaveForm.ZoomFactor = 1D;
this.AudioWaveForm.Click += new System.EventHandler(this.AudioWaveForm_Click);
this.AudioWaveForm.DragDrop += new System.Windows.Forms.DragEventHandler(this.AudioWaveForm_DragDrop);
this.AudioWaveForm.DragEnter += new System.Windows.Forms.DragEventHandler(this.AudioWaveForm_DragEnter);
//
// insertLineToolStripMenuItem
// timeUpDownVideoPosition
//
this.insertLineToolStripMenuItem.Name = "insertLineToolStripMenuItem";
this.insertLineToolStripMenuItem.Size = new System.Drawing.Size(125, 22);
this.insertLineToolStripMenuItem.Text = "Insert line";
this.insertLineToolStripMenuItem.Click += new System.EventHandler(this.insertLineToolStripMenuItem_Click);
this.timeUpDownVideoPosition.AutoSize = true;
this.timeUpDownVideoPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownVideoPosition.Location = new System.Drawing.Point(86, 192);
this.timeUpDownVideoPosition.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownVideoPosition.Name = "timeUpDownVideoPosition";
this.timeUpDownVideoPosition.Size = new System.Drawing.Size(92, 25);
this.timeUpDownVideoPosition.TabIndex = 12;
//
// timeUpDownVideoPositionAdjust
//
this.timeUpDownVideoPositionAdjust.AutoSize = true;
this.timeUpDownVideoPositionAdjust.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownVideoPositionAdjust.Location = new System.Drawing.Point(87, 214);
this.timeUpDownVideoPositionAdjust.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownVideoPositionAdjust.Name = "timeUpDownVideoPositionAdjust";
this.timeUpDownVideoPositionAdjust.Size = new System.Drawing.Size(92, 25);
this.timeUpDownVideoPositionAdjust.TabIndex = 13;
//
// toolStripMenuItemPlayRateVeryFast
//
this.toolStripMenuItemPlayRateVeryFast.Name = "toolStripMenuItemPlayRateVeryFast";
this.toolStripMenuItemPlayRateVeryFast.Size = new System.Drawing.Size(152, 22);
this.toolStripMenuItemPlayRateVeryFast.Text = "Very fast";
this.toolStripMenuItemPlayRateVeryFast.Click += new System.EventHandler(this.veryFastToolStripMenuItem_Click);
//
// Main
//
@ -3647,6 +3704,12 @@
private System.Windows.Forms.ToolStripMenuItem saveOriginalAstoolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem openOriginalToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem removeOriginalToolStripMenuItem;
private System.Windows.Forms.ToolStripSplitButton toolStripSplitButtonPlayRate;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemPlayRateNormal;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemPlayRateSlow;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemPlayRateFast;
private System.Windows.Forms.ImageList imageListPlayRate;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemPlayRateVeryFast;
}
}

View File

@ -105,7 +105,7 @@ namespace Nikse.SubtitleEdit.Forms
if (versionInfo.Length >= 3 && versionInfo[2] != "0")
_title += "." + versionInfo[2];
}
return _title + " Beta 8";
return _title + " Beta 9";
}
}
@ -681,6 +681,11 @@ namespace Nikse.SubtitleEdit.Forms
if (_videoFileName == null)
labelVideoInfo.Text = Configuration.Settings.Language.General.NoVideoLoaded;
toolStripButtonLockCenter.Text = _language.VideoControls.Center;
toolStripSplitButtonPlayRate.Text = _language.VideoControls.PlayRate;
toolStripMenuItemPlayRateSlow.Text = _language.VideoControls.Slow;
toolStripMenuItemPlayRateNormal.Text = _language.VideoControls.Normal;
toolStripMenuItemPlayRateFast.Text = _language.VideoControls.Fast;
toolStripMenuItemPlayRateVeryFast.Text = _language.VideoControls.VeryFast;
groupBoxAutoRepeat.Text = _language.VideoControls.AutoRepeat;
checkBoxAutoRepeatOn.Text = _language.VideoControls.AutoRepeatOn;
@ -3794,6 +3799,34 @@ namespace Nikse.SubtitleEdit.Forms
currentParagraph.EndTime.TotalMilliseconds = middle;
newParagraph.StartTime.TotalMilliseconds = currentParagraph.EndTime.TotalMilliseconds + 1;
if (Configuration.Settings.General.AllowEditOfOriginalSubtitle && _subtitleAlternate != null && _subtitleAlternate.Paragraphs.Count > 0)
{
Paragraph originalCurrent = Utilities.GetOriginalParagraph(firstSelectedIndex, currentParagraph, _subtitleAlternate.Paragraphs);
if (originalCurrent != null)
{
originalCurrent.EndTime.TotalMilliseconds = currentParagraph.EndTime.TotalMilliseconds;
Paragraph originalNew = new Paragraph(newParagraph);
lines = originalCurrent.Text.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
if (lines.Length == 2 && (lines[0].EndsWith(".") || lines[0].EndsWith("!") || lines[0].EndsWith("?")))
{
currentParagraph.Text = Utilities.AutoBreakLine(lines[0]);
newParagraph.Text = Utilities.AutoBreakLine(lines[1]);
}
else
{
string s = Utilities.AutoBreakLine(originalCurrent.Text, 5, Configuration.Settings.General.SubtitleLineMaximumLength * 2);
lines = s.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
}
if (lines.Length == 2)
{
originalCurrent.Text = Utilities.AutoBreakLine(lines[0]);
originalNew.Text = Utilities.AutoBreakLine(lines[1]);
}
_subtitleAlternate.InsertParagraphInCorrectTimeOrder(originalNew);
}
}
if (_networkSession != null)
{
_networkSession.TimerStop();
@ -7316,6 +7349,7 @@ namespace Nikse.SubtitleEdit.Forms
_timerAutoSave.Interval = 1000 * Configuration.Settings.General.AutoBackupSeconds; // take backup every x second if changes were made
_timerAutoSave.Start();
}
toolStripMenuItemPlayRateNormal_Click(null, null);
Main_Resize(null, null);
}
@ -8872,7 +8906,59 @@ namespace Nikse.SubtitleEdit.Forms
GetDictionariesToolStripMenuItem.Visible = true;
addWordToNamesetcListToolStripMenuItem.Visible = true;
}
}
}
private void toolStripMenuItemPlayRateSlow_Click(object sender, EventArgs e)
{
if (mediaPlayer.VideoPlayer != null)
{
toolStripMenuItemPlayRateSlow.Checked = true;
toolStripMenuItemPlayRateNormal.Checked = false;
toolStripMenuItemPlayRateFast.Checked = false;
toolStripMenuItemPlayRateVeryFast.Checked = false;
mediaPlayer.VideoPlayer.PlayRate = 0.8;
toolStripSplitButtonPlayRate.Image = imageListPlayRate.Images[1];
}
}
private void toolStripMenuItemPlayRateNormal_Click(object sender, EventArgs e)
{
if (mediaPlayer.VideoPlayer != null)
{
toolStripMenuItemPlayRateSlow.Checked = false;
toolStripMenuItemPlayRateNormal.Checked = true;
toolStripMenuItemPlayRateFast.Checked = false;
toolStripMenuItemPlayRateVeryFast.Checked = false;
mediaPlayer.VideoPlayer.PlayRate = 1.0;
toolStripSplitButtonPlayRate.Image = imageListPlayRate.Images[0];
}
}
private void toolStripMenuItemPlayRateFast_Click(object sender, EventArgs e)
{
if (mediaPlayer.VideoPlayer != null)
{
toolStripMenuItemPlayRateSlow.Checked = false;
toolStripMenuItemPlayRateNormal.Checked = false;
toolStripMenuItemPlayRateFast.Checked = true;
toolStripMenuItemPlayRateVeryFast.Checked = false;
mediaPlayer.VideoPlayer.PlayRate = 1.2;
toolStripSplitButtonPlayRate.Image = imageListPlayRate.Images[1];
}
}
private void veryFastToolStripMenuItem_Click(object sender, EventArgs e)
{
if (mediaPlayer.VideoPlayer != null)
{
toolStripMenuItemPlayRateSlow.Checked = false;
toolStripMenuItemPlayRateNormal.Checked = false;
toolStripMenuItemPlayRateFast.Checked = false;
toolStripMenuItemPlayRateVeryFast.Checked = true;
mediaPlayer.VideoPlayer.PlayRate = 1.6;
toolStripSplitButtonPlayRate.Image = imageListPlayRate.Images[1];
}
}
}
}

View File

@ -557,10 +557,10 @@
<value>231, 17</value>
</metadata>
<metadata name="contextMenuStripListview.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>311, 56</value>
<value>17, 56</value>
</metadata>
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>502, 56</value>
<value>383, 56</value>
</metadata>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>467, 17</value>
@ -569,16 +569,16 @@
<value>844, 17</value>
</metadata>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>224, 56</value>
<value>1337, 17</value>
</metadata>
<metadata name="colorDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>607, 17</value>
</metadata>
<metadata name="fontDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>612, 56</value>
<value>493, 56</value>
</metadata>
<metadata name="toolStripWaveControls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>449, 58</value>
<value>208, 56</value>
</metadata>
<data name="toolStripButtonWaveFormZoomOut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@ -645,26 +645,75 @@
</value>
</data>
<metadata name="videoTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>728, 56</value>
<value>609, 56</value>
</metadata>
<metadata name="timerAutoDuration.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>840, 56</value>
<value>721, 56</value>
</metadata>
<metadata name="timerAutoContinue.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1177, 56</value>
<value>1058, 56</value>
</metadata>
<metadata name="timerStillTyping.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1333, 56</value>
<value>1214, 56</value>
</metadata>
<metadata name="timerWaveForm.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1470, 56</value>
<value>1351, 56</value>
</metadata>
<metadata name="contextMenuStripWaveForm.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
<value>1130, 17</value>
</metadata>
<metadata name="contextMenuStripEmpty.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>994, 56</value>
<value>875, 56</value>
</metadata>
<metadata name="imageListPlayRate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>980, 17</value>
</metadata>
<data name="imageListPlayRate.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
CAAAAk1TRnQBSQFMAgEBAgEAARABAAEQAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/xEAEHUwABB1MAAQdSQA
AewB9AQAAewB9AQABHUB7AV1AewFdSQAAewBDwHyAwAB7AEPAfIDAAR1AewBDwR1AewBDwR1JAAB7AFJ
AQ8B8gIAAewBSQEPAfICAAR1AewBSQEPA3UB7AFJAQ8DdSAAAewBEQFDARUBFAFyAUkBDwEHAesBFAFy
AUkBDwHyAQAB7AERAUMBFQEUAXIBSQEPAQcB6wEUAXIBSQEPAnUgAAHtAQgBeARyAUkBDwRyAUkBDwHy
Ae0BCAF4BHIBSQEPBHIBSQEPAXUgAAGSAQgDmAJ4AnIBbQGYAngCcgFtAZIBCAOYAngCcgFtAZgCeAJy
AW0gAAEcAcIECAJ4AewBmQIIAngB7AHzARwBwgQIAngB7AGZAggCeAHsAXUgAAGYARwBkgHtAewBCAGY
AewB8AHvAewBCAGYAewB8wEAAZgBHAGSAe0B7AEIAZgB7AHwAe8B7AEIAZgB7AJ1JAAB7QEIAewB8wIA
Ae0BCAHsAfMCAAR1Ae0BCAHsA3UB7QEIAewDdSQAAZIB7AHzAwABkgHsAfMDAAR1AZIB7AR1AZIB7AR1
JAABHAH0BAABHAH0BAAEdQEcBXUBHAV1MAAQdTAAEHUgAAFCAU0BPgcAAT4DAAEoAwABQAMAARADAAEB
AQABAQUAAYAXAAP/AQAC/wYAAv8GAAL/BgAB8wHPBgAB8QHHBgAB8AHDBwABAR8AAQEGAAHwAcMGAAHx
AccGAAHzAc8GAAL/BgAC/wYACw==
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAkAMDAQAAEABABoBgAAlgAAACAgEAABAAQA6AIAAP4GAAAQEBAAAQAEACgBAADmCQAAMDAAAAEA

View File

@ -900,6 +900,11 @@ namespace Nikse.SubtitleEdit.Logic
NewTextInsertAtX = "New text inserted at {0}",
Center = "Center",
PlayRate = "Play rate (speed)",
Slow = "Slow",
Normal = "Normal",
Fast = "Fast",
VeryFast = "Very fast",
},
};

View File

@ -836,6 +836,11 @@
public string NewTextInsertAtX { get; set; }
public string Center { get; set; }
public string PlayRate { get; set; }
public string Slow { get; set; }
public string Normal { get; set; }
public string Fast { get; set; }
public string VeryFast { get; set; }
}
}

View File

@ -119,8 +119,15 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate void libvlc_media_list_player_release(IntPtr mediaPlayer);
libvlc_media_list_player_release _libvlc_media_list_player_release;
libvlc_media_list_player_release _libvlc_media_list_player_release;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate float libvlc_media_player_get_rate(IntPtr mediaPlayer);
libvlc_media_player_get_rate _libvlc_media_player_get_rate;
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate int libvlc_media_player_set_rate(IntPtr mediaPlayer, float rate);
libvlc_media_player_set_rate _libvlc_media_player_set_rate;
private object GetDllType(Type type, string name)
{
@ -159,6 +166,8 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
_libvlc_media_player_get_state = (libvlc_media_player_get_state)GetDllType(typeof(libvlc_media_player_get_state), "libvlc_media_player_get_state");
_libvlc_media_player_get_length = (libvlc_media_player_get_length)GetDllType(typeof(libvlc_media_player_get_length), "libvlc_media_player_get_length");
_libvlc_media_list_player_release = (libvlc_media_list_player_release)GetDllType(typeof(libvlc_media_list_player_release), "libvlc_media_list_player_release");
_libvlc_media_player_get_rate = (libvlc_media_player_get_rate)GetDllType(typeof(libvlc_media_player_get_rate), "libvlc_media_player_get_rate");
_libvlc_media_player_set_rate = (libvlc_media_player_set_rate)GetDllType(typeof(libvlc_media_player_set_rate), "libvlc_media_player_set_rate");
}
private bool IsAllMethodsLoaded()
@ -182,7 +191,9 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
_libvlc_media_player_get_fps != null &&
_libvlc_media_player_get_state != null &&
_libvlc_media_player_get_length != null &&
_libvlc_media_list_player_release != null;
_libvlc_media_list_player_release != null &&
_libvlc_media_player_get_rate != null &&
_libvlc_media_player_set_rate != null;
}
public static bool IsInstalled
@ -245,6 +256,19 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
}
}
public override double PlayRate
{
get
{
return _libvlc_media_player_get_rate(_mediaPlayer);
}
set
{
if (value >= 0 && value <= 2.0)
_libvlc_media_player_set_rate(_mediaPlayer, (float)value);
}
}
public override void Play()
{
_libvlc_media_player_play(_mediaPlayer);

View File

@ -14,6 +14,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
private QuartzTypeLib.IVideoWindow _quartzVideo;
private FilgraphManagerClass _quartzFilgraphManager;
private IMediaPosition _mediaPosition;
private bool _isPaused;
private Control _owner;
private System.Windows.Forms.Timer _videoEndTimer;
@ -70,6 +71,16 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
}
}
public override double PlayRate
{
get { return _mediaPosition.Rate; }
set
{
if (value >= 0 && value <= 2.0)
_mediaPosition.Rate = value;
}
}
public override void Play()
{
_quartzFilgraphManager.Run();
@ -122,7 +133,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
_quartzFilgraphManager.Run();
_quartzFilgraphManager.GetVideoSize(out _sourceWidth, out _sourceHeight);
_owner.Resize += OwnerControlResize;
_mediaPosition = (IMediaPosition)_quartzFilgraphManager;
if (OnVideoLoaded != null)
{
_videoLoader = new BackgroundWorker();

View File

@ -10,6 +10,12 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
public abstract int Volume { get; set; }
public abstract double Duration { get; }
public abstract double CurrentPosition { get; set; }
/// <summary>
/// 1.0 is normal playback speed, 0.5 is half speed, and 2.0 is twice speed.
/// </summary>
public virtual double PlayRate { get; set; }
public abstract void Play();
public abstract void Pause();
public abstract void Stop();

View File

@ -562,10 +562,18 @@
<BeforeChangingTimeInWaveFormX>Før ændring af tid i lyd kurve: {0}</BeforeChangingTimeInWaveFormX>
<NewTextInsertAtX>Ny tekst indsat ved {0}</NewTextInsertAtX>
<Center>Center</Center>
<PlayRate>Afspilnings hastighed</PlayRate>
<Slow>Langsom</Slow>
<Normal>Normal</Normal>
<Fast>Hurtig</Fast>
<VeryFast>Meget hurtig</VeryFast>
</VideoControls>
<SaveChangesToUntitled>Gem ændringer til unavngivet?</SaveChangesToUntitled>
<SaveChangesToX>Gem ændringer til {0}?</SaveChangesToX>
<SaveChangesToUntitledOriginal>Gem ændringer til unavngivet original?</SaveChangesToUntitledOriginal>
<SaveChangesToOriginalX>Gem ændringer til den originale undertekst {0}?</SaveChangesToOriginalX>
<SaveSubtitleAs>Gem undertekst som...</SaveSubtitleAs>
<SaveOriginalSubtitleAs>Gem original undertitel som...</SaveOriginalSubtitleAs>
<NoSubtitleLoaded>Ingen undertekst indlæst</NoSubtitleLoaded>
<VisualSyncSelectedLines>Visuel synkroniser - valgte linjer</VisualSyncSelectedLines>
<VisualSyncTitle>Visual synkroniser</VisualSyncTitle>
@ -581,6 +589,7 @@
<FileIsEmptyOrShort>Filen er tom eller meget kort!</FileIsEmptyOrShort>
<FileNotFound>Fil ikke findet: {0}</FileNotFound>
<SavedSubtitleX>Gemte undertekst {0}</SavedSubtitleX>
<SavedOriginalSubtitleX>Gemte originale undertekst {0}</SavedOriginalSubtitleX>
<FileOnDiskModified>Fil på disken ændret</FileOnDiskModified>
<OverwriteModifiedFile>Overskriv filen {0} ændret {1} {2} {3} med aktuelle fil indlæst fra disken på {4} {5}?</OverwriteModifiedFile>
<UnableToSaveSubtitleX>Kan ikke gemme undertekst fil {0}</UnableToSaveSubtitleX>

Binary file not shown.