diff options
Diffstat (limited to 'win')
19 files changed, 216 insertions, 232 deletions
diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index 6bfef3cca..c25d86cb9 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -22,6 +22,7 @@ namespace Handbrake.Controls using HandBrake.ApplicationServices.Parsing;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
+ using HandBrake.Interop.Model.Encoding;
using Handbrake.ToolWindows;
@@ -128,19 +129,19 @@ namespace Handbrake.Controls string oldval = drp_audioEncoder.Text;
drp_audioEncoder.Items.Clear();
- drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.Faac));
- drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.ffaac));
- drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.AacPassthru));
- drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.Lame));
- drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.Mp3Passthru));
- drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.Ac3Passthrough));
- drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.Ac3));
- drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.DtsPassthrough));
- drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.DtsHDPassthrough));
+ drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDisplay(AudioEncoder.Faac));
+ drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDisplay(AudioEncoder.ffaac));
+ drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDisplay(AudioEncoder.AacPassthru));
+ drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDisplay(AudioEncoder.Lame));
+ drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDisplay(AudioEncoder.Mp3Passthru));
+ drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDisplay(AudioEncoder.Ac3Passthrough));
+ drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDisplay(AudioEncoder.Ac3));
+ drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDisplay(AudioEncoder.DtsPassthrough));
+ drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDisplay(AudioEncoder.DtsHDPassthrough));
if (path.Contains("MKV"))
{
- drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDescription(AudioEncoder.Vorbis));
+ drp_audioEncoder.Items.Add(EnumHelper<AudioEncoder>.GetDisplay(AudioEncoder.Vorbis));
}
if (!drp_audioEncoder.Text.Contains(oldval))
@@ -174,7 +175,7 @@ namespace Handbrake.Controls if (track.Encoder == AudioEncoder.Ac3Passthrough || track.Encoder == AudioEncoder.DtsPassthrough ||
track.Encoder == AudioEncoder.DtsHDPassthrough || track.Encoder == AudioEncoder.AacPassthru || track.Encoder == AudioEncoder.Mp3Passthru)
{
- track.MixDown = HandBrake.ApplicationServices.Model.Encoding.Mixdown.Passthrough;
+ track.MixDown = HandBrake.Interop.Model.Encoding.Mixdown.Passthrough;
track.Bitrate = 0;
}
@@ -271,12 +272,12 @@ namespace Handbrake.Controls if (this.IsIncompatiblePassthru(track))
{
AudioEncoder encoder = GetCompatiblePassthru(track);
- drp_audioEncoder.SelectedItem = EnumHelper<AudioEncoder>.GetDescription(encoder);
+ drp_audioEncoder.SelectedItem = EnumHelper<AudioEncoder>.GetDisplay(encoder);
}
}
break;
case "drp_audioEncoder":
- SetMixDown(EnumHelper<Mixdown>.GetDescription(track.MixDown));
+ SetMixDown(EnumHelper<Mixdown>.GetDisplay(track.MixDown));
// Configure the widgets with values
if (drp_audioEncoder.Text.Contains(Passthru))
@@ -297,7 +298,7 @@ namespace Handbrake.Controls if (this.IsIncompatiblePassthru(track))
{
AudioEncoder encoder = GetCompatiblePassthru(track);
- drp_audioEncoder.SelectedItem = EnumHelper<AudioEncoder>.GetDescription(encoder);
+ drp_audioEncoder.SelectedItem = EnumHelper<AudioEncoder>.GetDisplay(encoder);
}
break;
case "drp_audioMix":
@@ -345,8 +346,8 @@ namespace Handbrake.Controls if (track != null)
{
drp_audioTrack.SelectedItem = track.ScannedTrack;
- drp_audioEncoder.SelectedItem = EnumHelper<AudioEncoder>.GetDescription(track.Encoder);
- drp_audioMix.SelectedItem = EnumHelper<Mixdown>.GetDescription(track.MixDown);
+ drp_audioEncoder.SelectedItem = EnumHelper<AudioEncoder>.GetDisplay(track.Encoder);
+ drp_audioMix.SelectedItem = EnumHelper<Mixdown>.GetDisplay(track.MixDown);
drp_audioSample.SelectedItem = track.SampleRateDisplayValue;
drp_audioBitrate.SelectedItem = track.BitRateDisplayValue;
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs b/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs index ba6331fcf..fac4dd17c 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/Converters.cs @@ -10,8 +10,6 @@ namespace HandBrake.ApplicationServices.Functions using HandBrake.Interop.Model.Encoding;
- using AudioEncoder = HandBrake.ApplicationServices.Model.Encoding.AudioEncoder;
- using Mixdown = HandBrake.ApplicationServices.Model.Encoding.Mixdown;
using OutputFormat = HandBrake.ApplicationServices.Model.Encoding.OutputFormat;
/// <summary>
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs b/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs index 53d7f6069..ad565f0b7 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/EnumHelper.cs @@ -41,7 +41,7 @@ namespace HandBrake.ApplicationServices.Functions /// </summary>
/// <param name="value">An Enum with Display Attributes</param>
/// <returns>A string name</returns>
- public static string GetDisplayValue(T value)
+ public static string GetDisplay(T value)
{
FieldInfo fieldInfo = value.GetType().GetField(value.ToString());
DisplayAttribute[] attributes = (DisplayAttribute[])fieldInfo.GetCustomAttributes(typeof(DisplayAttribute), false);
@@ -59,7 +59,8 @@ namespace HandBrake.ApplicationServices.Functions foreach (T val in Enum.GetValues(typeof(T)))
{
string currDescription = GetDescription(val);
- if (currDescription == description)
+ string currDisplay = GetDisplay(val);
+ if (currDescription == description || currDisplay == description)
{
return val;
}
diff --git a/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs b/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs index da7303c01..62fe16120 100644 --- a/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs +++ b/win/CS/HandBrake.ApplicationServices/Functions/InteropModelCreator.cs @@ -46,12 +46,18 @@ namespace HandBrake.ApplicationServices.Functions // Which will be converted to this EncodeJob Model.
EncodeJob job = new EncodeJob();
+
+
+
+
+
EncodingProfile profile = new EncodingProfile();
job.EncodingProfile = profile;
profile.Anamorphic = work.Anamorphic;
profile.AudioEncodings = new List<AudioEncoding>();
+ job.ChosenAudioTracks = new List<int>();
foreach (AudioTrack track in work.AudioTracks)
{
AudioEncoding newTrack = new AudioEncoding
@@ -59,16 +65,19 @@ namespace HandBrake.ApplicationServices.Functions Bitrate = track.Bitrate,
Drc = track.DRC,
Gain = track.Gain,
- //Encoder = track.Encoder,
- // InputNumber = track.Track,
- //Mixdown = track.MixDown,
- //SampleRateRaw = track.SampleRate
+ Encoder = track.Encoder,
+ InputNumber = track.Track.HasValue ? track.Track.Value : 0,
+ Mixdown = track.MixDown,
+ SampleRateRaw = GetSampleRateRaw(track.SampleRate),
};
profile.AudioEncodings.Add(newTrack);
+ if (track.Track != null)
+ {
+ job.ChosenAudioTracks.Add(track.Track.Value);
+ }
}
-
- profile.Cropping = new HandBrake.Interop.Model.Cropping
+ profile.Cropping = new Cropping
{
Top = work.Cropping.Top,
Bottom = work.Cropping.Bottom,
@@ -117,34 +126,17 @@ namespace HandBrake.ApplicationServices.Functions switch (work.OutputFormat)
{
case OutputFormat.Mp4:
- profile.PreferredExtension = Interop.Model.Encoding.OutputExtension.Mp4;
+ profile.PreferredExtension = OutputExtension.Mp4;
break;
case OutputFormat.M4V:
- profile.PreferredExtension = Interop.Model.Encoding.OutputExtension.M4v;
+ profile.PreferredExtension = OutputExtension.M4v;
break;
}
profile.Quality = work.Quality.HasValue ? work.Quality.Value : 0;
profile.UseDisplayWidth = true;
profile.VideoBitrate = work.VideoBitrate.HasValue ? work.VideoBitrate.Value : 0;
profile.VideoEncodeRateType = work.VideoEncodeRateType;
-
- switch (work.VideoEncoder)
- {
- case VideoEncoder.X264:
- profile.VideoEncoder = Interop.Model.Encoding.VideoEncoder.X264;
- break;
- case VideoEncoder.FFMpeg:
- profile.VideoEncoder = Interop.Model.Encoding.VideoEncoder.FFMpeg;
- break;
- case VideoEncoder.FFMpeg2:
- profile.VideoEncoder = Interop.Model.Encoding.VideoEncoder.FFMpeg; // TODO Fix This.
- break;
- case VideoEncoder.Theora:
- profile.VideoEncoder = Interop.Model.Encoding.VideoEncoder.Theora;
- break;
-
- }
-
+ profile.VideoEncoder = work.VideoEncoder;
profile.Width = work.Width.HasValue ? work.Width.Value : 0;
profile.X264Options = work.AdvancedEncoderOptions;
@@ -162,6 +154,9 @@ namespace HandBrake.ApplicationServices.Functions job.FramesStart = work.StartPoint;
}
+ job.CustomChapterNames = work.ChapterNames;
+ job.UseDefaultChapterNames = work.IncludeChapterMarkers;
+
job.OutputPath = work.Destination;
switch (work.PointToPointMode)
{
@@ -186,14 +181,38 @@ namespace HandBrake.ApplicationServices.Functions job.SourcePath = work.Source;
// job.SourceType = work.Type;
job.Title = work.Title;
+
+ // TODO Setup subtitles
job.Subtitles = new Subtitles { SourceSubtitles = new List<SourceSubtitle>(), SrtSubtitles = new List<SrtSubtitle>() };
- foreach (SubtitleTrack track in work.SubtitleTracks)
- {
- // TODO
- }
+ //foreach (SubtitleTrack track in work.SubtitleTracks)
+ //{
+ // // TODO
+ //}
return job;
}
+
+ /// <summary>
+ /// Get the Raw Sample Rate
+ /// </summary>
+ /// <param name="rate">
+ /// The rate.
+ /// </param>
+ /// <returns>
+ /// The Raw sample rate as an int
+ /// </returns>
+ private static int GetSampleRateRaw(double rate)
+ {
+ if (rate == 22.05)
+ return 22050;
+ else if (rate == 24)
+ return 24000;
+ else if (rate == 44.1)
+ return 32000;
+ else if (rate == 48)
+ return 48000;
+ else return 48000;
+ }
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj index f9600e3fd..412719085 100644 --- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj +++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj @@ -96,9 +96,7 @@ <Compile Include="Functions\Win7.cs" />
<Compile Include="Model\DriveInformation.cs" />
<Compile Include="Model\Encoding\AudioTrack.cs" />
- <Compile Include="Model\Encoding\AudioEncoder.cs" />
<Compile Include="Model\Encoding\FramerateMode.cs" />
- <Compile Include="Model\Encoding\Mixdown.cs" />
<Compile Include="Model\Encoding\PointToPointMode.cs" />
<Compile Include="Model\EncodeTask.cs" />
<Compile Include="Model\Encoding\OutputFormat.cs" />
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioEncoder.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioEncoder.cs deleted file mode 100644 index 6dfff1076..000000000 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioEncoder.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* AudioEncoder.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
-
-namespace HandBrake.ApplicationServices.Model.Encoding
-{
- using System.ComponentModel;
-
- using HandBrake.ApplicationServices.Converters;
-
- [TypeConverter(typeof(EnumToDescConveter))]
- public enum AudioEncoder
- {
- [Description("AAC (faac)")]
- Faac = 0,
-
- [Description("AAC (ffmpeg)")]
- ffaac,
-
- [Description("MP3 (lame)")]
- Lame,
-
- [Description("AC3 (ffmpeg)")]
- Ac3,
-
- [Description("Passthru")]
- Passthrough,
-
- [Description("AC3 Passthru")]
- Ac3Passthrough,
-
- [Description("DTS Passthru")]
- DtsPassthrough,
-
- [Description("DTS-HD Passthru")]
- DtsHDPassthrough,
-
- [Description("AAC Passthru")]
- AacPassthru,
-
- [Description("MP3 Passthru")]
- Mp3Passthru,
-
- [Description("Vorbis (vorbis)")]
- Vorbis
- }
-}
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs index a6e83735b..6fcc57e2a 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs @@ -9,6 +9,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding using System.ComponentModel;
using HandBrake.ApplicationServices.Parsing;
+ using HandBrake.Interop.Model.Encoding;
/// <summary>
/// An Audio Track for the Audio Panel
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/Mixdown.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/Mixdown.cs deleted file mode 100644 index d2e13e52e..000000000 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/Mixdown.cs +++ /dev/null @@ -1,39 +0,0 @@ -/* Mixdown.cs $
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr>.
- It may be used under the terms of the GNU General Public License. */
-
-namespace HandBrake.ApplicationServices.Model.Encoding
-{
- using System.ComponentModel;
-
- using HandBrake.ApplicationServices.Converters;
-
- /// <summary>
- /// The Mixdown Mode
- /// </summary>
- [TypeConverter(typeof(EnumToDescConveter))]
- public enum Mixdown
- {
- [Description("Dolby Pro Logic II")]
- DolbyProLogicII = 0,
-
- [Description("Auto")]
- Auto,
-
- [Description("Mono")]
- Mono,
-
- [Description("Stereo")]
- Stereo,
-
- [Description("Dolby Surround")]
- DolbySurround,
-
- [Description("6 Channel Discrete")]
- SixChannelDiscrete,
-
- [Description("Passthru")]
- Passthrough,
- }
-}
diff --git a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs b/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs index cee9ad36f..245a3171d 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs @@ -5,18 +5,17 @@ namespace HandBrake.ApplicationServices.Model
{
- using System;
+ using HandBrake.ApplicationServices.Utilities;
/// <summary>
/// The QueueTask.
/// </summary>
public class QueueTask
{
- /*
- * TODO
- * - Update the Query property to generate the query from the EncodeTask object.
- * - Remove Sourcee, Destination and Title when they are no longer used.
- */
+ /// <summary>
+ /// The Encode task backing field.
+ /// </summary>
+ private EncodeTask task;
/// <summary>
/// Initializes a new instance of the <see cref="QueueTask"/> class.
@@ -72,9 +71,20 @@ namespace HandBrake.ApplicationServices.Model public QueueItemStatus Status { get; set; }
/// <summary>
- /// Gets or sets the Encode Task.
+ /// Gets the Encode Task.
/// </summary>
- public EncodeTask Task { get; set; }
+ public EncodeTask Task
+ {
+ get
+ {
+ if (this.task == null)
+ {
+ task = QueryParserUtility.Parse(this.Query);
+ }
+
+ return this.task;
+ }
+ }
/// <summary>
/// Gets a value indicating whether or not this instance is empty.
diff --git a/win/CS/HandBrake.ApplicationServices/ServiceManager.cs b/win/CS/HandBrake.ApplicationServices/ServiceManager.cs index 06b4422e2..e0ad65ae5 100644 --- a/win/CS/HandBrake.ApplicationServices/ServiceManager.cs +++ b/win/CS/HandBrake.ApplicationServices/ServiceManager.cs @@ -2,6 +2,7 @@ {
using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Services.Interfaces;
+ using HandBrake.Interop;
/// <summary>
/// Tempory Class which manages services until Windosor is added back into the project to handle it for us.
@@ -14,6 +15,11 @@ private static IUserSettingService userSettingService;
/// <summary>
+ /// The Backing field for HandBrake Instance.
+ /// </summary>
+ private static HandBrakeInstance handBrakeInstance;
+
+ /// <summary>
/// Gets UserSettingService.
/// </summary>
public static IUserSettingService UserSettingService
@@ -23,5 +29,16 @@ return userSettingService ?? (userSettingService = new UserSettingService());
}
}
+
+ /// <summary>
+ /// Gets HandBrakeInstance.
+ /// </summary>
+ public static HandBrakeInstance HandBrakeInstance
+ {
+ get
+ {
+ return handBrakeInstance ?? (handBrakeInstance = new HandBrakeInstance());
+ }
+ }
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs index 57f4b18fd..99e8be748 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibEncode.cs @@ -7,8 +7,6 @@ namespace HandBrake.ApplicationServices.Services {
using System;
using System.Diagnostics;
- using System.Text;
- using System.Threading;
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
@@ -60,7 +58,7 @@ namespace HandBrake.ApplicationServices.Services public LibEncode()
{
// Setup the HandBrake Instance
- this.instance = new HandBrakeInstance();
+ this.instance = ServiceManager.HandBrakeInstance;
this.instance.EncodeCompleted += this.InstanceEncodeCompleted;
this.instance.EncodeProgress += this.InstanceEncodeProgress;
@@ -81,8 +79,6 @@ namespace HandBrake.ApplicationServices.Services /// </param>
public void Start(QueueTask job, bool enableLogging)
{
- throw new NotImplementedException("This Method has not been completed yet");
-
this.startTime = DateTime.Now;
this.loggingEnabled = enableLogging;
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs index 33459a0dd..3e2e166ce 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs @@ -59,7 +59,7 @@ namespace HandBrake.ApplicationServices.Services {
logging = new StringBuilder();
- instance = new HandBrakeInstance();
+ instance = ServiceManager.HandBrakeInstance;
instance.Initialize(1);
instance.ScanProgress += this.InstanceScanProgress;
instance.ScanCompleted += this.InstanceScanCompleted;
diff --git a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs index 91667debe..e9342ca4e 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/QueueProcessor.cs @@ -7,6 +7,7 @@ namespace HandBrake.ApplicationServices.Services {
using System;
using System.Diagnostics;
+ using System.IO;
using System.Windows.Forms;
using HandBrake.ApplicationServices.EventArgs;
@@ -62,7 +63,7 @@ namespace HandBrake.ApplicationServices.Services /// </param>
public QueueProcessor(int instanceId)
{
- this.EncodeService = new Encode();
+ this.EncodeService = File.Exists("hb.dll") ? (IEncode)new LibEncode() : new Encode();
this.QueueManager = new QueueManager(instanceId);
}
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs index e0152489f..30b752d7d 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs @@ -559,7 +559,7 @@ namespace HandBrake.ApplicationServices.Utilities // Video Settings
AddEncodeElement(xmlWriter, "VideoAvgBitrate", "string", parsed.VideoBitrate.ToString());
- AddEncodeElement(xmlWriter, "VideoEncoder", "string", EnumHelper<VideoEncoder>.GetDisplayValue(parsed.VideoEncoder));
+ AddEncodeElement(xmlWriter, "VideoEncoder", "string", EnumHelper<VideoEncoder>.GetDisplay(parsed.VideoEncoder));
AddEncodeElement(xmlWriter, "VideoFramerate", "string", parsed.Framerate.ToString());
AddEncodeElement(xmlWriter, "VideFrameratePFR", "integer", parsed.FramerateMode == FramerateMode.PFR ? "1" : "0");
AddEncodeElement(xmlWriter, "VideoGrayScale", "integer", parsed.Grayscale ? "1" : "0");
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index bd923ff67..9835603cd 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -15,9 +15,6 @@ namespace HandBrake.ApplicationServices.Utilities using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.Interop.Model.Encoding;
- using AudioEncoder = HandBrake.ApplicationServices.Model.Encoding.AudioEncoder;
- using Mixdown = HandBrake.ApplicationServices.Model.Encoding.Mixdown;
-
/*
* TODO:
* 1. Handle Subittles
diff --git a/win/CS/frmMain.Designer.cs b/win/CS/frmMain.Designer.cs index dd2114e53..d7df5ccae 100644 --- a/win/CS/frmMain.Designer.cs +++ b/win/CS/frmMain.Designer.cs @@ -98,6 +98,7 @@ namespace Handbrake this.Label47 = new System.Windows.Forms.Label();
this.Label3 = new System.Windows.Forms.Label();
this.tab_audio = new System.Windows.Forms.TabPage();
+ this.AudioSettings = new Handbrake.Controls.AudioPanel();
this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);
this.tab_video = new System.Windows.Forms.TabPage();
this.panel1 = new System.Windows.Forms.Panel();
@@ -108,13 +109,18 @@ namespace Handbrake this.lbl_SliderValue = new System.Windows.Forms.Label();
this.lbl_framerate = new System.Windows.Forms.Label();
this.tab_picture = new System.Windows.Forms.TabPage();
+ this.PictureSettings = new Handbrake.Controls.PictureSettings();
this.Check_ChapterMarkers = new System.Windows.Forms.CheckBox();
this.tabs_panel = new System.Windows.Forms.TabControl();
this.tab_filters = new System.Windows.Forms.TabPage();
+ this.Filters = new Handbrake.Controls.Filters();
this.tab_subtitles = new System.Windows.Forms.TabPage();
+ this.Subtitles = new Handbrake.Controls.Subtitles();
this.tab_chapters = new System.Windows.Forms.TabPage();
this.label31 = new System.Windows.Forms.Label();
this.tab_advanced = new System.Windows.Forms.TabPage();
+ this.advancedEncoderOpts = new Handbrake.Controls.AdvancedEncoderOpts();
+ this.x264Panel = new Handbrake.Controls.x264Panel();
this.tab_query = new System.Windows.Forms.TabPage();
this.btn_clear = new System.Windows.Forms.Button();
this.label34 = new System.Windows.Forms.Label();
@@ -178,12 +184,7 @@ namespace Handbrake this.SourceLayoutPanel = new System.Windows.Forms.FlowLayoutPanel();
this.openPreset = new System.Windows.Forms.OpenFileDialog();
this.File_ChapterImport = new System.Windows.Forms.OpenFileDialog();
- this.PictureSettings = new Handbrake.Controls.PictureSettings();
- this.Filters = new Handbrake.Controls.Filters();
- this.AudioSettings = new Handbrake.Controls.AudioPanel();
- this.Subtitles = new Handbrake.Controls.Subtitles();
- this.advancedEncoderOpts = new Handbrake.Controls.AdvancedEncoderOpts();
- this.x264Panel = new Handbrake.Controls.x264Panel();
+ this.lbl_libhb_warning = new System.Windows.Forms.ToolStripStatusLabel();
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
notifyIconMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();
@@ -822,6 +823,16 @@ namespace Handbrake this.tab_audio.Text = "Audio";
this.tab_audio.UseVisualStyleBackColor = true;
//
+ // AudioSettings
+ //
+ this.AudioSettings.BackColor = System.Drawing.Color.Transparent;
+ this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.AudioSettings.Location = new System.Drawing.Point(0, 0);
+ this.AudioSettings.Name = "AudioSettings";
+ this.AudioSettings.ScannedTracks = ((System.ComponentModel.BindingList<HandBrake.ApplicationServices.Parsing.Audio>)(resources.GetObject("AudioSettings.ScannedTracks")));
+ this.AudioSettings.Size = new System.Drawing.Size(720, 310);
+ this.AudioSettings.TabIndex = 0;
+ //
// AudioMenuRowHeightHack
//
this.AudioMenuRowHeightHack.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
@@ -941,6 +952,18 @@ namespace Handbrake this.tab_picture.Text = "Picture";
this.tab_picture.UseVisualStyleBackColor = true;
//
+ // PictureSettings
+ //
+ this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
+ this.PictureSettings.CurrentlySelectedPreset = null;
+ this.PictureSettings.Enabled = false;
+ this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.PictureSettings.Location = new System.Drawing.Point(0, 0);
+ this.PictureSettings.Name = "PictureSettings";
+ this.PictureSettings.PresetMaximumResolution = new System.Drawing.Size(0, 0);
+ this.PictureSettings.Size = new System.Drawing.Size(666, 279);
+ this.PictureSettings.TabIndex = 0;
+ //
// Check_ChapterMarkers
//
this.Check_ChapterMarkers.AutoSize = true;
@@ -979,6 +1002,15 @@ namespace Handbrake this.tab_filters.Text = "Video Filters";
this.tab_filters.UseVisualStyleBackColor = true;
//
+ // Filters
+ //
+ this.Filters.BackColor = System.Drawing.Color.Transparent;
+ this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Filters.Location = new System.Drawing.Point(0, 0);
+ this.Filters.Name = "Filters";
+ this.Filters.Size = new System.Drawing.Size(713, 310);
+ this.Filters.TabIndex = 0;
+ //
// tab_subtitles
//
this.tab_subtitles.Controls.Add(this.Subtitles);
@@ -990,6 +1022,15 @@ namespace Handbrake this.tab_subtitles.Text = "Subtitles";
this.tab_subtitles.UseVisualStyleBackColor = true;
//
+ // Subtitles
+ //
+ this.Subtitles.BackColor = System.Drawing.Color.Transparent;
+ this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Subtitles.Location = new System.Drawing.Point(0, 0);
+ this.Subtitles.Name = "Subtitles";
+ this.Subtitles.Size = new System.Drawing.Size(722, 310);
+ this.Subtitles.TabIndex = 0;
+ //
// tab_chapters
//
this.tab_chapters.BackColor = System.Drawing.Color.Transparent;
@@ -1029,6 +1070,26 @@ namespace Handbrake this.tab_advanced.Text = "Advanced";
this.tab_advanced.UseVisualStyleBackColor = true;
//
+ // advancedEncoderOpts
+ //
+ this.advancedEncoderOpts.AdavancedQuery = "";
+ this.advancedEncoderOpts.BackColor = System.Drawing.Color.Transparent;
+ this.advancedEncoderOpts.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.advancedEncoderOpts.Location = new System.Drawing.Point(0, 0);
+ this.advancedEncoderOpts.Name = "advancedEncoderOpts";
+ this.advancedEncoderOpts.Size = new System.Drawing.Size(720, 209);
+ this.advancedEncoderOpts.TabIndex = 1;
+ //
+ // x264Panel
+ //
+ this.x264Panel.BackColor = System.Drawing.Color.Transparent;
+ this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.x264Panel.Location = new System.Drawing.Point(0, 0);
+ this.x264Panel.Name = "x264Panel";
+ this.x264Panel.Size = new System.Drawing.Size(720, 306);
+ this.x264Panel.TabIndex = 0;
+ this.x264Panel.X264Query = "";
+ //
// tab_query
//
this.tab_query.Controls.Add(this.btn_clear);
@@ -1459,7 +1520,8 @@ namespace Handbrake this.StatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ProgressBarStatus,
this.lbl_encode,
- this.lbl_updateCheck});
+ this.lbl_updateCheck,
+ this.lbl_libhb_warning});
this.StatusStrip.Location = new System.Drawing.Point(0, 561);
this.StatusStrip.Name = "StatusStrip";
this.StatusStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
@@ -1707,64 +1769,13 @@ namespace Handbrake //
this.File_ChapterImport.Filter = "CSV Files|*.csv";
//
- // PictureSettings
- //
- this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
- this.PictureSettings.CurrentlySelectedPreset = null;
- this.PictureSettings.Enabled = false;
- this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.PictureSettings.Location = new System.Drawing.Point(0, 0);
- this.PictureSettings.Name = "PictureSettings";
- this.PictureSettings.PresetMaximumResolution = new System.Drawing.Size(0, 0);
- this.PictureSettings.Size = new System.Drawing.Size(666, 279);
- this.PictureSettings.TabIndex = 0;
- //
- // Filters
- //
- this.Filters.BackColor = System.Drawing.Color.Transparent;
- this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Filters.Location = new System.Drawing.Point(0, 0);
- this.Filters.Name = "Filters";
- this.Filters.Size = new System.Drawing.Size(713, 310);
- this.Filters.TabIndex = 0;
- //
- // AudioSettings
- //
- this.AudioSettings.BackColor = System.Drawing.Color.Transparent;
- this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.AudioSettings.Location = new System.Drawing.Point(0, 0);
- this.AudioSettings.Name = "AudioSettings";
- this.AudioSettings.Size = new System.Drawing.Size(720, 310);
- this.AudioSettings.TabIndex = 0;
- //
- // Subtitles
- //
- this.Subtitles.BackColor = System.Drawing.Color.Transparent;
- this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Subtitles.Location = new System.Drawing.Point(0, 0);
- this.Subtitles.Name = "Subtitles";
- this.Subtitles.Size = new System.Drawing.Size(722, 310);
- this.Subtitles.TabIndex = 0;
- //
- // advancedEncoderOpts
- //
- this.advancedEncoderOpts.AdavancedQuery = "";
- this.advancedEncoderOpts.BackColor = System.Drawing.Color.Transparent;
- this.advancedEncoderOpts.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.advancedEncoderOpts.Location = new System.Drawing.Point(0, 0);
- this.advancedEncoderOpts.Name = "advancedEncoderOpts";
- this.advancedEncoderOpts.Size = new System.Drawing.Size(720, 209);
- this.advancedEncoderOpts.TabIndex = 1;
- //
- // x264Panel
+ // lbl_libhb_warning
//
- this.x264Panel.BackColor = System.Drawing.Color.Transparent;
- this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.x264Panel.Location = new System.Drawing.Point(0, 0);
- this.x264Panel.Name = "x264Panel";
- this.x264Panel.Size = new System.Drawing.Size(720, 306);
- this.x264Panel.TabIndex = 0;
- this.x264Panel.X264Query = "";
+ this.lbl_libhb_warning.ForeColor = System.Drawing.Color.Red;
+ this.lbl_libhb_warning.Name = "lbl_libhb_warning";
+ this.lbl_libhb_warning.Size = new System.Drawing.Size(198, 17);
+ this.lbl_libhb_warning.Text = "Warning: Experimental LibHB in use!";
+ this.lbl_libhb_warning.Visible = false;
//
// frmMain
//
@@ -1982,5 +1993,6 @@ namespace Handbrake private ToolStripSplitButton btn_add2Queue;
private ToolStripMenuItem mnu_AddAllTitles;
private ToolStripMenuItem mnu_AddTittleRange;
+ private ToolStripStatusLabel lbl_libhb_warning;
}
}
\ No newline at end of file diff --git a/win/CS/frmMain.cs b/win/CS/frmMain.cs index 05515983c..9a2baa5d1 100644 --- a/win/CS/frmMain.cs +++ b/win/CS/frmMain.cs @@ -136,6 +136,7 @@ namespace Handbrake // We can use LibHB, if the library hb.dll exists.
this.SourceScan = File.Exists("hb.dll") ? (IScan)new LibScan() : new ScanService();
+ lbl_libhb_warning.Visible = File.Exists("hb.dll") ? true : false;
// Update the users config file with the CLI version data.
Main.SetCliVersionData();
diff --git a/win/CS/frmMain.resx b/win/CS/frmMain.resx index a737bb095..b2fb5efde 100644 --- a/win/CS/frmMain.resx +++ b/win/CS/frmMain.resx @@ -233,6 +233,33 @@ to make bitrate allocation decisions.</value> <metadata name="frmMainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>106, 15</value>
</metadata>
+ <data name="AudioSettings.ScannedTracks" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>
+ AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0
+ cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAACrAVN5c3RlbS5Db21wb25lbnRN
+ b2RlbC5CaW5kaW5nTGlzdGAxW1tIYW5kQnJha2UuQXBwbGljYXRpb25TZXJ2aWNlcy5QYXJzaW5nLkF1
+ ZGlvLCBIYW5kQnJha2UuQXBwbGljYXRpb25TZXJ2aWNlcywgVmVyc2lvbj0wLjkuNS40MjEzLCBDdWx0
+ dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGxdXQgAAAAJYWRkTmV3UG9zFnJhaXNlTGlzdENo
+ YW5nZWRFdmVudHMWcmFpc2VJdGVtQ2hhbmdlZEV2ZW50cwhhbGxvd05ldwlhbGxvd0VkaXQLYWxsb3dS
+ ZW1vdmUPdXNlclNldEFsbG93TmV3EkNvbGxlY3Rpb25gMStpdGVtcwAAAAAAAAADCAEBAQEBAakBU3lz
+ dGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tIYW5kQnJha2UuQXBwbGljYXRpb25TZXJ2aWNl
+ cy5QYXJzaW5nLkF1ZGlvLCBIYW5kQnJha2UuQXBwbGljYXRpb25TZXJ2aWNlcywgVmVyc2lvbj0wLjku
+ NS40MjEzLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGxdXQIAAAD/////AQABAQEA
+ CQMAAAAMBAAAAFdIYW5kQnJha2UuQXBwbGljYXRpb25TZXJ2aWNlcywgVmVyc2lvbj0wLjkuNS40MjEz
+ LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAwAAAKkBU3lzdGVtLkNvbGxlY3Rp
+ b25zLkdlbmVyaWMuTGlzdGAxW1tIYW5kQnJha2UuQXBwbGljYXRpb25TZXJ2aWNlcy5QYXJzaW5nLkF1
+ ZGlvLCBIYW5kQnJha2UuQXBwbGljYXRpb25TZXJ2aWNlcywgVmVyc2lvbj0wLjkuNS40MjEzLCBDdWx0
+ dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGxdXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9u
+ BAAALUhhbmRCcmFrZS5BcHBsaWNhdGlvblNlcnZpY2VzLlBhcnNpbmcuQXVkaW9bXQQAAAAICAkFAAAA
+ AQAAAAEAAAAHBQAAAAABAAAABAAAAAQrSGFuZEJyYWtlLkFwcGxpY2F0aW9uU2VydmljZXMuUGFyc2lu
+ Zy5BdWRpbwQAAAAJBgAAAA0DBQYAAAArSGFuZEJyYWtlLkFwcGxpY2F0aW9uU2VydmljZXMuUGFyc2lu
+ Zy5BdWRpbwcAAAAcPFRyYWNrTnVtYmVyPmtfX0JhY2tpbmdGaWVsZBk8TGFuZ3VhZ2U+a19fQmFja2lu
+ Z0ZpZWxkHTxMYW5ndWFnZUNvZGU+a19fQmFja2luZ0ZpZWxkHDxEZXNjcmlwdGlvbj5rX19CYWNraW5n
+ RmllbGQXPEZvcm1hdD5rX19CYWNraW5nRmllbGQbPFNhbXBsZVJhdGU+a19fQmFja2luZ0ZpZWxkGDxC
+ aXRyYXRlPmtfX0JhY2tpbmdGaWVsZAABAQEBAAAICAgEAAAAAAAAAAoKBgcAAAAKTm9uZSBGb3VuZAoA
+ AAAAAAAAAAs=
+</value>
+ </data>
<metadata name="AudioMenuRowHeightHack.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 54</value>
</metadata>
diff --git a/win/CS/frmQueue.cs b/win/CS/frmQueue.cs index d9902b52a..9feb556fc 100644 --- a/win/CS/frmQueue.cs +++ b/win/CS/frmQueue.cs @@ -9,24 +9,16 @@ namespace Handbrake using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
- using System.IO;
- using System.Linq;
using System.Windows.Forms;
- using Functions;
using HandBrake.ApplicationServices;
using HandBrake.ApplicationServices.Functions;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Model.Encoding;
- using HandBrake.ApplicationServices.Services;
using HandBrake.ApplicationServices.Services.Interfaces;
using HandBrake.ApplicationServices.Utilities;
using HandBrake.Interop.Model.Encoding;
- using Model;
-
- using AudioEncoder = HandBrake.ApplicationServices.Model.Encoding.AudioEncoder;
-
/// <summary>
/// The Queue Window
/// </summary>
@@ -363,7 +355,7 @@ namespace Handbrake item.SubItems.Add(chapters); // Chapters
item.SubItems.Add(queueItem.Source); // Source
item.SubItems.Add(queueItem.Destination); // Destination
- item.SubItems.Add(EnumHelper<VideoEncoder>.GetDisplayValue(parsed.VideoEncoder));
+ item.SubItems.Add(EnumHelper<VideoEncoder>.GetDisplay(parsed.VideoEncoder));
// Display The Audio Track Information
string audio = string.Empty;
@@ -451,7 +443,7 @@ namespace Handbrake lbl_source.Text = queue.QueueManager.LastProcessedJob.Source + "(Title: " + title + " Chapters: " + chapterlbl + ")";
lbl_dest.Text = queue.QueueManager.LastProcessedJob.Destination;
lbl_encodeOptions.Text = string.Format("Video: {0}, Audio: {1}\nx264 Options: {2}",
- EnumHelper<VideoEncoder>.GetDisplayValue(parsed.VideoEncoder),
+ EnumHelper<VideoEncoder>.GetDisplay(parsed.VideoEncoder),
audio,
parsed.AdvancedEncoderOptions);
|