summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-03-27 13:52:36 +0000
committersr55 <[email protected]>2011-03-27 13:52:36 +0000
commitcb05e46863daec1a73f6b53bc6092d16e40c98a6 (patch)
tree65d748c52d7cbc301ac2076eea556bc1d6fb079e /win/CS
parent3dbaa1fabfb4b98b46a2d0eed6a426c06bd59b98 (diff)
WinGui:
- Remove built-in quicktime based video preview support. - Resigned the Preview window as a result. Currently only supports VLC launching, but will later add an option to use the systems default player for the format produced. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3882 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs7
-rw-r--r--win/CS/HandBrake.sln66
-rw-r--r--win/CS/HandBrakeCS.csproj29
-rw-r--r--win/CS/Installer/Installer.nsi3
-rw-r--r--win/CS/Installer/MakeNightly.nsi.tmpl3
-rw-r--r--win/CS/frmPreview.Designer.cs237
-rw-r--r--win/CS/frmPreview.cs249
-rw-r--r--win/CS/frmPreview.resx18
-rw-r--r--win/CS/libraries/AxInterop.QTOControlLib.dllbin28672 -> 0 bytes
9 files changed, 136 insertions, 476 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs
index 7f723b8b4..ad56043ac 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/QueueManager.cs
@@ -52,11 +52,6 @@ namespace HandBrake.ApplicationServices.Services
/// </summary>
private int lastJobId;
- /// <summary>
- /// The instance Id of this HandBrake instance.
- /// </summary>
- private int instanceId;
-
#endregion
/// <summary>
@@ -67,8 +62,6 @@ namespace HandBrake.ApplicationServices.Services
/// </param>
public QueueManager(int instanceId)
{
- this.instanceId = instanceId;
-
// If this is the first instance, just use the main queue file, otherwise add the instance id to the filename.
this.queueFile = instanceId == 0 ? "hb_queue_recovery.xml" : string.Format("hb_queue_recovery{0}.xml", instanceId);
}
diff --git a/win/CS/HandBrake.sln b/win/CS/HandBrake.sln
deleted file mode 100644
index c51ae7b99..000000000
--- a/win/CS/HandBrake.sln
+++ /dev/null
@@ -1,66 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrakeCS", "HandBrakeCS.csproj", "{A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrake.ApplicationServices", "HandBrake.ApplicationServices\HandBrake.ApplicationServices.csproj", "{087A2BA8-BAC2-4577-A46F-07FF9D420016}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandBrake.Framework", "HandBrake.Framework\HandBrake.Framework.csproj", "{49AD42C1-BF9B-4D78-A644-020878FAADE6}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x86 = Debug|x86
- Install|Any CPU = Install|Any CPU
- Install|x86 = Install|x86
- NightlyBuild|Any CPU = NightlyBuild|Any CPU
- NightlyBuild|x86 = NightlyBuild|x86
- Release|Any CPU = Release|Any CPU
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Debug|x86.ActiveCfg = Debug|x86
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Debug|x86.Build.0 = Debug|x86
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Install|Any CPU.ActiveCfg = Install|Any CPU
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Install|Any CPU.Build.0 = Install|Any CPU
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Install|x86.ActiveCfg = Install|x86
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Install|x86.Build.0 = Install|x86
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.NightlyBuild|Any CPU.ActiveCfg = NightlyBuild|Any CPU
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.NightlyBuild|Any CPU.Build.0 = NightlyBuild|Any CPU
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.NightlyBuild|x86.ActiveCfg = NightlyBuild|x86
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.NightlyBuild|x86.Build.0 = NightlyBuild|x86
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Release|Any CPU.Build.0 = Release|Any CPU
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Release|x86.ActiveCfg = Release|x86
- {A2923D42-C38B-4B12-8CBA-B8D93D6B13A3}.Release|x86.Build.0 = Release|x86
- {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Debug|x86.ActiveCfg = Debug|Any CPU
- {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Install|Any CPU.ActiveCfg = Release|Any CPU
- {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Install|Any CPU.Build.0 = Release|Any CPU
- {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Install|x86.ActiveCfg = Release|Any CPU
- {087A2BA8-BAC2-4577-A46F-07FF9D420016}.NightlyBuild|Any CPU.ActiveCfg = NightlyBuild|Any CPU
- {087A2BA8-BAC2-4577-A46F-07FF9D420016}.NightlyBuild|Any CPU.Build.0 = NightlyBuild|Any CPU
- {087A2BA8-BAC2-4577-A46F-07FF9D420016}.NightlyBuild|x86.ActiveCfg = Release|Any CPU
- {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Release|Any CPU.Build.0 = Release|Any CPU
- {087A2BA8-BAC2-4577-A46F-07FF9D420016}.Release|x86.ActiveCfg = Release|Any CPU
- {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Debug|x86.ActiveCfg = Debug|Any CPU
- {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Install|Any CPU.ActiveCfg = NightlyBuild|Any CPU
- {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Install|Any CPU.Build.0 = NightlyBuild|Any CPU
- {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Install|x86.ActiveCfg = NightlyBuild|Any CPU
- {49AD42C1-BF9B-4D78-A644-020878FAADE6}.NightlyBuild|Any CPU.ActiveCfg = NightlyBuild|Any CPU
- {49AD42C1-BF9B-4D78-A644-020878FAADE6}.NightlyBuild|Any CPU.Build.0 = NightlyBuild|Any CPU
- {49AD42C1-BF9B-4D78-A644-020878FAADE6}.NightlyBuild|x86.ActiveCfg = NightlyBuild|Any CPU
- {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Release|Any CPU.Build.0 = Release|Any CPU
- {49AD42C1-BF9B-4D78-A644-020878FAADE6}.Release|x86.ActiveCfg = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/win/CS/HandBrakeCS.csproj b/win/CS/HandBrakeCS.csproj
index b35ba3c8d..358ef6662 100644
--- a/win/CS/HandBrakeCS.csproj
+++ b/win/CS/HandBrakeCS.csproj
@@ -145,9 +145,6 @@
<Optimize>true</Optimize>
</PropertyGroup>
<ItemGroup>
- <Reference Include="AxInterop.QTOControlLib">
- <HintPath>libraries\AxInterop.QTOControlLib.dll</HintPath>
- </Reference>
<Reference Include="Growl.Connector, Version=2.0.0.0, Culture=neutral, PublicKeyToken=980c2339411be384, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>libraries\Growl.Connector.dll</HintPath>
@@ -213,17 +210,17 @@
<Compile Include="Controls\x264Panel.Designer.cs">
<DependentUpon>x264Panel.cs</DependentUpon>
</Compile>
- <Compile Include="Functions\ToolStripRenderOverride.cs" />
- <Compile Include="Model\ActivityLogMode.cs" />
- <Compile Include="Model\QueryPictureSettingsMode.cs" />
- <Compile Include="Model\QueryEncodeMode.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="frmPreview.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmPreview.Designer.cs">
<DependentUpon>frmPreview.cs</DependentUpon>
</Compile>
+ <Compile Include="Functions\ToolStripRenderOverride.cs" />
+ <Compile Include="Model\ActivityLogMode.cs" />
+ <Compile Include="Model\QueryPictureSettingsMode.cs" />
+ <Compile Include="Model\QueryEncodeMode.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="frmAbout.cs">
<SubType>Form</SubType>
</Compile>
@@ -466,22 +463,6 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
- <COMReference Include="QTOControlLib">
- <Guid>{7B92F833-027D-402B-BFF9-A67697366F4E}</Guid>
- <VersionMajor>1</VersionMajor>
- <VersionMinor>0</VersionMinor>
- <Lcid>0</Lcid>
- <WrapperTool>tlbimp</WrapperTool>
- <Isolated>False</Isolated>
- </COMReference>
- <COMReference Include="QTOLibrary">
- <Guid>{29866AED-1E14-417D-BA0F-1A2BE6F5A19E}</Guid>
- <VersionMajor>1</VersionMajor>
- <VersionMinor>0</VersionMinor>
- <Lcid>0</Lcid>
- <WrapperTool>tlbimp</WrapperTool>
- <Isolated>False</Isolated>
- </COMReference>
<COMReference Include="stdole">
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>
<VersionMajor>2</VersionMajor>
diff --git a/win/CS/Installer/Installer.nsi b/win/CS/Installer/Installer.nsi
index a4d70f3e0..1867c91d3 100644
--- a/win/CS/Installer/Installer.nsi
+++ b/win/CS/Installer/Installer.nsi
@@ -126,9 +126,6 @@ Section "Handbrake" SEC01
CreateDirectory "$SMPROGRAMS\Handbrake"
CreateShortCut "$SMPROGRAMS\Handbrake\Handbrake.lnk" "$INSTDIR\Handbrake.exe"
CreateShortCut "$DESKTOP\Handbrake.lnk" "$INSTDIR\Handbrake.exe"
- File "Interop.QTOLibrary.dll"
- File "Interop.QTOControlLib.dll"
- File "AxInterop.QTOControlLib.dll"
File "Growl.Connector.dll"
File "Growl.CoreLibrary.dll"
File "Handbrake.exe.config"
diff --git a/win/CS/Installer/MakeNightly.nsi.tmpl b/win/CS/Installer/MakeNightly.nsi.tmpl
index 3c5768a20..55bc38eb8 100644
--- a/win/CS/Installer/MakeNightly.nsi.tmpl
+++ b/win/CS/Installer/MakeNightly.nsi.tmpl
@@ -126,9 +126,6 @@ Section "Handbrake" SEC01
CreateDirectory "$SMPROGRAMS\Handbrake"
CreateShortCut "$SMPROGRAMS\Handbrake\Handbrake.lnk" "$INSTDIR\Handbrake.exe"
CreateShortCut "$DESKTOP\Handbrake.lnk" "$INSTDIR\Handbrake.exe"
- File "Interop.QTOLibrary.dll"
- File "Interop.QTOControlLib.dll"
- File "AxInterop.QTOControlLib.dll"
File "Growl.Connector.dll"
File "Growl.CoreLibrary.dll"
File "Handbrake.exe.config"
diff --git a/win/CS/frmPreview.Designer.cs b/win/CS/frmPreview.Designer.cs
index 729e65b2b..0dc245869 100644
--- a/win/CS/frmPreview.Designer.cs
+++ b/win/CS/frmPreview.Designer.cs
@@ -32,58 +32,19 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmPreview));
- this.toolBar = new System.Windows.Forms.ToolStrip();
- this.lbl_preview = new System.Windows.Forms.ToolStripLabel();
- this.cb_preview = new System.Windows.Forms.ToolStripComboBox();
- this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
- this.cb_duration = new System.Windows.Forms.ToolStripComboBox();
- this.btn_playQT = new System.Windows.Forms.ToolStripButton();
- this.btn_playVLC = new System.Windows.Forms.ToolStripButton();
- this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
- this.ProgressBarStatus = new System.Windows.Forms.ToolStripProgressBar();
- this.lbl_encodeStatus = new System.Windows.Forms.ToolStripLabel();
- this.panel1 = new System.Windows.Forms.Panel();
- this.QTControl = new AxQTOControlLib.AxQTControl();
- this.toolBar.SuspendLayout();
- this.panel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.QTControl)).BeginInit();
+ this.startPoint = new System.Windows.Forms.ComboBox();
+ this.endPoint = new System.Windows.Forms.ComboBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.label2 = new System.Windows.Forms.Label();
+ this.progressBar = new System.Windows.Forms.ProgressBar();
+ this.lbl_progress = new System.Windows.Forms.Label();
+ this.btn_play = new System.Windows.Forms.Button();
this.SuspendLayout();
//
- // toolBar
- //
- this.toolBar.AutoSize = false;
- this.toolBar.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
- this.toolBar.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.lbl_preview,
- this.cb_preview,
- this.toolStripLabel2,
- this.cb_duration,
- this.btn_playQT,
- this.btn_playVLC,
- this.toolStripSeparator1,
- this.ProgressBarStatus,
- this.lbl_encodeStatus});
- this.toolBar.Location = new System.Drawing.Point(0, 0);
- this.toolBar.Name = "toolBar";
- this.toolBar.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
- this.toolBar.Size = new System.Drawing.Size(722, 25);
- this.toolBar.TabIndex = 37;
- this.toolBar.Text = "toolStrip1";
- //
- // lbl_preview
- //
- this.lbl_preview.BackColor = System.Drawing.Color.Transparent;
- this.lbl_preview.Name = "lbl_preview";
- this.lbl_preview.Size = new System.Drawing.Size(91, 22);
- this.lbl_preview.Text = "Start at Preview:";
- //
- // cb_preview
- //
- this.cb_preview.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.cb_preview.DropDownWidth = 75;
- this.cb_preview.FlatStyle = System.Windows.Forms.FlatStyle.Standard;
- this.cb_preview.Font = new System.Drawing.Font("Tahoma", 9F);
- this.cb_preview.Items.AddRange(new object[] {
+ // startPoint
+ //
+ this.startPoint.FormattingEnabled = true;
+ this.startPoint.Items.AddRange(new object[] {
"1",
"2",
"3",
@@ -94,23 +55,15 @@
"8",
"9",
"10"});
- this.cb_preview.Name = "cb_preview";
- this.cb_preview.Size = new System.Drawing.Size(75, 25);
- //
- // toolStripLabel2
- //
- this.toolStripLabel2.BackColor = System.Drawing.Color.Transparent;
- this.toolStripLabel2.Name = "toolStripLabel2";
- this.toolStripLabel2.Size = new System.Drawing.Size(107, 22);
- this.toolStripLabel2.Text = "Duration (seconds)";
+ this.startPoint.Location = new System.Drawing.Point(107, 6);
+ this.startPoint.Name = "startPoint";
+ this.startPoint.Size = new System.Drawing.Size(72, 21);
+ this.startPoint.TabIndex = 38;
//
- // cb_duration
+ // endPoint
//
- this.cb_duration.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.cb_duration.DropDownWidth = 75;
- this.cb_duration.FlatStyle = System.Windows.Forms.FlatStyle.Standard;
- this.cb_duration.Font = new System.Drawing.Font("Tahoma", 9F);
- this.cb_duration.Items.AddRange(new object[] {
+ this.endPoint.FormattingEnabled = true;
+ this.endPoint.Items.AddRange(new object[] {
"5",
"10",
"15",
@@ -123,89 +76,77 @@
"50",
"55",
"60"});
- this.cb_duration.Margin = new System.Windows.Forms.Padding(0);
- this.cb_duration.Name = "cb_duration";
- this.cb_duration.Size = new System.Drawing.Size(75, 25);
- //
- // btn_playQT
- //
- this.btn_playQT.Image = global::Handbrake.Properties.Resources.Play_small;
- this.btn_playQT.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.btn_playQT.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.btn_playQT.Name = "btn_playQT";
- this.btn_playQT.Size = new System.Drawing.Size(96, 22);
- this.btn_playQT.Text = "Play with QT";
- this.btn_playQT.Click += new System.EventHandler(this.PlayQtClick);
- //
- // btn_playVLC
- //
- this.btn_playVLC.Image = global::Handbrake.Properties.Resources.Play_small;
- this.btn_playVLC.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.btn_playVLC.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.btn_playVLC.Name = "btn_playVLC";
- this.btn_playVLC.Size = new System.Drawing.Size(101, 22);
- this.btn_playVLC.Text = "Play with VLC";
- this.btn_playVLC.Click += new System.EventHandler(this.PlayVlcClick);
- //
- // toolStripSeparator1
- //
- this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
- //
- // ProgressBarStatus
- //
- this.ProgressBarStatus.Name = "ProgressBarStatus";
- this.ProgressBarStatus.Size = new System.Drawing.Size(100, 22);
- this.ProgressBarStatus.Visible = false;
- //
- // lbl_encodeStatus
- //
- this.lbl_encodeStatus.Name = "lbl_encodeStatus";
- this.lbl_encodeStatus.Size = new System.Drawing.Size(38, 22);
- this.lbl_encodeStatus.Text = "0.00%";
- this.lbl_encodeStatus.Visible = false;
- //
- // panel1
- //
- this.panel1.AutoSize = true;
- this.panel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
- this.panel1.Controls.Add(this.QTControl);
- this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel1.Location = new System.Drawing.Point(0, 25);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(722, 481);
- this.panel1.TabIndex = 40;
- //
- // QTControl
- //
- this.QTControl.Enabled = true;
- this.QTControl.Location = new System.Drawing.Point(0, 0);
- this.QTControl.Name = "QTControl";
- this.QTControl.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("QTControl.OcxState")));
- this.QTControl.Size = new System.Drawing.Size(64, 72);
- this.QTControl.TabIndex = 39;
- this.QTControl.Visible = false;
+ this.endPoint.Location = new System.Drawing.Point(289, 6);
+ this.endPoint.Name = "endPoint";
+ this.endPoint.Size = new System.Drawing.Size(70, 21);
+ this.endPoint.TabIndex = 39;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(12, 9);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(89, 13);
+ this.label1.TabIndex = 40;
+ this.label1.Text = "Start at Preview:";
+ //
+ // label2
+ //
+ this.label2.AutoSize = true;
+ this.label2.Location = new System.Drawing.Point(185, 9);
+ this.label2.Name = "label2";
+ this.label2.Size = new System.Drawing.Size(98, 13);
+ this.label2.TabIndex = 41;
+ this.label2.Text = "Duration (seconds)";
+ //
+ // progressBar
+ //
+ this.progressBar.Location = new System.Drawing.Point(12, 33);
+ this.progressBar.Name = "progressBar";
+ this.progressBar.Size = new System.Drawing.Size(301, 18);
+ this.progressBar.TabIndex = 42;
+ //
+ // lbl_progress
+ //
+ this.lbl_progress.AutoSize = true;
+ this.lbl_progress.Location = new System.Drawing.Point(319, 36);
+ this.lbl_progress.Name = "lbl_progress";
+ this.lbl_progress.Size = new System.Drawing.Size(40, 13);
+ this.lbl_progress.TabIndex = 43;
+ this.lbl_progress.Text = "0.00%";
+ //
+ // btn_play
+ //
+ this.btn_play.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.btn_play.ForeColor = System.Drawing.Color.DarkOrange;
+ this.btn_play.Location = new System.Drawing.Point(302, 57);
+ this.btn_play.Name = "btn_play";
+ this.btn_play.Size = new System.Drawing.Size(57, 24);
+ this.btn_play.TabIndex = 44;
+ this.btn_play.Text = "Play";
+ this.btn_play.UseVisualStyleBackColor = true;
+ this.btn_play.Click += new System.EventHandler(this.btn_play_Click);
//
// frmPreview
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.AutoSize = true;
- this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
- this.BackColor = System.Drawing.Color.Black;
- this.ClientSize = new System.Drawing.Size(722, 506);
- this.Controls.Add(this.panel1);
- this.Controls.Add(this.toolBar);
+ this.ClientSize = new System.Drawing.Size(369, 91);
+ this.Controls.Add(this.btn_play);
+ this.Controls.Add(this.lbl_progress);
+ this.Controls.Add(this.progressBar);
+ this.Controls.Add(this.label2);
+ this.Controls.Add(this.label1);
+ this.Controls.Add(this.endPoint);
+ this.Controls.Add(this.startPoint);
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.MinimumSize = new System.Drawing.Size(730, 32);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
this.Name = "frmPreview";
+ this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Video Preview";
- this.toolBar.ResumeLayout(false);
- this.toolBar.PerformLayout();
- this.panel1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.QTControl)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -213,17 +154,13 @@
#endregion
- private System.Windows.Forms.ToolStrip toolBar;
- private System.Windows.Forms.ToolStripButton btn_playQT;
- private AxQTOControlLib.AxQTControl QTControl;
- private System.Windows.Forms.ToolStripComboBox cb_preview;
- private System.Windows.Forms.ToolStripLabel lbl_preview;
- private System.Windows.Forms.ToolStripLabel toolStripLabel2;
- private System.Windows.Forms.ToolStripComboBox cb_duration;
- private System.Windows.Forms.ToolStripButton btn_playVLC;
- private System.Windows.Forms.Panel panel1;
- private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
- private System.Windows.Forms.ToolStripProgressBar ProgressBarStatus;
- private System.Windows.Forms.ToolStripLabel lbl_encodeStatus;
+ private System.Windows.Forms.ComboBox startPoint;
+ private System.Windows.Forms.ComboBox endPoint;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.Label label2;
+ private System.Windows.Forms.ProgressBar progressBar;
+ private System.Windows.Forms.Label lbl_progress;
+ private System.Windows.Forms.Button btn_play;
+
}
} \ No newline at end of file
diff --git a/win/CS/frmPreview.cs b/win/CS/frmPreview.cs
index 10bd1cf4c..96404e6f2 100644
--- a/win/CS/frmPreview.cs
+++ b/win/CS/frmPreview.cs
@@ -8,9 +8,7 @@ namespace Handbrake
using System;
using System.Diagnostics;
using System.IO;
- using System.Runtime.InteropServices;
using System.Threading;
- using System.Windows;
using System.Windows.Forms;
using Functions;
@@ -18,9 +16,6 @@ namespace Handbrake
using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Services.Interfaces;
- using QTOControlLib;
- using QTOLibrary;
-
using MessageBox = System.Windows.Forms.MessageBox;
/// <summary>
@@ -36,11 +31,6 @@ namespace Handbrake
private readonly frmMain mainWindow;
/// <summary>
- /// True if QT is not installed
- /// </summary>
- private readonly bool noQt;
-
- /// <summary>
/// The encode queue
/// </summary>
private readonly IEncode encodeQueue = new Encode();
@@ -51,14 +41,15 @@ namespace Handbrake
private string currentlyPlaying = string.Empty;
/// <summary>
- /// Play With VLC tracker
- /// </summary>
- private bool playWithVlc;
-
- /// <summary>
- /// A Thread for the video player
+ /// Update UI Delegate
/// </summary>
- private Thread player;
+ /// <param name="sender">
+ /// The sender.
+ /// </param>
+ /// <param name="e">
+ /// The e.
+ /// </param>
+ private delegate void UpdateUiHandler(object sender, EventArgs e);
#endregion
@@ -70,57 +61,24 @@ namespace Handbrake
/// </param>
public frmPreview(frmMain mw)
{
- try
- {
- InitializeComponent();
- }
- catch (Exception)
- {
- this.noQt = true;
-
- int borderWidth = (this.Width - this.ClientSize.Width) / 2;
- int titlebarAndBorder = this.Height - this.ClientSize.Height;
-
- this.Height = toolBar.Height + titlebarAndBorder + 1;
- btn_playQT.Enabled = false;
- btn_playQT.Visible = false;
- }
-
+ InitializeComponent();
this.mainWindow = mw;
- cb_preview.SelectedIndex = 0;
- cb_duration.SelectedIndex = 1;
+ startPoint.SelectedIndex = 0;
+ endPoint.SelectedIndex = 1;
- cb_preview.Items.Clear();
+ startPoint.Items.Clear();
for (int i = 1; i <= Properties.Settings.Default.previewScanCount; i++)
{
- cb_preview.Items.Add(i.ToString());
+ startPoint.Items.Add(i.ToString());
}
- cb_preview.SelectedIndex = 0;
+ startPoint.SelectedIndex = 0;
encodeQueue.EncodeStarted += this.EncodeQueueEncodeStarted;
encodeQueue.EncodeCompleted += this.EncodeQueueEncodeEnded;
}
- #region Delegates
- /// <summary>
- /// Update UI Delegate
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private delegate void UpdateUiHandler(object sender, EventArgs e);
-
- /// <summary>
- /// The Open Movie Handler
- /// </summary>
- private delegate void OpenMovieHandler();
- #endregion
-
#region Event Handlers
/// <summary>
/// The encode has started
@@ -157,14 +115,10 @@ namespace Handbrake
return;
}
- ProgressBarStatus.Visible = false;
- lbl_encodeStatus.Visible = false;
-
- if (!this.noQt)
- btn_playQT.Enabled = true;
- btn_playVLC.Enabled = true;
-
+ btn_play.Enabled = true;
this.Text = this.Text.Replace(" (Encoding)", string.Empty);
+ progressBar.Value = 0;
+ lbl_progress.Text = "0.00%";
// Get the sample filename
if (this.mainWindow.text_destination.Text != string.Empty)
@@ -172,11 +126,7 @@ namespace Handbrake
this.mainWindow.text_destination.Text.Replace(".mp4", "_sample.mp4").Replace(".m4v", "_sample.m4v").
Replace(".mkv", "_sample.mkv");
- // Play back in QT or VLC
- if (!playWithVlc)
- Play();
- else
- PlayVlc();
+ this.Play();
}
catch (Exception exc)
{
@@ -201,109 +151,14 @@ namespace Handbrake
return;
}
- lbl_encodeStatus.Text = e.PercentComplete + "%";
- ProgressBarStatus.Value = (int)Math.Round(e.PercentComplete);
+ lbl_progress.Text = e.PercentComplete + "%";
+ progressBar.Value = (int)Math.Round(e.PercentComplete);
}
#endregion
#region Encode Sample
/// <summary>
- /// Play with VLC
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void PlayVlcClick(object sender, EventArgs e)
- {
- ProgressBarStatus.Visible = true;
- ProgressBarStatus.Value = 0;
- lbl_encodeStatus.Visible = true;
- playWithVlc = true;
- this.panel1.Visible = false;
-
- try
- {
- if (!this.noQt)
- QTControl.URL = string.Empty;
-
- if (File.Exists(this.currentlyPlaying))
- File.Delete(this.currentlyPlaying);
- }
- catch (Exception)
- {
- MessageBox.Show(this, "Unable to delete previous preview file. You may need to restart the application.",
- "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
-
- btn_playQT.Enabled = false;
- btn_playVLC.Enabled = false;
- this.Text += " (Encoding)";
- int duration;
- int.TryParse(cb_duration.Text, out duration);
- string query = QueryGenerator.GeneratePreviewQuery(this.mainWindow, duration, cb_preview.Text);
- ThreadPool.QueueUserWorkItem(this.CreatePreview, query);
- }
-
- /// <summary>
- /// Encode and Play with QT
- /// </summary>
- /// <param name="sender">
- /// The sender.
- /// </param>
- /// <param name="e">
- /// The e.
- /// </param>
- private void PlayQtClick(object sender, EventArgs e)
- {
- playWithVlc = false;
- this.panel1.Visible = true;
- if (this.noQt)
- {
- MessageBox.Show(this,
- "It would appear QuickTime 7 is not installed or not accessible. Please (re)install QuickTime.",
- "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- return;
- }
- if (this.mainWindow.text_destination.Text.Contains(".mkv"))
- {
- MessageBox.Show(this,
- "The QuickTime Control does not support MKV files, It is recommended you use the VLC option instead.",
- "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
- }
- else
- {
- ProgressBarStatus.Visible = true;
- ProgressBarStatus.Value = 0;
- lbl_encodeStatus.Visible = true;
- try
- {
- QTControl.URL = string.Empty;
- if (File.Exists(this.currentlyPlaying))
- File.Delete(this.currentlyPlaying);
- }
- catch (Exception)
- {
- MessageBox.Show(this,
- "Unable to delete previous preview file. You may need to restart the application.",
- "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
-
- btn_playQT.Enabled = false;
- btn_playVLC.Enabled = false;
- this.Text += " (Encoding)";
- int duration;
- int.TryParse(cb_duration.Text, out duration);
- string query = QueryGenerator.GeneratePreviewQuery(this.mainWindow, duration, cb_preview.Text);
-
- ThreadPool.QueueUserWorkItem(this.CreatePreview, query);
- }
- }
-
- /// <summary>
/// Create the Preview.
/// </summary>
/// <param name="state">
@@ -332,19 +187,32 @@ namespace Handbrake
#region Playback
- /// <summary>
- /// Play the video back in the QuickTime control
- /// </summary>
- private void Play()
+ private void btn_play_Click(object sender, EventArgs e)
{
- this.player = new Thread(OpenMovie) { IsBackground = true };
- this.player.Start();
+ try
+ {
+ btn_play.Enabled = false;
+ if (File.Exists(this.currentlyPlaying))
+ File.Delete(this.currentlyPlaying);
+ }
+ catch (Exception)
+ {
+ btn_play.Enabled = true;
+ MessageBox.Show(this, "Unable to delete previous preview file. You may need to restart the application.",
+ "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+
+ this.Text += " (Encoding)";
+ int duration;
+ int.TryParse(endPoint.Text, out duration);
+ string query = QueryGenerator.GeneratePreviewQuery(this.mainWindow, duration, startPoint.Text);
+ ThreadPool.QueueUserWorkItem(this.CreatePreview, query);
}
/// <summary>
/// Play the video back in an external VLC Player
/// </summary>
- private void PlayVlc()
+ private void Play()
{
// Launch VLC and Play video.
if (this.currentlyPlaying != string.Empty)
@@ -360,10 +228,7 @@ namespace Handbrake
else
vlcPath = Environment.GetEnvironmentVariable("ProgramFiles");
- vlcPath = vlcPath != null
- ? vlcPath + @"\VideoLAN\VLC\vlc.exe"
- : @"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe";
-
+
if (!File.Exists(Properties.Settings.Default.VLC_Path))
{
if (File.Exists(vlcPath))
@@ -393,38 +258,6 @@ namespace Handbrake
}
}
- /// <summary>
- /// QT control - Open the file
- /// </summary>
- [STAThread]
- private void OpenMovie()
- {
- try
- {
- if (InvokeRequired)
- {
- BeginInvoke(new OpenMovieHandler(OpenMovie));
- return;
- }
- QTControl.URL = this.currentlyPlaying;
- QTControl.SetSizing(QTSizingModeEnum.qtControlFitsMovie, true);
- QTControl.URL = this.currentlyPlaying;
- QTControl.Show();
-
- this.ClientSize = QTControl.Size;
- this.Height += toolBar.Height;
- }
- catch (COMException ex)
- {
- QTUtils qtu = new QTUtils();
- Main.ShowExceptiowWindow("Unable to open movie.", ex + Environment.NewLine + qtu.QTErrorFromErrorCode(ex.ErrorCode));
- }
- catch (Exception ex)
- {
- Main.ShowExceptiowWindow("Unable to open movie.", ex.ToString());
- }
- }
-
#endregion
/// <summary>
diff --git a/win/CS/frmPreview.resx b/win/CS/frmPreview.resx
index 85ca67137..75cb7c234 100644
--- a/win/CS/frmPreview.resx
+++ b/win/CS/frmPreview.resx
@@ -112,24 +112,12 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="toolBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>17, 17</value>
- </metadata>
- <data name="QTControl.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>
- AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
- LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFTeXN0
- ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAVQAAAAIB
- AAAAAQAAAAAAAAAAAAAAAEAAAAAACAAAnQYAAHEHAAATAA8AAIATAAAAAAADAAAAAAALAP//AwAAAAAA
- CAACAAAAAAAIAAIAAAAAAAgAAgAAAAAACw==
-</value>
- </data>
- <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+ <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAYAMDAAAAEACACoDgAAZgAAACAgAAABAAgAqAgAAA4PAAAQEAAAAQAIAGgFAAC2FwAAMDAAAAEA
diff --git a/win/CS/libraries/AxInterop.QTOControlLib.dll b/win/CS/libraries/AxInterop.QTOControlLib.dll
deleted file mode 100644
index 74b6e09e6..000000000
--- a/win/CS/libraries/AxInterop.QTOControlLib.dll
+++ /dev/null
Binary files differ