From c2cbfd745ab835e7006e55a55736e420cd685fdb Mon Sep 17 00:00:00 2001 From: stax76 Date: Sat, 3 Jun 2017 21:12:21 +0200 Subject: [PATCH] - --- Encoding/AV1Encoder.vb | 13 +- Encoding/IntelEncoder.vb | 4 +- Encoding/NVIDIAEncoder.vb | 4 +- Encoding/x265.vb | 4 +- Forms/DemuxForm.resx | 6 +- Forms/DemuxForm.vb | 433 ++++++++++++++---------------- Forms/MainForm.vb | 26 +- Forms/MuxerForm.vb | 137 ++++++---- Forms/StreamDemuxForm.Designer.vb | 140 ++++++---- Forms/StreamDemuxForm.vb | 9 +- General/Demux.vb | 8 +- General/GlobalCommands.vb | 16 +- General/Package.vb | 2 +- My Project/AssemblyInfo.vb | 2 +- UI/Controls/SimpleUI.vb | 7 +- UI/Misc.vb | 33 +++ md/test-build.md | 6 + 17 files changed, 467 insertions(+), 383 deletions(-) diff --git a/Encoding/AV1Encoder.vb b/Encoding/AV1Encoder.vb index 7bc726ec..6b80e032 100644 --- a/Encoding/AV1Encoder.vb +++ b/Encoding/AV1Encoder.vb @@ -82,7 +82,9 @@ Public Class AV1Encoder Dim store = DirectCast(ObjectHelp.GetCopy(ParamsStore), PrimitiveStore) newParams.Init(store) - Using f As New CommandLineForm(newParams) + Using form As New CommandLineForm(newParams) + form.Text = "Under construction, AV1 isn't finished yet" + Dim saveProfileAction = Sub() Dim enc = ObjectHelp.GetCopy(Of AV1Encoder)(Me) Dim params2 As New AV1Params @@ -93,9 +95,9 @@ Public Class AV1Encoder SaveProfile(enc) End Sub - ActionMenuItem.Add(f.cms.Items, "Save Profile...", saveProfileAction).SetImage(Symbol.Save) + ActionMenuItem.Add(form.cms.Items, "Save Profile...", saveProfileAction).SetImage(Symbol.Save) - If f.ShowDialog() = DialogResult.OK Then + If form.ShowDialog() = DialogResult.OK Then Params = newParams ParamsStore = store OnStateChange() @@ -268,7 +270,7 @@ Public Class AV1Params If p.Script.Engine = ScriptEngine.VapourSynth Then sb.Append(Package.vspipe.Path.Quotes + " " + script.Path.Quotes + " - --y4m | " + Package.aomenc.Path.Quotes + " -") Else - sb.Append(Package.ffmpeg.Path.Quotes + " -i " + script.Path.Quotes + " -f yuv4mpegpipe - | " + Package.aomenc.Path.Quotes + " -") + sb.Append(Package.ffmpeg.Path.Quotes + " -i " + script.Path.Quotes + " -f yuv4mpegpipe -loglevel error -hide_banner - | " + Package.aomenc.Path.Quotes + " -") End If End If @@ -276,6 +278,7 @@ Public Class AV1Params Case AV1RateMode.TwoPass sb.Append(" --passes=2 --pass=" & pass) Case AV1RateMode.OnePass + sb.Append(" --passes=1") End Select sb.Append(" --target-bitrate=" & p.VideoBitrate) @@ -283,7 +286,7 @@ Public Class AV1Params If q.Count > 0 Then sb.Append(" " + q.Select(Function(item) item.GetArgs).Join(" ")) If includePaths Then - sb.Append(" --fpf=" + (p.TempDir + p.Name + ".txt").Quotes) + If Mode.Value = AV1RateMode.TwoPass Then sb.Append(" --fpf=" + (p.TempDir + p.Name + ".txt").Quotes) sb.Append(" -o " + targetPath.Quotes) End If diff --git a/Encoding/IntelEncoder.vb b/Encoding/IntelEncoder.vb index e694e257..8dc5fae9 100644 --- a/Encoding/IntelEncoder.vb +++ b/Encoding/IntelEncoder.vb @@ -283,10 +283,10 @@ Public Class IntelEncoder sourcePath = p.LastOriginalSourceFile Case "ffdxva" sourcePath = "-" - If includePaths Then ret = If(includePaths, Package.ffmpeg.Path.Quotes, "ffmpeg") + " -threads 1 -hwaccel dxva2 -i " + If(includePaths, p.LastOriginalSourceFile.Quotes, "path") + " -f yuv4mpegpipe -pix_fmt yuv420p -loglevel error - | " + If(includePaths, Package.QSVEncC.Path.Quotes, "QSVEncC") + If includePaths Then ret = If(includePaths, Package.ffmpeg.Path.Quotes, "ffmpeg") + " -threads 1 -hwaccel dxva2 -i " + If(includePaths, p.LastOriginalSourceFile.Quotes, "path") + " -f yuv4mpegpipe -pix_fmt yuv420p -loglevel error -hide_banner - | " + If(includePaths, Package.QSVEncC.Path.Quotes, "QSVEncC") Case "ffqsv" sourcePath = "-" - If includePaths Then ret = If(includePaths, Package.ffmpeg.Path.Quotes, "ffmpeg") + " -threads 1 -hwaccel qsv -i " + If(includePaths, p.LastOriginalSourceFile.Quotes, "path") + " -f yuv4mpegpipe -pix_fmt yuv420p -loglevel error - | " + If(includePaths, Package.QSVEncC.Path.Quotes, "QSVEncC") + If includePaths Then ret = If(includePaths, Package.ffmpeg.Path.Quotes, "ffmpeg") + " -threads 1 -hwaccel qsv -i " + If(includePaths, p.LastOriginalSourceFile.Quotes, "path") + " -f yuv4mpegpipe -pix_fmt yuv420p -loglevel error -hide_banner - | " + If(includePaths, Package.QSVEncC.Path.Quotes, "QSVEncC") End Select Dim q = From i In Items Where i.GetArgs <> "" diff --git a/Encoding/NVIDIAEncoder.vb b/Encoding/NVIDIAEncoder.vb index 24c2987b..7171f5dc 100644 --- a/Encoding/NVIDIAEncoder.vb +++ b/Encoding/NVIDIAEncoder.vb @@ -394,10 +394,10 @@ Public Class NVIDIAEncoder If includePaths Then ret = If(includePaths, Package.QSVEncC.Path.Quotes, "QSVEncC") + " -o - -c raw" + " -i " + If(includePaths, p.SourceFile.Quotes, "path") + " | " + If(includePaths, Package.NVEncC.Path.Quotes, "NVEncC") Case "ffdxva" sourcePath = "-" - If includePaths Then ret = If(includePaths, Package.ffmpeg.Path.Quotes, "ffmpeg") + " -threads 1 -hwaccel dxva2 -i " + If(includePaths, p.SourceFile.Quotes, "path") + " -f yuv4mpegpipe -pix_fmt yuv420p -loglevel error - | " + If(includePaths, Package.NVEncC.Path.Quotes, "NVEncC") + If includePaths Then ret = If(includePaths, Package.ffmpeg.Path.Quotes, "ffmpeg") + " -threads 1 -hwaccel dxva2 -i " + If(includePaths, p.SourceFile.Quotes, "path") + " -f yuv4mpegpipe -pix_fmt yuv420p -loglevel error -hide_banner - | " + If(includePaths, Package.NVEncC.Path.Quotes, "NVEncC") Case "ffqsv" sourcePath = "-" - If includePaths Then ret = If(includePaths, Package.ffmpeg.Path.Quotes, "ffmpeg") + " -threads 1 -hwaccel qsv -i " + If(includePaths, p.SourceFile.Quotes, "path") + " -f yuv4mpegpipe -pix_fmt yuv420p -loglevel error - | " + If(includePaths, Package.NVEncC.Path.Quotes, "NVEncC") + If includePaths Then ret = If(includePaths, Package.ffmpeg.Path.Quotes, "ffmpeg") + " -threads 1 -hwaccel qsv -i " + If(includePaths, p.SourceFile.Quotes, "path") + " -f yuv4mpegpipe -pix_fmt yuv420p -loglevel error -hide_banner - | " + If(includePaths, Package.NVEncC.Path.Quotes, "NVEncC") End Select Dim q = From i In Items Where i.GetArgs <> "" diff --git a/Encoding/x265.vb b/Encoding/x265.vb index cbf43ea6..35d75100 100644 --- a/Encoding/x265.vb +++ b/Encoding/x265.vb @@ -973,10 +973,10 @@ Public Class x265Params sb.Append(Package.QSVEncC.Path.Quotes + " -o - -c raw" + crop + " -i " + p.SourceFile.Quotes + " | " + Package.x265.Path.Quotes) Case "ffqsv" Dim crop = If(isCropped, $" -vf ""crop={p.SourceWidth - p.CropLeft - p.CropRight}:{p.SourceHeight - p.CropTop - p.CropBottom}:{p.CropLeft}:{p.CropTop}""", "") - sb.Append(Package.ffmpeg.Path.Quotes + " -threads 1 -hwaccel qsv -i " + p.SourceFile.Quotes + " -f yuv4mpegpipe" + crop + " -loglevel error - | " + Package.x265.Path.Quotes) + sb.Append(Package.ffmpeg.Path.Quotes + " -threads 1 -hwaccel qsv -i " + p.SourceFile.Quotes + " -f yuv4mpegpipe" + crop + " -loglevel error -hide_banner - | " + Package.x265.Path.Quotes) Case "ffdxva" Dim crop = If(isCropped, $" -vf ""crop={p.SourceWidth - p.CropLeft - p.CropRight}:{p.SourceHeight - p.CropTop - p.CropBottom}:{p.CropLeft}:{p.CropTop}""", "") - sb.Append(Package.ffmpeg.Path.Quotes + " -threads 1 -hwaccel dxva2 -i " + p.SourceFile.Quotes + " -f yuv4mpegpipe" + crop + " -loglevel error - | " + Package.x265.Path.Quotes) + sb.Append(Package.ffmpeg.Path.Quotes + " -threads 1 -hwaccel dxva2 -i " + p.SourceFile.Quotes + " -f yuv4mpegpipe" + crop + " -loglevel error -hide_banner - | " + Package.x265.Path.Quotes) End Select End If diff --git a/Forms/DemuxForm.resx b/Forms/DemuxForm.resx index db305de4..73ab4efd 100644 --- a/Forms/DemuxForm.resx +++ b/Forms/DemuxForm.resx @@ -117,10 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 201, 17 - 17, 17 + + 201, 17 + \ No newline at end of file diff --git a/Forms/DemuxForm.vb b/Forms/DemuxForm.vb index fed059b5..ca2e6db5 100644 --- a/Forms/DemuxForm.vb +++ b/Forms/DemuxForm.vb @@ -24,7 +24,7 @@ Class DemuxForm Friend WithEvents tbSourceFilters As System.Windows.Forms.TextBox Friend WithEvents bnCancel As StaxRip.UI.ButtonEx Friend WithEvents bnOK As StaxRip.UI.ButtonEx - Friend WithEvents tlp As System.Windows.Forms.TableLayoutPanel + Friend WithEvents tlpMain As System.Windows.Forms.TableLayoutPanel Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label @@ -34,8 +34,6 @@ Class DemuxForm Friend WithEvents Label9 As System.Windows.Forms.Label Friend WithEvents Label10 As System.Windows.Forms.Label Friend WithEvents tbDescription As System.Windows.Forms.TextBox - Friend WithEvents TableLayoutPanel1 As TableLayoutPanel - Friend WithEvents TableLayoutPanel2 As TableLayoutPanel Friend WithEvents bnBrowse As ButtonEx Friend WithEvents bnArguments As ButtonEx Friend WithEvents cmsArguments As ContextMenuStripEx @@ -55,298 +53,167 @@ Class DemuxForm Me.tbSourceFilters = New System.Windows.Forms.TextBox() Me.bnCancel = New StaxRip.UI.ButtonEx() Me.bnOK = New StaxRip.UI.ButtonEx() - Me.tlp = New System.Windows.Forms.TableLayoutPanel() + Me.tlpMain = New System.Windows.Forms.TableLayoutPanel() + Me.bnArguments = New StaxRip.UI.ButtonEx() + Me.cmsArguments = New StaxRip.UI.ContextMenuStripEx(Me.components) + Me.MacrosToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.HelpToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.bnBrowse = New StaxRip.UI.ButtonEx() Me.Label6 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() - Me.Label7 = New System.Windows.Forms.Label() Me.Label10 = New System.Windows.Forms.Label() Me.tbDescription = New System.Windows.Forms.TextBox() Me.Label3 = New System.Windows.Forms.Label() Me.Label8 = New System.Windows.Forms.Label() Me.Label9 = New System.Windows.Forms.Label() - Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel() - Me.bnBrowse = New StaxRip.UI.ButtonEx() - Me.TableLayoutPanel2 = New System.Windows.Forms.TableLayoutPanel() - Me.bnArguments = New StaxRip.UI.ButtonEx() - Me.cmsArguments = New StaxRip.UI.ContextMenuStripEx(Me.components) - Me.MacrosToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.HelpToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.Label1 = New System.Windows.Forms.Label() + Me.Label7 = New System.Windows.Forms.Label() Me.TipProvider = New StaxRip.UI.TipProvider(Me.components) - Me.tlp.SuspendLayout() - Me.TableLayoutPanel1.SuspendLayout() - Me.TableLayoutPanel2.SuspendLayout() + Me.tlpMain.SuspendLayout() Me.cmsArguments.SuspendLayout() Me.SuspendLayout() ' 'tbName ' Me.tbName.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.tbName.Location = New System.Drawing.Point(304, 5) - Me.tbName.Margin = New System.Windows.Forms.Padding(5) + Me.tlpMain.SetColumnSpan(Me.tbName, 3) + Me.tbName.Location = New System.Drawing.Point(295, 12) + Me.tbName.Margin = New System.Windows.Forms.Padding(0) Me.tbName.Name = "tbName" - Me.tbName.Size = New System.Drawing.Size(1407, 55) + Me.tbName.Size = New System.Drawing.Size(1439, 55) Me.tbName.TabIndex = 1 ' 'tbInput ' Me.tbInput.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.tbInput.Location = New System.Drawing.Point(304, 70) - Me.tbInput.Margin = New System.Windows.Forms.Padding(5) + Me.tlpMain.SetColumnSpan(Me.tbInput, 3) + Me.tbInput.Location = New System.Drawing.Point(295, 92) + Me.tbInput.Margin = New System.Windows.Forms.Padding(0) Me.tbInput.Name = "tbInput" - Me.tbInput.Size = New System.Drawing.Size(1407, 55) + Me.tbInput.Size = New System.Drawing.Size(1439, 55) Me.tbInput.TabIndex = 13 ' 'tbInputFormats ' Me.tbInputFormats.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.tbInputFormats.Location = New System.Drawing.Point(304, 200) - Me.tbInputFormats.Margin = New System.Windows.Forms.Padding(5) + Me.tlpMain.SetColumnSpan(Me.tbInputFormats, 3) + Me.tbInputFormats.Location = New System.Drawing.Point(295, 252) + Me.tbInputFormats.Margin = New System.Windows.Forms.Padding(0) Me.tbInputFormats.Name = "tbInputFormats" - Me.tbInputFormats.Size = New System.Drawing.Size(1407, 55) + Me.tbInputFormats.Size = New System.Drawing.Size(1439, 55) Me.tbInputFormats.TabIndex = 15 ' 'tbVideoOut ' Me.tbVideoOut.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.tbVideoOut.Location = New System.Drawing.Point(304, 135) - Me.tbVideoOut.Margin = New System.Windows.Forms.Padding(5) + Me.tlpMain.SetColumnSpan(Me.tbVideoOut, 3) + Me.tbVideoOut.Location = New System.Drawing.Point(295, 172) + Me.tbVideoOut.Margin = New System.Windows.Forms.Padding(0) Me.tbVideoOut.Name = "tbVideoOut" - Me.tbVideoOut.Size = New System.Drawing.Size(1407, 55) + Me.tbVideoOut.Size = New System.Drawing.Size(1439, 55) Me.tbVideoOut.TabIndex = 3 ' 'tbCommand ' Me.tbCommand.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.tbCommand.Location = New System.Drawing.Point(5, 12) - Me.tbCommand.Margin = New System.Windows.Forms.Padding(5) + Me.tlpMain.SetColumnSpan(Me.tbCommand, 2) + Me.tbCommand.Location = New System.Drawing.Point(295, 412) + Me.tbCommand.Margin = New System.Windows.Forms.Padding(0) Me.tbCommand.Name = "tbCommand" - Me.tbCommand.Size = New System.Drawing.Size(1177, 55) + Me.tbCommand.Size = New System.Drawing.Size(1174, 55) Me.tbCommand.TabIndex = 7 ' 'tbArguments ' Me.tbArguments.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.tbArguments.Location = New System.Drawing.Point(5, 12) - Me.tbArguments.Margin = New System.Windows.Forms.Padding(5) + Me.tlpMain.SetColumnSpan(Me.tbArguments, 2) + Me.tbArguments.Location = New System.Drawing.Point(295, 492) + Me.tbArguments.Margin = New System.Windows.Forms.Padding(0) Me.tbArguments.Name = "tbArguments" - Me.tbArguments.Size = New System.Drawing.Size(1177, 55) + Me.tbArguments.Size = New System.Drawing.Size(1174, 55) Me.tbArguments.TabIndex = 9 ' 'tbSourceFilters ' Me.tbSourceFilters.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.tbSourceFilters.Location = New System.Drawing.Point(304, 265) - Me.tbSourceFilters.Margin = New System.Windows.Forms.Padding(5) + Me.tlpMain.SetColumnSpan(Me.tbSourceFilters, 3) + Me.tbSourceFilters.Location = New System.Drawing.Point(295, 332) + Me.tbSourceFilters.Margin = New System.Windows.Forms.Padding(0) Me.tbSourceFilters.Name = "tbSourceFilters" - Me.tbSourceFilters.Size = New System.Drawing.Size(1407, 55) + Me.tbSourceFilters.Size = New System.Drawing.Size(1439, 55) Me.tbSourceFilters.TabIndex = 19 ' 'bnCancel ' - Me.bnCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.bnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.bnCancel.Location = New System.Drawing.Point(1470, 754) - Me.bnCancel.Margin = New System.Windows.Forms.Padding(5) + Me.bnCancel.Location = New System.Drawing.Point(1484, 847) + Me.bnCancel.Margin = New System.Windows.Forms.Padding(15, 15, 0, 0) Me.bnCancel.Size = New System.Drawing.Size(250, 70) Me.bnCancel.Text = "Cancel" ' 'bnOK ' - Me.bnOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.bnOK.DialogResult = System.Windows.Forms.DialogResult.OK - Me.bnOK.Location = New System.Drawing.Point(1210, 754) - Me.bnOK.Margin = New System.Windows.Forms.Padding(5) + Me.bnOK.Location = New System.Drawing.Point(1219, 847) + Me.bnOK.Margin = New System.Windows.Forms.Padding(0, 15, 0, 0) Me.bnOK.Size = New System.Drawing.Size(250, 70) Me.bnOK.Text = "OK" ' - 'tlp + 'tlpMain ' - Me.tlp.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.tlp.ColumnCount = 2 - Me.tlp.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle()) - Me.tlp.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!)) - Me.tlp.Controls.Add(Me.Label6, 0, 7) - Me.tlp.Controls.Add(Me.tbInput, 1, 1) - Me.tlp.Controls.Add(Me.Label2, 0, 0) - Me.tlp.Controls.Add(Me.Label7, 0, 9) - Me.tlp.Controls.Add(Me.Label10, 0, 11) - Me.tlp.Controls.Add(Me.tbDescription, 0, 12) - Me.tlp.Controls.Add(Me.tbName, 1, 0) - Me.tlp.Controls.Add(Me.Label3, 0, 1) - Me.tlp.Controls.Add(Me.Label8, 0, 2) - Me.tlp.Controls.Add(Me.tbVideoOut, 1, 2) - Me.tlp.Controls.Add(Me.tbSourceFilters, 1, 4) - Me.tlp.Controls.Add(Me.Label9, 0, 4) - Me.tlp.Controls.Add(Me.TableLayoutPanel1, 1, 7) - Me.tlp.Controls.Add(Me.TableLayoutPanel2, 1, 9) - Me.tlp.Controls.Add(Me.tbInputFormats, 1, 3) - Me.tlp.Controls.Add(Me.Label1, 0, 3) - Me.tlp.Location = New System.Drawing.Point(9, 9) - Me.tlp.Margin = New System.Windows.Forms.Padding(0) - Me.tlp.Name = "tlp" - Me.tlp.RowCount = 13 - Me.tlp.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.tlp.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.tlp.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.tlp.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.tlp.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.tlp.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.tlp.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.tlp.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.tlp.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.tlp.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.tlp.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.tlp.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.tlp.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 34.0!)) - Me.tlp.Size = New System.Drawing.Size(1716, 731) - Me.tlp.TabIndex = 21 - ' - 'Label6 - ' - Me.Label6.Anchor = System.Windows.Forms.AnchorStyles.Left - Me.Label6.AutoSize = True - Me.Label6.Location = New System.Drawing.Point(5, 341) - Me.Label6.Margin = New System.Windows.Forms.Padding(5, 0, 5, 0) - Me.Label6.Name = "Label6" - Me.Label6.Size = New System.Drawing.Size(192, 48) - Me.Label6.TabIndex = 12 - Me.Label6.Text = "Command:" - ' - 'Label2 - ' - Me.Label2.Anchor = System.Windows.Forms.AnchorStyles.Left - Me.Label2.AutoSize = True - Me.Label2.Location = New System.Drawing.Point(5, 8) - Me.Label2.Margin = New System.Windows.Forms.Padding(5, 0, 5, 0) - Me.Label2.Name = "Label2" - Me.Label2.Size = New System.Drawing.Size(277, 48) - Me.Label2.TabIndex = 24 - Me.Label2.Text = "Demuxer Name:" - Me.TipProvider.SetTipText(Me.Label2, "If the demuxer name matches the name of a bundled app then help and description i" & - "s provided.") - ' - 'Label7 - ' - Me.Label7.Anchor = System.Windows.Forms.AnchorStyles.Left - Me.Label7.AutoSize = True - Me.Label7.Location = New System.Drawing.Point(5, 421) - Me.Label7.Margin = New System.Windows.Forms.Padding(5, 0, 5, 0) - Me.Label7.Name = "Label7" - Me.Label7.Size = New System.Drawing.Size(202, 48) - Me.Label7.TabIndex = 29 - Me.Label7.Text = "Arguments:" - ' - 'Label10 - ' - Me.Label10.AutoSize = True - Me.Label10.Location = New System.Drawing.Point(5, 485) - Me.Label10.Margin = New System.Windows.Forms.Padding(5, 0, 5, 0) - Me.Label10.Name = "Label10" - Me.Label10.Size = New System.Drawing.Size(209, 48) - Me.Label10.TabIndex = 32 - Me.Label10.Text = "Description:" - ' - 'tbDescription - ' - Me.tbDescription.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.tlp.SetColumnSpan(Me.tbDescription, 2) - Me.tbDescription.Location = New System.Drawing.Point(5, 538) - Me.tbDescription.Margin = New System.Windows.Forms.Padding(5) - Me.tbDescription.Multiline = True - Me.tbDescription.Name = "tbDescription" - Me.tbDescription.ReadOnly = True - Me.tbDescription.Size = New System.Drawing.Size(1706, 188) - Me.tbDescription.TabIndex = 33 - ' - 'Label3 - ' - Me.Label3.Anchor = System.Windows.Forms.AnchorStyles.Left - Me.Label3.AutoSize = True - Me.Label3.Location = New System.Drawing.Point(5, 73) - Me.Label3.Margin = New System.Windows.Forms.Padding(5, 0, 5, 0) - Me.Label3.Name = "Label3" - Me.Label3.Size = New System.Drawing.Size(275, 48) - Me.Label3.TabIndex = 25 - Me.Label3.Text = "Input File Types:" - Me.TipProvider.SetTipText(Me.Label3, "Input file type to be handled by the demuxer. Use comma to separate multiple file" & - " types.") - ' - 'Label8 - ' - Me.Label8.Anchor = System.Windows.Forms.AnchorStyles.Left - Me.Label8.AutoSize = True - Me.Label8.Location = New System.Drawing.Point(5, 138) - Me.Label8.Margin = New System.Windows.Forms.Padding(5, 0, 5, 0) - Me.Label8.Name = "Label8" - Me.Label8.Size = New System.Drawing.Size(289, 48) - Me.Label8.TabIndex = 30 - Me.Label8.Text = "Output File Type:" - Me.TipProvider.SetTipText(Me.Label8, "Single video file type the demuxer outputs.") - ' - 'Label9 - ' - Me.Label9.Anchor = System.Windows.Forms.AnchorStyles.Left - Me.Label9.AutoSize = True - Me.Label9.Location = New System.Drawing.Point(5, 268) - Me.Label9.Margin = New System.Windows.Forms.Padding(5, 0, 5, 0) - Me.Label9.Name = "Label9" - Me.Label9.Size = New System.Drawing.Size(242, 48) - Me.Label9.TabIndex = 31 - Me.Label9.Text = "Source Filters:" - ' - 'TableLayoutPanel1 - ' - Me.TableLayoutPanel1.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TableLayoutPanel1.AutoSize = True - Me.TableLayoutPanel1.ColumnCount = 2 - Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) - Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle()) - Me.TableLayoutPanel1.Controls.Add(Me.tbCommand, 0, 0) - Me.TableLayoutPanel1.Controls.Add(Me.bnBrowse, 1, 0) - Me.TableLayoutPanel1.Location = New System.Drawing.Point(299, 325) - Me.TableLayoutPanel1.Margin = New System.Windows.Forms.Padding(0) - Me.TableLayoutPanel1.Name = "TableLayoutPanel1" - Me.TableLayoutPanel1.RowCount = 1 - Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.TableLayoutPanel1.Size = New System.Drawing.Size(1417, 80) - Me.TableLayoutPanel1.TabIndex = 35 - ' - 'bnBrowse - ' - Me.bnBrowse.Location = New System.Drawing.Point(1192, 5) - Me.bnBrowse.Margin = New System.Windows.Forms.Padding(5) - Me.bnBrowse.Size = New System.Drawing.Size(220, 70) - Me.bnBrowse.Text = "Browse..." - ' - 'TableLayoutPanel2 - ' - Me.TableLayoutPanel2.Anchor = CType((System.Windows.Forms.AnchorStyles.Left Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.TableLayoutPanel2.AutoSize = True - Me.TableLayoutPanel2.ColumnCount = 2 - Me.TableLayoutPanel2.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) - Me.TableLayoutPanel2.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle()) - Me.TableLayoutPanel2.Controls.Add(Me.bnArguments, 0, 0) - Me.TableLayoutPanel2.Controls.Add(Me.tbArguments, 0, 0) - Me.TableLayoutPanel2.Location = New System.Drawing.Point(299, 405) - Me.TableLayoutPanel2.Margin = New System.Windows.Forms.Padding(0) - Me.TableLayoutPanel2.Name = "TableLayoutPanel2" - Me.TableLayoutPanel2.RowCount = 1 - Me.TableLayoutPanel2.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!)) - Me.TableLayoutPanel2.Size = New System.Drawing.Size(1417, 80) - Me.TableLayoutPanel2.TabIndex = 36 + Me.tlpMain.ColumnCount = 4 + Me.tlpMain.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle()) + Me.tlpMain.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!)) + Me.tlpMain.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle()) + Me.tlpMain.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle()) + Me.tlpMain.Controls.Add(Me.bnArguments, 3, 6) + Me.tlpMain.Controls.Add(Me.bnBrowse, 3, 5) + Me.tlpMain.Controls.Add(Me.tbArguments, 1, 6) + Me.tlpMain.Controls.Add(Me.tbCommand, 1, 5) + Me.tlpMain.Controls.Add(Me.Label6, 0, 5) + Me.tlpMain.Controls.Add(Me.tbInput, 1, 1) + Me.tlpMain.Controls.Add(Me.bnOK, 2, 9) + Me.tlpMain.Controls.Add(Me.bnCancel, 3, 9) + Me.tlpMain.Controls.Add(Me.Label2, 0, 0) + Me.tlpMain.Controls.Add(Me.Label10, 0, 7) + Me.tlpMain.Controls.Add(Me.tbDescription, 0, 8) + Me.tlpMain.Controls.Add(Me.tbName, 1, 0) + Me.tlpMain.Controls.Add(Me.Label3, 0, 1) + Me.tlpMain.Controls.Add(Me.Label8, 0, 2) + Me.tlpMain.Controls.Add(Me.tbVideoOut, 1, 2) + Me.tlpMain.Controls.Add(Me.tbSourceFilters, 1, 4) + Me.tlpMain.Controls.Add(Me.Label9, 0, 4) + Me.tlpMain.Controls.Add(Me.tbInputFormats, 1, 3) + Me.tlpMain.Controls.Add(Me.Label1, 0, 3) + Me.tlpMain.Controls.Add(Me.Label7, 0, 6) + Me.tlpMain.Dock = System.Windows.Forms.DockStyle.Fill + Me.tlpMain.Location = New System.Drawing.Point(15, 15) + Me.tlpMain.Margin = New System.Windows.Forms.Padding(0) + Me.tlpMain.Name = "tlpMain" + Me.tlpMain.RowCount = 10 + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80.0!)) + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80.0!)) + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80.0!)) + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80.0!)) + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80.0!)) + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80.0!)) + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80.0!)) + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 80.0!)) + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!)) + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle()) + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!)) + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!)) + Me.tlpMain.Size = New System.Drawing.Size(1734, 917) + Me.tlpMain.TabIndex = 21 ' 'bnArguments ' + Me.bnArguments.Anchor = System.Windows.Forms.AnchorStyles.None Me.bnArguments.ContextMenuStrip = Me.cmsArguments - Me.bnArguments.Location = New System.Drawing.Point(1192, 5) - Me.bnArguments.Margin = New System.Windows.Forms.Padding(5) + Me.bnArguments.Location = New System.Drawing.Point(1484, 485) + Me.bnArguments.Margin = New System.Windows.Forms.Padding(15, 0, 0, 0) Me.bnArguments.ShowMenuSymbol = True - Me.bnArguments.Size = New System.Drawing.Size(220, 70) + Me.bnArguments.Size = New System.Drawing.Size(250, 70) Me.bnArguments.Text = "Menu" ' 'cmsArguments @@ -368,12 +235,98 @@ Class DemuxForm Me.HelpToolStripMenuItem.Size = New System.Drawing.Size(216, 52) Me.HelpToolStripMenuItem.Text = "Help" ' + 'bnBrowse + ' + Me.bnBrowse.Anchor = System.Windows.Forms.AnchorStyles.None + Me.bnBrowse.Location = New System.Drawing.Point(1484, 405) + Me.bnBrowse.Margin = New System.Windows.Forms.Padding(15, 0, 0, 0) + Me.bnBrowse.Size = New System.Drawing.Size(250, 70) + Me.bnBrowse.Text = "Browse..." + ' + 'Label6 + ' + Me.Label6.Anchor = System.Windows.Forms.AnchorStyles.Left + Me.Label6.AutoSize = True + Me.Label6.Location = New System.Drawing.Point(3, 416) + Me.Label6.Name = "Label6" + Me.Label6.Size = New System.Drawing.Size(192, 48) + Me.Label6.TabIndex = 12 + Me.Label6.Text = "Command:" + ' + 'Label2 + ' + Me.Label2.Anchor = System.Windows.Forms.AnchorStyles.Left + Me.Label2.AutoSize = True + Me.Label2.Location = New System.Drawing.Point(3, 16) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(277, 48) + Me.Label2.TabIndex = 24 + Me.Label2.Text = "Demuxer Name:" + Me.TipProvider.SetTipText(Me.Label2, "If the demuxer name matches the name of a bundled app then help and description i" & + "s provided.") + ' + 'Label10 + ' + Me.Label10.Anchor = System.Windows.Forms.AnchorStyles.Left + Me.Label10.AutoSize = True + Me.Label10.Location = New System.Drawing.Point(3, 576) + Me.Label10.Name = "Label10" + Me.Label10.Size = New System.Drawing.Size(209, 48) + Me.Label10.TabIndex = 32 + Me.Label10.Text = "Description:" + ' + 'tbDescription + ' + Me.tbDescription.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ + Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.tlpMain.SetColumnSpan(Me.tbDescription, 4) + Me.tbDescription.Location = New System.Drawing.Point(0, 640) + Me.tbDescription.Margin = New System.Windows.Forms.Padding(0) + Me.tbDescription.Multiline = True + Me.tbDescription.Name = "tbDescription" + Me.tbDescription.ReadOnly = True + Me.tbDescription.Size = New System.Drawing.Size(1734, 192) + Me.tbDescription.TabIndex = 33 + ' + 'Label3 + ' + Me.Label3.Anchor = System.Windows.Forms.AnchorStyles.Left + Me.Label3.AutoSize = True + Me.Label3.Location = New System.Drawing.Point(3, 96) + Me.Label3.Name = "Label3" + Me.Label3.Size = New System.Drawing.Size(275, 48) + Me.Label3.TabIndex = 25 + Me.Label3.Text = "Input File Types:" + Me.TipProvider.SetTipText(Me.Label3, "Input file type to be handled by the demuxer. Use comma to separate multiple file" & + " types.") + ' + 'Label8 + ' + Me.Label8.Anchor = System.Windows.Forms.AnchorStyles.Left + Me.Label8.AutoSize = True + Me.Label8.Location = New System.Drawing.Point(3, 176) + Me.Label8.Name = "Label8" + Me.Label8.Size = New System.Drawing.Size(289, 48) + Me.Label8.TabIndex = 30 + Me.Label8.Text = "Output File Type:" + Me.TipProvider.SetTipText(Me.Label8, "Single video file type the demuxer outputs.") + ' + 'Label9 + ' + Me.Label9.Anchor = System.Windows.Forms.AnchorStyles.Left + Me.Label9.AutoSize = True + Me.Label9.Location = New System.Drawing.Point(3, 336) + Me.Label9.Name = "Label9" + Me.Label9.Size = New System.Drawing.Size(242, 48) + Me.Label9.TabIndex = 31 + Me.Label9.Text = "Source Filters:" + ' 'Label1 ' Me.Label1.Anchor = System.Windows.Forms.AnchorStyles.Left Me.Label1.AutoSize = True - Me.Label1.Location = New System.Drawing.Point(5, 203) - Me.Label1.Margin = New System.Windows.Forms.Padding(5, 0, 5, 0) + Me.Label1.Location = New System.Drawing.Point(3, 256) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(249, 48) Me.Label1.TabIndex = 26 @@ -382,26 +335,31 @@ Class DemuxForm "xRip uses lower case and the aliases vc1 and mpeg2 so common formats are avc, he" & "vc, mpeg2 and vc1.") ' + 'Label7 + ' + Me.Label7.Anchor = System.Windows.Forms.AnchorStyles.Left + Me.Label7.AutoSize = True + Me.Label7.Location = New System.Drawing.Point(3, 496) + Me.Label7.Name = "Label7" + Me.Label7.Size = New System.Drawing.Size(202, 48) + Me.Label7.TabIndex = 29 + Me.Label7.Text = "Arguments:" + ' 'DemuxForm ' Me.AcceptButton = Me.bnOK Me.AutoScaleDimensions = New System.Drawing.SizeF(288.0!, 288.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.CancelButton = Me.bnCancel - Me.ClientSize = New System.Drawing.Size(1734, 838) - Me.Controls.Add(Me.tlp) - Me.Controls.Add(Me.bnCancel) - Me.Controls.Add(Me.bnOK) + Me.ClientSize = New System.Drawing.Size(1764, 947) + Me.Controls.Add(Me.tlpMain) Me.KeyPreview = True Me.Margin = New System.Windows.Forms.Padding(11, 10, 11, 10) Me.Name = "DemuxForm" + Me.Padding = New System.Windows.Forms.Padding(15) Me.Text = "Demux Configuration" - Me.tlp.ResumeLayout(False) - Me.tlp.PerformLayout() - Me.TableLayoutPanel1.ResumeLayout(False) - Me.TableLayoutPanel1.PerformLayout() - Me.TableLayoutPanel2.ResumeLayout(False) - Me.TableLayoutPanel2.PerformLayout() + Me.tlpMain.ResumeLayout(False) + Me.tlpMain.PerformLayout() Me.cmsArguments.ResumeLayout(False) Me.ResumeLayout(False) @@ -415,6 +373,7 @@ Class DemuxForm Sub New(demuxer As CommandLineDemuxer) MyBase.New() InitializeComponent() + ScaleClientSize(40, 22) Target = demuxer Temp = ObjectHelp.GetCopy(Of CommandLineDemuxer)(demuxer) @@ -437,7 +396,7 @@ Class DemuxForm Return input.ToLower End Function - Private Sub DemuxForm_FormClosed(sender As Object, e As FormClosedEventArgs) Handles Me.FormClosed + Protected Overrides Sub OnFormClosed(e As FormClosedEventArgs) If DialogResult = DialogResult.OK Then Target.Name = tbName.Text Target.InputExtensions = tbInput.Text.ToLower.SplitNoEmptyAndWhiteSpace(",", ";") @@ -447,6 +406,8 @@ Class DemuxForm Target.Command = tbCommand.Text Target.Arguments = tbArguments.Text End If + + MyBase.OnFormClosed(e) End Sub Protected Overrides Sub OnHelpRequested(hevent As HelpEventArgs) diff --git a/Forms/MainForm.vb b/Forms/MainForm.vb index 2069220c..e75daa55 100644 --- a/Forms/MainForm.vb +++ b/Forms/MainForm.vb @@ -1256,10 +1256,6 @@ Public Class MainForm End Using End Function - Function OpenProject(path As String) As Boolean - Return OpenProject(path, True) - End Function - Sub SetBindings(proj As Project, add As Boolean) SetTextBoxBinding(tbTargetFile, proj, NameOf(Project.TargetFile), add) @@ -1282,14 +1278,14 @@ Public Class MainForm End If End Sub + Function OpenProject(Optional path As String = Nothing) As Boolean + Return OpenProject(path, True) + End Function + Function OpenProject(path As String, saveCurrent As Boolean) As Boolean - If Not IsLoading AndAlso saveCurrent AndAlso IsSaveCanceled() Then - Return False - End If - + If Not IsLoading AndAlso saveCurrent AndAlso IsSaveCanceled() Then Return False SetBindings(p, False) - - If Not File.Exists(path) Then path = g.StartupTemplatePath + If path = "" OrElse Not File.Exists(path) Then path = g.StartupTemplatePath Try p = SafeSerialization.Deserialize(New Project, path) @@ -1507,7 +1503,7 @@ Public Class MainForm If s.ShowTemplateSelection Then If Not LoadTemplateWithSelectionDialog() Then Throw New AbortException Else - If Not OpenProject(g.StartupTemplatePath, True) Then Throw New AbortException + If Not OpenProject() Then Throw New AbortException End If End If End If @@ -3441,9 +3437,9 @@ Public Class MainForm End Sub Function GetJobPath() As String - Dim name = Filepath.GetBase(p.TargetFile) + Dim name = p.TargetFile.Base If name = "" Then name = Macro.Expand(p.DefaultTargetName) - If name = "" Then name = Filepath.GetBase(p.SourceFile) + If name = "" Then name = p.SourceFile.Base Return p.TempDir + name + ".srip" End Function @@ -4732,6 +4728,8 @@ Public Class MainForm End If End Using Case "Blu-ray Folder" + If p.SourceFile <> "" Then If Not OpenProject() Then Exit Sub + Using d As New FolderBrowserDialog d.Description = "Please select a Blu-ray source folder." d.SetSelectedPath(s.Storage.GetString("last blu-ray source folder")) @@ -5330,7 +5328,7 @@ Public Class MainForm Sub ExecuteAudio(ap As AudioProfile) Try - If p.TempDir = "" Then p.TempDir = Filepath.GetDir(ap.File) + If p.TempDir = "" Then p.TempDir = ap.File.Dir ap = ObjectHelp.GetCopy(Of AudioProfile)(ap) Audio.Process(ap) ap.Encode() diff --git a/Forms/MuxerForm.vb b/Forms/MuxerForm.vb index 892b0b45..26473ce9 100644 --- a/Forms/MuxerForm.vb +++ b/Forms/MuxerForm.vb @@ -19,7 +19,7 @@ Class MuxerForm Friend WithEvents CmdlControl As StaxRip.CommandLineControl Friend WithEvents bnCancel As StaxRip.UI.ButtonEx Friend WithEvents bnOK As StaxRip.UI.ButtonEx - Friend WithEvents tc As System.Windows.Forms.TabControl + Friend WithEvents tcMain As System.Windows.Forms.TabControl Friend WithEvents tpCommandLine As System.Windows.Forms.TabPage Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents tpOptions As System.Windows.Forms.TabPage @@ -37,6 +37,8 @@ Class MuxerForm Friend WithEvents bnEdit As ButtonEx Friend WithEvents TableLayoutPanel2 As TableLayoutPanel Friend WithEvents FlowLayoutPanel1 As FlowLayoutPanel + Friend WithEvents tlpMain As TableLayoutPanel + Friend WithEvents pnTab As Panel Private components As System.ComponentModel.IContainer Private Sub InitializeComponent() @@ -46,7 +48,7 @@ Class MuxerForm Me.bnCommandLinePreview = New System.Windows.Forms.Button() Me.bnCancel = New StaxRip.UI.ButtonEx() Me.bnOK = New StaxRip.UI.ButtonEx() - Me.tc = New System.Windows.Forms.TabControl() + Me.tcMain = New System.Windows.Forms.TabControl() Me.tpSubtitles = New System.Windows.Forms.TabPage() Me.SubtitleControl = New StaxRip.SubtitleControl() Me.tpAudio = New System.Windows.Forms.TabPage() @@ -64,7 +66,9 @@ Class MuxerForm Me.tpCommandLine = New System.Windows.Forms.TabPage() Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel() Me.Label1 = New System.Windows.Forms.Label() - Me.tc.SuspendLayout() + Me.tlpMain = New System.Windows.Forms.TableLayoutPanel() + Me.pnTab = New System.Windows.Forms.Panel() + Me.tcMain.SuspendLayout() Me.tpSubtitles.SuspendLayout() Me.tpAudio.SuspendLayout() Me.TableLayoutPanel2.SuspendLayout() @@ -73,6 +77,8 @@ Class MuxerForm Me.tpOptions.SuspendLayout() Me.tpCommandLine.SuspendLayout() Me.TableLayoutPanel1.SuspendLayout() + Me.tlpMain.SuspendLayout() + Me.pnTab.SuspendLayout() Me.SuspendLayout() ' 'CmdlControl @@ -84,15 +90,15 @@ Class MuxerForm Me.CmdlControl.Location = New System.Drawing.Point(0, 48) Me.CmdlControl.Margin = New System.Windows.Forms.Padding(0) Me.CmdlControl.Name = "CmdlControl" - Me.CmdlControl.Size = New System.Drawing.Size(1782, 466) + Me.CmdlControl.Size = New System.Drawing.Size(1870, 934) Me.CmdlControl.TabIndex = 0 ' 'bnCommandLinePreview ' - Me.bnCommandLinePreview.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.bnCommandLinePreview.Anchor = System.Windows.Forms.AnchorStyles.Right Me.bnCommandLinePreview.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.bnCommandLinePreview.Location = New System.Drawing.Point(1010, 656) - Me.bnCommandLinePreview.Margin = New System.Windows.Forms.Padding(5) + Me.bnCommandLinePreview.Location = New System.Drawing.Point(365, 766) + Me.bnCommandLinePreview.Margin = New System.Windows.Forms.Padding(8) Me.bnCommandLinePreview.Name = "bnCommandLinePreview" Me.bnCommandLinePreview.Size = New System.Drawing.Size(320, 70) Me.bnCommandLinePreview.TabIndex = 4 @@ -101,37 +107,35 @@ Class MuxerForm ' 'bnCancel ' - Me.bnCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.bnCancel.Anchor = System.Windows.Forms.AnchorStyles.None Me.bnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.bnCancel.Location = New System.Drawing.Point(1600, 656) - Me.bnCancel.Margin = New System.Windows.Forms.Padding(5) + Me.bnCancel.Location = New System.Drawing.Point(967, 766) + Me.bnCancel.Margin = New System.Windows.Forms.Padding(8) Me.bnCancel.Size = New System.Drawing.Size(250, 70) Me.bnCancel.Text = "Cancel" ' 'bnOK ' - Me.bnOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.bnOK.Anchor = System.Windows.Forms.AnchorStyles.None Me.bnOK.DialogResult = System.Windows.Forms.DialogResult.OK - Me.bnOK.Location = New System.Drawing.Point(1340, 656) - Me.bnOK.Margin = New System.Windows.Forms.Padding(5) + Me.bnOK.Location = New System.Drawing.Point(701, 766) + Me.bnOK.Margin = New System.Windows.Forms.Padding(8) Me.bnOK.Size = New System.Drawing.Size(250, 70) Me.bnOK.Text = "OK" ' - 'tc + 'tcMain ' - Me.tc.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ - Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.tc.Controls.Add(Me.tpSubtitles) - Me.tc.Controls.Add(Me.tpAudio) - Me.tc.Controls.Add(Me.tpOptions) - Me.tc.Controls.Add(Me.tpCommandLine) - Me.tc.Location = New System.Drawing.Point(14, 14) - Me.tc.Margin = New System.Windows.Forms.Padding(5) - Me.tc.Name = "tc" - Me.tc.SelectedIndex = 0 - Me.tc.Size = New System.Drawing.Size(1836, 623) - Me.tc.TabIndex = 5 + Me.tcMain.Controls.Add(Me.tpSubtitles) + Me.tcMain.Controls.Add(Me.tpAudio) + Me.tcMain.Controls.Add(Me.tpOptions) + Me.tcMain.Controls.Add(Me.tpCommandLine) + Me.tcMain.Dock = System.Windows.Forms.DockStyle.Fill + Me.tcMain.Location = New System.Drawing.Point(0, 0) + Me.tcMain.Margin = New System.Windows.Forms.Padding(0) + Me.tcMain.Name = "tcMain" + Me.tcMain.SelectedIndex = 0 + Me.tcMain.Size = New System.Drawing.Size(1201, 734) + Me.tcMain.TabIndex = 5 ' 'tpSubtitles ' @@ -140,7 +144,7 @@ Class MuxerForm Me.tpSubtitles.Margin = New System.Windows.Forms.Padding(5) Me.tpSubtitles.Name = "tpSubtitles" Me.tpSubtitles.Padding = New System.Windows.Forms.Padding(5) - Me.tpSubtitles.Size = New System.Drawing.Size(1812, 542) + Me.tpSubtitles.Size = New System.Drawing.Size(1177, 653) Me.tpSubtitles.TabIndex = 3 Me.tpSubtitles.Text = " Subtitles " Me.tpSubtitles.UseVisualStyleBackColor = True @@ -151,7 +155,7 @@ Class MuxerForm Me.SubtitleControl.Location = New System.Drawing.Point(5, 5) Me.SubtitleControl.Margin = New System.Windows.Forms.Padding(2, 3, 2, 3) Me.SubtitleControl.Name = "SubtitleControl" - Me.SubtitleControl.Size = New System.Drawing.Size(1802, 532) + Me.SubtitleControl.Size = New System.Drawing.Size(1167, 643) Me.SubtitleControl.TabIndex = 0 ' 'tpAudio @@ -161,7 +165,7 @@ Class MuxerForm Me.tpAudio.Margin = New System.Windows.Forms.Padding(5) Me.tpAudio.Name = "tpAudio" Me.tpAudio.Padding = New System.Windows.Forms.Padding(5) - Me.tpAudio.Size = New System.Drawing.Size(1812, 542) + Me.tpAudio.Size = New System.Drawing.Size(1900, 1010) Me.tpAudio.TabIndex = 4 Me.tpAudio.Text = " Audio " Me.tpAudio.UseVisualStyleBackColor = True @@ -179,7 +183,7 @@ Class MuxerForm Me.TableLayoutPanel2.Name = "TableLayoutPanel2" Me.TableLayoutPanel2.RowCount = 1 Me.TableLayoutPanel2.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) - Me.TableLayoutPanel2.Size = New System.Drawing.Size(1802, 532) + Me.TableLayoutPanel2.Size = New System.Drawing.Size(1890, 1000) Me.TableLayoutPanel2.TabIndex = 7 ' 'FlowLayoutPanel1 @@ -193,7 +197,7 @@ Class MuxerForm Me.FlowLayoutPanel1.Controls.Add(Me.bnPlay) Me.FlowLayoutPanel1.Controls.Add(Me.bnEdit) Me.FlowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown - Me.FlowLayoutPanel1.Location = New System.Drawing.Point(1511, 0) + Me.FlowLayoutPanel1.Location = New System.Drawing.Point(1599, 0) Me.FlowLayoutPanel1.Margin = New System.Windows.Forms.Padding(0) Me.FlowLayoutPanel1.Name = "FlowLayoutPanel1" Me.FlowLayoutPanel1.Size = New System.Drawing.Size(291, 516) @@ -257,7 +261,7 @@ Class MuxerForm Me.dgvAudio.Margin = New System.Windows.Forms.Padding(0) Me.dgvAudio.Name = "dgvAudio" Me.dgvAudio.RowTemplate.Height = 28 - Me.dgvAudio.Size = New System.Drawing.Size(1511, 532) + Me.dgvAudio.Size = New System.Drawing.Size(1599, 1000) Me.dgvAudio.TabIndex = 0 ' 'tpOptions @@ -267,7 +271,7 @@ Class MuxerForm Me.tpOptions.Margin = New System.Windows.Forms.Padding(5) Me.tpOptions.Name = "tpOptions" Me.tpOptions.Padding = New System.Windows.Forms.Padding(5) - Me.tpOptions.Size = New System.Drawing.Size(1812, 542) + Me.tpOptions.Size = New System.Drawing.Size(1900, 1010) Me.tpOptions.TabIndex = 2 Me.tpOptions.Text = " Options " Me.tpOptions.UseVisualStyleBackColor = True @@ -278,7 +282,7 @@ Class MuxerForm Me.SimpleUI.Location = New System.Drawing.Point(5, 5) Me.SimpleUI.Margin = New System.Windows.Forms.Padding(5) Me.SimpleUI.Name = "SimpleUI" - Me.SimpleUI.Size = New System.Drawing.Size(1802, 532) + Me.SimpleUI.Size = New System.Drawing.Size(1890, 1000) Me.SimpleUI.TabIndex = 0 Me.SimpleUI.Text = "SimpleUI1" ' @@ -289,7 +293,7 @@ Class MuxerForm Me.tpCommandLine.Margin = New System.Windows.Forms.Padding(5) Me.tpCommandLine.Name = "tpCommandLine" Me.tpCommandLine.Padding = New System.Windows.Forms.Padding(15, 14, 15, 14) - Me.tpCommandLine.Size = New System.Drawing.Size(1812, 542) + Me.tpCommandLine.Size = New System.Drawing.Size(1900, 1010) Me.tpCommandLine.TabIndex = 1 Me.tpCommandLine.Text = " Command Line " Me.tpCommandLine.UseVisualStyleBackColor = True @@ -308,7 +312,7 @@ Class MuxerForm Me.TableLayoutPanel1.RowCount = 2 Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle()) Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) - Me.TableLayoutPanel1.Size = New System.Drawing.Size(1782, 514) + Me.TableLayoutPanel1.Size = New System.Drawing.Size(1870, 982) Me.TableLayoutPanel1.TabIndex = 2 ' 'Label1 @@ -321,22 +325,50 @@ Class MuxerForm Me.Label1.TabIndex = 1 Me.Label1.Text = "Additional custom switches:" ' + 'tlpMain + ' + Me.tlpMain.ColumnCount = 3 + Me.tlpMain.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) + Me.tlpMain.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle()) + Me.tlpMain.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle()) + Me.tlpMain.Controls.Add(Me.bnCancel, 2, 1) + Me.tlpMain.Controls.Add(Me.bnOK, 1, 1) + Me.tlpMain.Controls.Add(Me.bnCommandLinePreview, 0, 1) + Me.tlpMain.Controls.Add(Me.pnTab, 0, 0) + Me.tlpMain.Dock = System.Windows.Forms.DockStyle.Fill + Me.tlpMain.Location = New System.Drawing.Point(0, 0) + Me.tlpMain.Name = "tlpMain" + Me.tlpMain.Padding = New System.Windows.Forms.Padding(8) + Me.tlpMain.RowCount = 2 + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle()) + Me.tlpMain.Size = New System.Drawing.Size(1233, 852) + Me.tlpMain.TabIndex = 8 + ' + 'pnTab + ' + Me.tlpMain.SetColumnSpan(Me.pnTab, 3) + Me.pnTab.Controls.Add(Me.tcMain) + Me.pnTab.Dock = System.Windows.Forms.DockStyle.Fill + Me.pnTab.Location = New System.Drawing.Point(16, 16) + Me.pnTab.Margin = New System.Windows.Forms.Padding(8) + Me.pnTab.Name = "pnTab" + Me.pnTab.Size = New System.Drawing.Size(1201, 734) + Me.pnTab.TabIndex = 8 + ' 'MuxerForm ' Me.AcceptButton = Me.bnOK Me.AutoScaleDimensions = New System.Drawing.SizeF(288.0!, 288.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.CancelButton = Me.bnCancel - Me.ClientSize = New System.Drawing.Size(1864, 740) - Me.Controls.Add(Me.tc) - Me.Controls.Add(Me.bnCancel) - Me.Controls.Add(Me.bnOK) - Me.Controls.Add(Me.bnCommandLinePreview) + Me.ClientSize = New System.Drawing.Size(1233, 852) + Me.Controls.Add(Me.tlpMain) Me.KeyPreview = True Me.Margin = New System.Windows.Forms.Padding(11, 10, 11, 10) Me.Name = "MuxerForm" Me.Text = "Container" - Me.tc.ResumeLayout(False) + Me.tcMain.ResumeLayout(False) Me.tpSubtitles.ResumeLayout(False) Me.tpAudio.ResumeLayout(False) Me.TableLayoutPanel2.ResumeLayout(False) @@ -347,6 +379,8 @@ Class MuxerForm Me.tpCommandLine.ResumeLayout(False) Me.TableLayoutPanel1.ResumeLayout(False) Me.TableLayoutPanel1.PerformLayout() + Me.tlpMain.ResumeLayout(False) + Me.pnTab.ResumeLayout(False) Me.ResumeLayout(False) End Sub @@ -364,7 +398,7 @@ Class MuxerForm Me.Muxer = muxer SubtitleControl.AddSubtitles(muxer.Subtitles) CmdlControl.tb.Text = muxer.AdditionalSwitches - tc.SelectedIndex = s.Storage.GetInt("last selected muxer tab") + tcMain.SelectedIndex = s.Storage.GetInt("last selected muxer tab") dgvAudio.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells dgvAudio.MultiSelect = False @@ -408,19 +442,21 @@ Class MuxerForm TipProvider.SetTip("Additional command line switches that may contain macros.", tpCommandLine) End Sub - Private Sub MuxerForm_FormClosed() Handles Me.FormClosed + Protected Overrides Sub OnFormClosed(e As FormClosedEventArgs) If TypeOf Muxer Is MkvMuxer Then s.CmdlPresetsMKV = CmdlControl.Presets.ReplaceUnicode ElseIf TypeOf Muxer Is MP4Muxer Then s.CmdlPresetsMP4 = CmdlControl.Presets.ReplaceUnicode End If - s.Storage.SetInt("last selected muxer tab", tc.SelectedIndex) + s.Storage.SetInt("last selected muxer tab", tcMain.SelectedIndex) SetValues() If DialogResult = DialogResult.OK Then p.AudioTracks = DirectCast(AudioBindingSource.DataSource, List(Of AudioProfile)) End If + + MyBase.OnFormClosed(e) End Sub Private Sub SetValues() @@ -429,13 +465,15 @@ Class MuxerForm Muxer.AdditionalSwitches = CmdlControl.tb.Text.ReplaceUnicode End Sub - Private Sub MuxerForm_HelpRequested() Handles Me.HelpRequested + Protected Overrides Sub OnHelpRequested(hevent As HelpEventArgs) Dim f As New HelpForm() f.Doc.WriteStart(Text) f.Doc.WriteP(Strings.Muxer) f.Doc.WriteTips(TipProvider.GetTips, SimpleUI.ActivePage.TipProvider.GetTips) f.Doc.WriteTable("Macros", Strings.MacrosHelp, Macro.GetTips()) f.Show() + + MyBase.OnHelpRequested(hevent) End Sub Private Sub buCmdlPreview_Click() Handles bnCommandLinePreview.Click @@ -535,8 +573,7 @@ Class MuxerForm UpdateAudioControls() End Sub - Private Sub MuxerForm_Shown(sender As Object, e As EventArgs) Handles Me.Shown - Refresh() + Protected Overrides Sub OnShown(e As EventArgs) Dim lastAction As Action Dim UI = SimpleUI @@ -618,5 +655,7 @@ Class MuxerForm page.ResumeLayout() lastAction?.Invoke + + MyBase.OnShown(e) End Sub End Class \ No newline at end of file diff --git a/Forms/StreamDemuxForm.Designer.vb b/Forms/StreamDemuxForm.Designer.vb index 6e1c23b8..d7b68a83 100644 --- a/Forms/StreamDemuxForm.Designer.vb +++ b/Forms/StreamDemuxForm.Designer.vb @@ -41,11 +41,13 @@ Partial Class StreamDemuxForm Me.bnSubtitleNone = New StaxRip.UI.ButtonEx() Me.bnSubtitleEnglish = New StaxRip.UI.ButtonEx() Me.bnSubtitleNative = New StaxRip.UI.ButtonEx() - Me.FlowLayoutPanel2 = New System.Windows.Forms.FlowLayoutPanel() - Me.bnOK = New StaxRip.UI.ButtonEx() - Me.bnCancel = New StaxRip.UI.ButtonEx() Me.gbAttachments = New System.Windows.Forms.GroupBox() Me.lvAttachments = New StaxRip.UI.ListViewEx() + Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel() + Me.bnOK = New StaxRip.UI.ButtonEx() + Me.bnCancel = New StaxRip.UI.ButtonEx() + Me.cbDemuxVideo = New System.Windows.Forms.CheckBox() + Me.cbDemuxChapters = New System.Windows.Forms.CheckBox() Me.gbAudio.SuspendLayout() Me.AudioTableLayoutPanel.SuspendLayout() Me.flpAudioButtons.SuspendLayout() @@ -53,8 +55,8 @@ Partial Class StreamDemuxForm Me.gbSubtitles.SuspendLayout() Me.SubtitleTableLayoutPanel.SuspendLayout() Me.flpSubtitleButtons.SuspendLayout() - Me.FlowLayoutPanel2.SuspendLayout() Me.gbAttachments.SuspendLayout() + Me.TableLayoutPanel1.SuspendLayout() Me.SuspendLayout() ' 'gbAudio @@ -65,7 +67,7 @@ Partial Class StreamDemuxForm Me.gbAudio.Margin = New System.Windows.Forms.Padding(15, 0, 15, 0) Me.gbAudio.Name = "gbAudio" Me.gbAudio.Padding = New System.Windows.Forms.Padding(10, 0, 10, 10) - Me.gbAudio.Size = New System.Drawing.Size(992, 302) + Me.gbAudio.Size = New System.Drawing.Size(1185, 370) Me.gbAudio.TabIndex = 24 Me.gbAudio.TabStop = False Me.gbAudio.Text = "Audio" @@ -84,7 +86,7 @@ Partial Class StreamDemuxForm Me.AudioTableLayoutPanel.RowCount = 2 Me.AudioTableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) Me.AudioTableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.AudioTableLayoutPanel.Size = New System.Drawing.Size(972, 244) + Me.AudioTableLayoutPanel.Size = New System.Drawing.Size(1165, 312) Me.AudioTableLayoutPanel.TabIndex = 19 ' 'lvAudio @@ -95,7 +97,7 @@ Partial Class StreamDemuxForm Me.lvAudio.Location = New System.Drawing.Point(0, 0) Me.lvAudio.Margin = New System.Windows.Forms.Padding(0) Me.lvAudio.Name = "lvAudio" - Me.lvAudio.Size = New System.Drawing.Size(972, 164) + Me.lvAudio.Size = New System.Drawing.Size(1165, 232) Me.lvAudio.TabIndex = 8 Me.lvAudio.UseCompatibleStateImageBehavior = False ' @@ -108,7 +110,7 @@ Partial Class StreamDemuxForm Me.flpAudioButtons.Controls.Add(Me.bnAudioNone) Me.flpAudioButtons.Controls.Add(Me.bnAudioEnglish) Me.flpAudioButtons.Controls.Add(Me.bnAudioNative) - Me.flpAudioButtons.Location = New System.Drawing.Point(0, 174) + Me.flpAudioButtons.Location = New System.Drawing.Point(0, 242) Me.flpAudioButtons.Margin = New System.Windows.Forms.Padding(0, 10, 0, 0) Me.flpAudioButtons.Name = "flpAudioButtons" Me.flpAudioButtons.Size = New System.Drawing.Size(910, 70) @@ -148,8 +150,8 @@ Partial Class StreamDemuxForm Me.tlpMain.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!)) Me.tlpMain.Controls.Add(Me.gbSubtitles, 0, 1) Me.tlpMain.Controls.Add(Me.gbAudio, 0, 0) - Me.tlpMain.Controls.Add(Me.FlowLayoutPanel2, 0, 3) Me.tlpMain.Controls.Add(Me.gbAttachments, 0, 2) + Me.tlpMain.Controls.Add(Me.TableLayoutPanel1, 0, 3) Me.tlpMain.Dock = System.Windows.Forms.DockStyle.Fill Me.tlpMain.Location = New System.Drawing.Point(0, 0) Me.tlpMain.Margin = New System.Windows.Forms.Padding(0) @@ -158,19 +160,19 @@ Partial Class StreamDemuxForm Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30.0!)) Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 20.0!)) - Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.tlpMain.Size = New System.Drawing.Size(1022, 705) + Me.tlpMain.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 108.0!)) + Me.tlpMain.Size = New System.Drawing.Size(1215, 849) Me.tlpMain.TabIndex = 25 ' 'gbSubtitles ' Me.gbSubtitles.Controls.Add(Me.SubtitleTableLayoutPanel) Me.gbSubtitles.Dock = System.Windows.Forms.DockStyle.Fill - Me.gbSubtitles.Location = New System.Drawing.Point(15, 302) + Me.gbSubtitles.Location = New System.Drawing.Point(15, 370) Me.gbSubtitles.Margin = New System.Windows.Forms.Padding(15, 0, 15, 0) Me.gbSubtitles.Name = "gbSubtitles" Me.gbSubtitles.Padding = New System.Windows.Forms.Padding(10) - Me.gbSubtitles.Size = New System.Drawing.Size(992, 181) + Me.gbSubtitles.Size = New System.Drawing.Size(1185, 222) Me.gbSubtitles.TabIndex = 25 Me.gbSubtitles.TabStop = False Me.gbSubtitles.Text = "Subtitles" @@ -189,7 +191,7 @@ Partial Class StreamDemuxForm Me.SubtitleTableLayoutPanel.RowCount = 2 Me.SubtitleTableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) Me.SubtitleTableLayoutPanel.RowStyles.Add(New System.Windows.Forms.RowStyle()) - Me.SubtitleTableLayoutPanel.Size = New System.Drawing.Size(972, 113) + Me.SubtitleTableLayoutPanel.Size = New System.Drawing.Size(1165, 154) Me.SubtitleTableLayoutPanel.TabIndex = 20 ' 'lvSubtitles @@ -200,7 +202,7 @@ Partial Class StreamDemuxForm Me.lvSubtitles.Location = New System.Drawing.Point(0, 0) Me.lvSubtitles.Margin = New System.Windows.Forms.Padding(0) Me.lvSubtitles.Name = "lvSubtitles" - Me.lvSubtitles.Size = New System.Drawing.Size(972, 33) + Me.lvSubtitles.Size = New System.Drawing.Size(1165, 74) Me.lvSubtitles.TabIndex = 9 Me.lvSubtitles.UseCompatibleStateImageBehavior = False ' @@ -213,7 +215,7 @@ Partial Class StreamDemuxForm Me.flpSubtitleButtons.Controls.Add(Me.bnSubtitleNone) Me.flpSubtitleButtons.Controls.Add(Me.bnSubtitleEnglish) Me.flpSubtitleButtons.Controls.Add(Me.bnSubtitleNative) - Me.flpSubtitleButtons.Location = New System.Drawing.Point(0, 43) + Me.flpSubtitleButtons.Location = New System.Drawing.Point(0, 84) Me.flpSubtitleButtons.Margin = New System.Windows.Forms.Padding(0, 10, 0, 0) Me.flpSubtitleButtons.Name = "flpSubtitleButtons" Me.flpSubtitleButtons.Size = New System.Drawing.Size(910, 70) @@ -247,48 +249,17 @@ Partial Class StreamDemuxForm Me.bnSubtitleNative.Size = New System.Drawing.Size(220, 70) Me.bnSubtitleNative.Text = "Native" ' - 'FlowLayoutPanel2 - ' - Me.FlowLayoutPanel2.Anchor = System.Windows.Forms.AnchorStyles.Right - Me.FlowLayoutPanel2.AutoSize = True - Me.FlowLayoutPanel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.FlowLayoutPanel2.Controls.Add(Me.bnOK) - Me.FlowLayoutPanel2.Controls.Add(Me.bnCancel) - Me.FlowLayoutPanel2.Location = New System.Drawing.Point(497, 619) - Me.FlowLayoutPanel2.Margin = New System.Windows.Forms.Padding(15) - Me.FlowLayoutPanel2.Name = "FlowLayoutPanel2" - Me.FlowLayoutPanel2.Size = New System.Drawing.Size(510, 70) - Me.FlowLayoutPanel2.TabIndex = 26 - ' - 'bnOK - ' - Me.bnOK.Anchor = System.Windows.Forms.AnchorStyles.None - Me.bnOK.DialogResult = System.Windows.Forms.DialogResult.OK - Me.bnOK.Location = New System.Drawing.Point(0, 0) - Me.bnOK.Margin = New System.Windows.Forms.Padding(0, 0, 10, 0) - Me.bnOK.Size = New System.Drawing.Size(250, 70) - Me.bnOK.Text = "OK" - ' - 'bnCancel - ' - Me.bnCancel.Anchor = System.Windows.Forms.AnchorStyles.None - Me.bnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel - Me.bnCancel.Location = New System.Drawing.Point(260, 0) - Me.bnCancel.Margin = New System.Windows.Forms.Padding(0) - Me.bnCancel.Size = New System.Drawing.Size(250, 70) - Me.bnCancel.Text = "Cancel" - ' 'gbAttachments ' Me.gbAttachments.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _ Or System.Windows.Forms.AnchorStyles.Left) _ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) Me.gbAttachments.Controls.Add(Me.lvAttachments) - Me.gbAttachments.Location = New System.Drawing.Point(15, 483) + Me.gbAttachments.Location = New System.Drawing.Point(15, 592) Me.gbAttachments.Margin = New System.Windows.Forms.Padding(15, 0, 15, 0) Me.gbAttachments.Name = "gbAttachments" Me.gbAttachments.Padding = New System.Windows.Forms.Padding(10, 0, 10, 10) - Me.gbAttachments.Size = New System.Drawing.Size(992, 121) + Me.gbAttachments.Size = New System.Drawing.Size(1185, 148) Me.gbAttachments.TabIndex = 27 Me.gbAttachments.TabStop = False Me.gbAttachments.Text = "Attachments" @@ -299,15 +270,75 @@ Partial Class StreamDemuxForm Me.lvAttachments.Location = New System.Drawing.Point(10, 48) Me.lvAttachments.Margin = New System.Windows.Forms.Padding(10) Me.lvAttachments.Name = "lvAttachments" - Me.lvAttachments.Size = New System.Drawing.Size(972, 63) + Me.lvAttachments.Size = New System.Drawing.Size(1165, 90) Me.lvAttachments.TabIndex = 0 Me.lvAttachments.UseCompatibleStateImageBehavior = False ' + 'TableLayoutPanel1 + ' + Me.TableLayoutPanel1.AutoSize = True + Me.TableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.TableLayoutPanel1.ColumnCount = 4 + Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) + Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!)) + Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle()) + Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle()) + Me.TableLayoutPanel1.Controls.Add(Me.bnOK, 2, 0) + Me.TableLayoutPanel1.Controls.Add(Me.bnCancel, 3, 0) + Me.TableLayoutPanel1.Controls.Add(Me.cbDemuxVideo, 0, 0) + Me.TableLayoutPanel1.Controls.Add(Me.cbDemuxChapters, 1, 0) + Me.TableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill + Me.TableLayoutPanel1.Location = New System.Drawing.Point(3, 743) + Me.TableLayoutPanel1.Name = "TableLayoutPanel1" + Me.TableLayoutPanel1.RowCount = 1 + Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle()) + Me.TableLayoutPanel1.Size = New System.Drawing.Size(1209, 103) + Me.TableLayoutPanel1.TabIndex = 28 + ' + 'bnOK + ' + Me.bnOK.Anchor = System.Windows.Forms.AnchorStyles.None + Me.bnOK.DialogResult = System.Windows.Forms.DialogResult.OK + Me.bnOK.Location = New System.Drawing.Point(678, 16) + Me.bnOK.Margin = New System.Windows.Forms.Padding(0) + Me.bnOK.Size = New System.Drawing.Size(250, 70) + Me.bnOK.Text = "OK" + ' + 'bnCancel + ' + Me.bnCancel.Anchor = System.Windows.Forms.AnchorStyles.None + Me.bnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel + Me.bnCancel.Location = New System.Drawing.Point(943, 16) + Me.bnCancel.Margin = New System.Windows.Forms.Padding(15) + Me.bnCancel.Size = New System.Drawing.Size(250, 70) + Me.bnCancel.Text = "Cancel" + ' + 'cbDemuxVideo + ' + Me.cbDemuxVideo.Anchor = System.Windows.Forms.AnchorStyles.None + Me.cbDemuxVideo.AutoSize = True + Me.cbDemuxVideo.Location = New System.Drawing.Point(29, 25) + Me.cbDemuxVideo.Name = "cbDemuxVideo" + Me.cbDemuxVideo.Size = New System.Drawing.Size(280, 52) + Me.cbDemuxVideo.TabIndex = 2 + Me.cbDemuxVideo.Text = "Demux Video" + Me.cbDemuxVideo.UseVisualStyleBackColor = True + ' + 'cbDemuxChapters + ' + Me.cbDemuxChapters.Anchor = System.Windows.Forms.AnchorStyles.None + Me.cbDemuxChapters.AutoSize = True + Me.cbDemuxChapters.Location = New System.Drawing.Point(344, 25) + Me.cbDemuxChapters.Name = "cbDemuxChapters" + Me.cbDemuxChapters.Size = New System.Drawing.Size(328, 52) + Me.cbDemuxChapters.TabIndex = 3 + Me.cbDemuxChapters.Text = "Demux Chapters" + ' 'StreamDemuxForm ' Me.AutoScaleDimensions = New System.Drawing.SizeF(288.0!, 288.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi - Me.ClientSize = New System.Drawing.Size(1022, 705) + Me.ClientSize = New System.Drawing.Size(1215, 849) Me.Controls.Add(Me.tlpMain) Me.KeyPreview = True Me.Margin = New System.Windows.Forms.Padding(11, 10, 11, 10) @@ -323,8 +354,9 @@ Partial Class StreamDemuxForm Me.SubtitleTableLayoutPanel.ResumeLayout(False) Me.SubtitleTableLayoutPanel.PerformLayout() Me.flpSubtitleButtons.ResumeLayout(False) - Me.FlowLayoutPanel2.ResumeLayout(False) Me.gbAttachments.ResumeLayout(False) + Me.TableLayoutPanel1.ResumeLayout(False) + Me.TableLayoutPanel1.PerformLayout() Me.ResumeLayout(False) End Sub @@ -345,10 +377,12 @@ Partial Class StreamDemuxForm Friend WithEvents bnSubtitleEnglish As ButtonEx Friend WithEvents bnSubtitleNative As ButtonEx Friend WithEvents lvSubtitles As ListViewEx - Friend WithEvents FlowLayoutPanel2 As FlowLayoutPanel Friend WithEvents bnOK As ButtonEx Friend WithEvents bnCancel As ButtonEx Friend WithEvents SubtitleTableLayoutPanel As TableLayoutPanel Friend WithEvents gbAttachments As GroupBox Friend WithEvents lvAttachments As ListViewEx + Friend WithEvents TableLayoutPanel1 As TableLayoutPanel + Friend WithEvents cbDemuxVideo As CheckBox + Friend WithEvents cbDemuxChapters As CheckBox End Class diff --git a/Forms/StreamDemuxForm.vb b/Forms/StreamDemuxForm.vb index 75f046cf..f17d3c6a 100644 --- a/Forms/StreamDemuxForm.vb +++ b/Forms/StreamDemuxForm.vb @@ -8,6 +8,9 @@ Class StreamDemuxForm Sub New(sourceFile As String, attachments As List(Of Attachment)) InitializeComponent() + Me.cbDemuxChapters.Visible = False + Me.cbDemuxVideo.Visible = False + ScaleClientSize(42, 29) StartPosition = FormStartPosition.CenterParent @@ -31,6 +34,8 @@ Class StreamDemuxForm lvAttachments.HeaderStyle = ColumnHeaderStyle.None lvAttachments.AutoCheckMode = AutoCheckMode.SingleClick + AddHandler Load, Sub() lvAudio.Columns(0).Width = lvAudio.ClientSize.Width + AudioStreams = MediaInfo.GetAudioStreams(sourceFile) Subtitles = MediaInfo.GetSubtitles(sourceFile) @@ -70,10 +75,6 @@ Class StreamDemuxForm End If End Sub - Private Sub StreamDemuxForm_Load(sender As Object, e As EventArgs) Handles Me.Load - lvAudio.Columns(0).Width = lvAudio.ClientSize.Width - End Sub - Private Sub lvAudio_ItemChecked(sender As Object, e As ItemCheckedEventArgs) Handles lvAudio.ItemChecked If Visible Then DirectCast(e.Item.Tag, AudioStream).Enabled = e.Item.Checked End Sub diff --git a/General/Demux.vb b/General/Demux.vb index ac0b1a64..2c9307c0 100644 --- a/General/Demux.vb +++ b/General/Demux.vb @@ -379,10 +379,10 @@ Class MP4BoxDemuxer (demuxSubtitles AndAlso proj.DemuxSubtitles = DemuxMode.Dialog)) Then ProcessForm.CloseProcessForm() - Using f As New StreamDemuxForm(proj.SourceFile, attachments) - If f.ShowDialog() = DialogResult.OK Then - audioStreams = f.AudioStreams - subtitles = f.Subtitles + Using form As New StreamDemuxForm(proj.SourceFile, attachments) + If form.ShowDialog() = DialogResult.OK Then + audioStreams = form.AudioStreams + subtitles = form.Subtitles Else Throw New AbortException End If diff --git a/General/GlobalCommands.vb b/General/GlobalCommands.vb index cc7bef0a..3507fb54 100644 --- a/General/GlobalCommands.vb +++ b/General/GlobalCommands.vb @@ -26,14 +26,24 @@ Public Class GlobalCommands page.ResumeLayout() + AddHandler sourceFile.Edit.TextChanged, Sub() + If outputFolder.Edit.Text = "" AndAlso + File.Exists(sourceFile.Edit.Text) Then + + outputFolder.Edit.Text = sourceFile.Edit.Text.Dir + End If + End Sub + form.FileDrop = True + AddHandler form.FilesDropped, Sub(files) sourceFile.Edit.Text = files(0) + If form.ShowDialog() = DialogResult.OK AndAlso - File.Exists(sourceFile.Edit.Text) AndAlso - Directory.Exists(outputFolder.Edit.Text) Then + File.Exists(sourceFile.Edit.Text) AndAlso + Directory.Exists(outputFolder.Edit.Text) Then Using td As New TaskDialog(Of Demuxer) td.MainInstruction = "Select a demuxer." If sourceFile.Edit.Text.Ext = "mkv" Then td.AddCommandLink("mkvextract", New mkvDemuxer) - If sourceFile.Edit.Text.Ext = "mp4" Then td.AddCommandLink("MP4Box", New MP4BoxDemuxer) + If sourceFile.Edit.Text.Ext.EqualsAny("mp4", "flv") Then td.AddCommandLink("MP4Box", New MP4BoxDemuxer) td.AddCommandLink("ffmpeg", New ffmpegDemuxer) td.AddCommandLink("eac3to", New eac3toDemuxer) diff --git a/General/Package.vb b/General/Package.vb index fdbc1116..10028857 100644 --- a/General/Package.vb +++ b/General/Package.vb @@ -895,7 +895,7 @@ Public Class AviSynthPlusPackage WebURL = "http://avisynth.nl/index.php/AviSynth%2B" Description = "StaxRip support both AviSynth+ x64 and VapourSynth x64 as scripting based video processing tool." FixedDir = Folder.System - SetupFilename = "AviSynth+r2455.exe" + SetupFilename = "AviSynth+r2502.exe" End Sub Public Overrides ReadOnly Property IsRequired As Boolean diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 497cc869..8102f286 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -8,4 +8,4 @@ Imports System.Runtime.InteropServices - \ No newline at end of file + \ No newline at end of file diff --git a/UI/Controls/SimpleUI.vb b/UI/Controls/SimpleUI.vb index 0d6f8958..a19dac10 100644 --- a/UI/Controls/SimpleUI.vb +++ b/UI/Controls/SimpleUI.vb @@ -687,12 +687,11 @@ Public Class SimpleUI dia.Filter = filter dia.SetInitDir(s.LastSourceDir) dia.InitialDirectory = p.TempDir - - If dia.ShowDialog = DialogResult.OK Then - Edit.Text = dia.FileName - End If + If dia.ShowDialog = DialogResult.OK Then Edit.Text = dia.FileName End Using End Sub + + AddHandler Edit.TextChanged, Sub() If File.Exists(Edit.Text) Then s.LastSourceDir = Edit.Text.Dir End Sub Sub BrowseFolder() diff --git a/UI/Misc.vb b/UI/Misc.vb index 60025296..1a853202 100644 --- a/UI/Misc.vb +++ b/UI/Misc.vb @@ -6,10 +6,43 @@ Namespace UI Public Class FormBase Inherits Form + Event FilesDropped(files As String()) + + Private FileDropValue As Boolean + + + Property FileDrop As Boolean + Get + Return FileDropValue + End Get + Set(value As Boolean) + FileDropValue = value + AllowDrop = value + End Set + End Property + Public Sub New() Font = New Font("Segoe UI", 9) End Sub + Protected Overrides Sub OnDragEnter(e As DragEventArgs) + If FileDrop Then + Dim files = TryCast(e.Data.GetData(DataFormats.FileDrop), String()) + If Not files.NothingOrEmpty Then e.Effect = DragDropEffects.Copy + End If + + MyBase.OnDragEnter(e) + End Sub + + Protected Overrides Sub OnDragDrop(e As DragEventArgs) + If FileDrop Then + Dim files = TryCast(e.Data.GetData(DataFormats.FileDrop), String()) + If Not files.NothingOrEmpty Then RaiseEvent FilesDropped(files) + End If + + MyBase.OnDragDrop(e) + End Sub + Protected Overrides Sub OnLoad(e As EventArgs) KeyPreview = True SetTabIndexes(Me) diff --git a/md/test-build.md b/md/test-build.md index db68b1a8..8713096e 100644 --- a/md/test-build.md +++ b/md/test-build.md @@ -12,6 +12,12 @@ https://drive.google.com/open?id=0B-gPKiJYuKuITld4dzhuTC1WWWM https://onedrive.live.com/redir?resid=604D4754F64B0ABC!4140&authkey=!ANUm9V3vTPmEFNI&ithint=folder%2c7z +#### 1.5.0.2 unstable test build + +- update: AviSynth r2502 +- fix: Opening a Blu-ray folder while having already a source file opened mixed various things up +- fix: DPI scaling broken under rare conditions + #### 1.5.0.1 unstable test build - new: experimental AV1 codec support