diff options
Diffstat (limited to 'win')
9 files changed, 168 insertions, 124 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs index 6a09e5985..6a1a2d0fd 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeBase.cs @@ -304,7 +304,10 @@ namespace HandBrake.ApplicationServices.Services.Encode /// <param name="encodeQueueTask">
/// The encode QueueTask.
/// </param>
- protected void SetupLogging(QueueTask encodeQueueTask)
+ /// <param name="isLibhb">
+ /// Indicates if this is libhb that is encoding or not.
+ /// </param>
+ protected void SetupLogging(QueueTask encodeQueueTask, bool isLibhb)
{
this.ShutdownFileWriter();
string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";
@@ -315,7 +318,12 @@ namespace HandBrake.ApplicationServices.Services.Encode {
string query = QueryGeneratorUtility.GenerateQuery(new EncodeTask(encodeQueueTask.Task), encodeQueueTask.Configuration);
this.logBuffer = new StringBuilder();
- this.logBuffer.AppendLine(String.Format("CLI Query: {0}", query));
+
+ if (!isLibhb)
+ {
+ this.logBuffer.AppendLine(String.Format("CLI Query: {0}", query));
+ }
+
this.logBuffer.AppendLine();
// Clear the current Encode Logs)
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeService.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeService.cs index dad5b9597..2c59d1410 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/EncodeService.cs @@ -99,7 +99,7 @@ namespace HandBrake.ApplicationServices.Services.Encode {
try
{
- this.SetupLogging(this.currentTask);
+ this.SetupLogging(this.currentTask, false);
}
catch (Exception)
{
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs index 8a046e0af..6ae5d1f60 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs @@ -11,18 +11,18 @@ namespace HandBrake.ApplicationServices.Services.Encode {
using System;
using System.Diagnostics;
+ using System.Linq;
using HandBrake.ApplicationServices.Model;
using HandBrake.ApplicationServices.Services.Encode.Interfaces;
+ using HandBrake.ApplicationServices.Services.Scan;
+ using HandBrake.ApplicationServices.Services.Scan.Model;
using HandBrake.ApplicationServices.Utilities;
using HandBrake.Interop;
using HandBrake.Interop.EventArgs;
using HandBrake.Interop.Interfaces;
using HandBrake.Interop.Model;
- using EncodeCompletedEventArgs = HandBrake.ApplicationServices.Services.Encode.EventArgs.EncodeCompletedEventArgs;
- using EncodeProgressEventArgs = HandBrake.ApplicationServices.Services.Encode.EventArgs.EncodeProgressEventArgs;
-
/// <summary>
/// LibHB Implementation of IEncode
/// </summary>
@@ -55,6 +55,8 @@ namespace HandBrake.ApplicationServices.Services.Encode /// </summary>
private QueueTask currentTask;
+ private Source scannedSource;
+
#endregion
/// <summary>
@@ -117,7 +119,7 @@ namespace HandBrake.ApplicationServices.Services.Encode {
try
{
- this.SetupLogging(job);
+ this.SetupLogging(job, true);
}
catch (Exception)
{
@@ -135,12 +137,14 @@ namespace HandBrake.ApplicationServices.Services.Encode this.instance.ScanCompleted += delegate
{
+ // Process into internal structures.
+ this.scannedSource = new Source { Titles = LibScan.ConvertTitles(this.instance.Titles, this.instance.FeatureTitle) }; // TODO work around the bad Internal API.
this.ScanCompleted(job, this.instance);
};
}
catch (Exception exc)
{
- this.InvokeEncodeCompleted(new EncodeCompletedEventArgs(false, exc, "An Error has occured.", this.currentTask.Task.Destination));
+ this.InvokeEncodeCompleted(new EventArgs.EncodeCompletedEventArgs(false, exc, "An Error has occured.", this.currentTask.Task.Destination));
}
}
@@ -207,7 +211,16 @@ namespace HandBrake.ApplicationServices.Services.Encode EncodeJob encodeJob = InteropModelCreator.GetEncodeJob(job);
// Start the Encode
- instance.StartEncode(encodeJob, job.Configuration.PreviewScanCount);
+ Title title = this.scannedSource.Titles.FirstOrDefault(t => t.TitleNumber == job.Task.Title);
+ if (title == null)
+ {
+ throw new Exception("Unable to get title for encoding. Encode Failed.");
+ }
+
+ Interop.Model.Scan.Title scannedTitle = new Interop.Model.Scan.Title { Resolution = new Size(title.Resolution.Width, title.Resolution.Height), ParVal = new Size(title.ParVal.Width, title.ParVal.Height) };
+
+ // TODO fix this tempory hack to pass in the required title information into the factory.
+ instance.StartEncode(encodeJob, scannedTitle, job.Configuration.PreviewScanCount);
// Fire the Encode Started Event
this.InvokeEncodeStarted(System.EventArgs.Empty);
@@ -237,6 +250,7 @@ namespace HandBrake.ApplicationServices.Services.Encode }
#region HandBrakeInstance Event Handlers.
+
/// <summary>
/// Log a message
/// </summary>
@@ -286,16 +300,16 @@ namespace HandBrake.ApplicationServices.Services.Encode /// <param name="e">
/// The Interop.EncodeProgressEventArgs.
/// </param>
- private void InstanceEncodeProgress(object sender, Interop.EventArgs.EncodeProgressEventArgs e)
+ private void InstanceEncodeProgress(object sender, EncodeProgressEventArgs e)
{
- EncodeProgressEventArgs args = new EncodeProgressEventArgs
+ EventArgs.EncodeProgressEventArgs args = new EventArgs.EncodeProgressEventArgs
{
- AverageFrameRate = e.AverageFrameRate,
- CurrentFrameRate = e.CurrentFrameRate,
- EstimatedTimeLeft = e.EstimatedTimeLeft,
- PercentComplete = e.FractionComplete * 100,
- Task = e.Pass,
- ElapsedTime = DateTime.Now - this.startTime,
+ AverageFrameRate = e.AverageFrameRate,
+ CurrentFrameRate = e.CurrentFrameRate,
+ EstimatedTimeLeft = e.EstimatedTimeLeft,
+ PercentComplete = e.FractionComplete * 100,
+ Task = e.Pass,
+ ElapsedTime = DateTime.Now - this.startTime,
};
this.InvokeEncodeStatusChanged(args);
@@ -310,14 +324,14 @@ namespace HandBrake.ApplicationServices.Services.Encode /// <param name="e">
/// The e.
/// </param>
- private void InstanceEncodeCompleted(object sender, Interop.EventArgs.EncodeCompletedEventArgs e)
+ private void InstanceEncodeCompleted(object sender, EncodeCompletedEventArgs e)
{
this.IsEncoding = false;
this.InvokeEncodeCompleted(
e.Error
- ? new EncodeCompletedEventArgs(false, null, string.Empty, this.currentTask.Task.Destination)
- : new EncodeCompletedEventArgs(true, null, string.Empty, this.currentTask.Task.Destination));
+ ? new EventArgs.EncodeCompletedEventArgs(false, null, string.Empty, this.currentTask.Task.Destination)
+ : new EventArgs.EncodeCompletedEventArgs(true, null, string.Empty, this.currentTask.Task.Destination));
this.ShutdownFileWriter();
}
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs index 3666ce869..d857e75f5 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Scan/LibScan.cs @@ -469,7 +469,7 @@ namespace HandBrake.ApplicationServices.Services.Scan /// <returns>
/// The convert titles.
/// </returns>
- private static List<Title> ConvertTitles(IEnumerable<Interop.Model.Scan.Title> titles, int featureTitle)
+ internal static List<Title> ConvertTitles(IEnumerable<Interop.Model.Scan.Title> titles, int featureTitle)
{
List<Title> titleList = new List<Title>();
foreach (Interop.Model.Scan.Title title in titles)
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs index a8bf3db75..0ed007e53 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInstance.cs @@ -445,28 +445,46 @@ namespace HandBrake.Interop /// <param name="jobToStart">
/// The job to start.
/// </param>
+ /// <param name="title">
+ /// The title.
+ /// </param>
/// <param name="scanPreviewCount">
/// The scan Preview Count.
/// </param>
- public void StartEncode(EncodeJob jobToStart, int scanPreviewCount)
+ public void StartEncode(EncodeJob jobToStart, Title title, int scanPreviewCount)
{
- this.StartEncode(jobToStart, false, 0, 0, 0, scanPreviewCount);
+ this.StartEncode(jobToStart, title, false, 0, 0, 0, scanPreviewCount);
}
/// <summary>
/// Starts an encode with the given job.
/// </summary>
- /// <param name="job">The job to start.</param>
- /// <param name="preview">The scan Preview Count.</param>
- /// <param name="previewNumber">Preview Feature: Preview to encode</param>
- /// <param name="previewSeconds">Number of seconds to encode for the preview</param>
- /// <param name="overallSelectedLengthSeconds"></param>
- /// <param name="scanPreviewCount">Number of previews</param>
- public void StartEncode(EncodeJob job, bool preview, int previewNumber, int previewSeconds, double overallSelectedLengthSeconds, int scanPreviewCount)
+ /// <param name="job">
+ /// The job to start.
+ /// </param>
+ /// <param name="title">
+ /// The title.
+ /// </param>
+ /// <param name="preview">
+ /// The scan Preview Count.
+ /// </param>
+ /// <param name="previewNumber">
+ /// Preview Feature: Preview to encode
+ /// </param>
+ /// <param name="previewSeconds">
+ /// Number of seconds to encode for the preview
+ /// </param>
+ /// <param name="overallSelectedLengthSeconds">
+ /// The overall Selected Length Seconds.
+ /// </param>
+ /// <param name="scanPreviewCount">
+ /// Number of previews
+ /// </param>
+ public void StartEncode(EncodeJob job, Title title, bool preview, int previewNumber, int previewSeconds, double overallSelectedLengthSeconds, int scanPreviewCount)
{
this.previewCount = scanPreviewCount;
- JsonEncodeObject encodeObject = EncodeFactory.Create(job, lastScan);
+ JsonEncodeObject encodeObject = EncodeFactory.Create(job, title);
JsonSerializerSettings settings = new JsonSerializerSettings
{
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs index 64c03cbef..e6eeae943 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Interfaces/IHandBrakeInstance.cs @@ -143,10 +143,13 @@ namespace HandBrake.Interop.Interfaces /// <param name="jobToStart">
/// The job to start.
/// </param>
+ /// <param name="title">
+ /// The title.
+ /// </param>
/// <param name="scanPreviewCount">
/// The scan Preview Count.
/// </param>
- void StartEncode(EncodeJob jobToStart, int scanPreviewCount);
+ void StartEncode(EncodeJob jobToStart, Title title, int scanPreviewCount);
/// <summary>
/// Starts an encode with the given job.
@@ -154,6 +157,9 @@ namespace HandBrake.Interop.Interfaces /// <param name="job">
/// The job to start.
/// </param>
+ /// <param name="title">
+ /// The title.
+ /// </param>
/// <param name="preview">
/// True if this is a preview encode.
/// </param>
@@ -170,8 +176,7 @@ namespace HandBrake.Interop.Interfaces /// <param name="scanPreviewCount">
/// The scan Preview Count.
/// </param>
- void StartEncode(
- EncodeJob job, bool preview, int previewNumber, int previewSeconds, double overallSelectedLengthSeconds, int scanPreviewCount);
+ void StartEncode(EncodeJob job, Title title, bool preview, int previewNumber, int previewSeconds, double overallSelectedLengthSeconds, int scanPreviewCount);
/// <summary>
/// Starts scanning the given path.
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/AnamorphicFactory.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/AnamorphicFactory.cs index cb882c126..598fedac1 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/AnamorphicFactory.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/AnamorphicFactory.cs @@ -21,6 +21,9 @@ namespace HandBrake.Interop.Json.Factories using Newtonsoft.Json;
+ /// <summary>
+ /// The anamorphic factory.
+ /// </summary>
public class AnamorphicFactory
{
/// <summary>
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs index fd2274e3f..0c074262d 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs @@ -18,17 +18,11 @@ namespace HandBrake.Interop.Json.Factories using HandBrake.Interop.Helpers;
using HandBrake.Interop.Json.Anamorphic;
using HandBrake.Interop.Json.Encode;
- using HandBrake.Interop.Json.Scan;
using HandBrake.Interop.Model;
using HandBrake.Interop.Model.Encoding;
+ using HandBrake.Interop.Model.Scan;
- using Newtonsoft.Json;
-
- using AudioList = HandBrake.Interop.Json.Encode.AudioList;
- using ChapterList = HandBrake.Interop.Json.Encode.ChapterList;
- using MetaData = HandBrake.Interop.Json.Encode.MetaData;
- using PAR = HandBrake.Interop.Json.Anamorphic.PAR;
- using SubtitleList = HandBrake.Interop.Json.Encode.SubtitleList;
+ using Subtitle = HandBrake.Interop.Json.Encode.Subtitle;
/// <summary>
/// This factory takes the internal EncodeJob object and turns it into a set of JSON models
@@ -36,34 +30,30 @@ namespace HandBrake.Interop.Json.Factories /// </summary>
internal class EncodeFactory
{
-
- /*
- * <j45> maxWidth and maxHeight are frontend issues. You pass those into hb_set_anamorphic_size when calculating geometry settings. width and height are given to the CROP_SCALE filter. No need for the frontend to set it in the job. The job will get the final dimensions from the filter settings anyway.
- * <j45> for example, both crop_scale and rotate filters modify job width and height settings
- *
- */
-
/// <summary>
/// The create.
/// </summary>
/// <param name="job">
/// The encode job.
/// </param>
+ /// <param name="title">
+ /// The title.
+ /// </param>
/// <returns>
/// The <see cref="JsonEncodeObject"/>.
/// </returns>
- internal static JsonEncodeObject Create(EncodeJob job, JsonScanObject scannedSource)
+ internal static JsonEncodeObject Create(EncodeJob job, Title title)
{
JsonEncodeObject encode = new JsonEncodeObject
{
- SequenceID = 0,
- Audio = CreateAudio(job),
- Destination = CreateDestination(job),
- Filter = CreateFilter(job),
- PAR = CreatePAR(job),
- MetaData = CreateMetaData(job),
- Source = CreateSource(job),
- Subtitle = CreateSubtitle(job),
+ SequenceID = 0,
+ Audio = CreateAudio(job),
+ Destination = CreateDestination(job),
+ Filter = CreateFilter(job, title),
+ PAR = CreatePAR(job),
+ MetaData = CreateMetaData(job),
+ Source = CreateSource(job),
+ Subtitle = CreateSubtitle(job),
Video = CreateVideo(job)
};
@@ -83,17 +73,17 @@ namespace HandBrake.Interop.Json.Factories {
Source source = new Source
{
- Title = job.Title,
+ Title = job.Title,
Range =
new Range
{
- ChapterEnd = job.ChapterEnd,
- ChapterStart = job.ChapterStart,
- FrameToStart = job.FramesStart,
- FrameToStop = job.FramesEnd,
- PtsToStart = (int)(job.SecondsStart * 90000),
- PtsToStop = (int)((job.SecondsEnd - job.SecondsStart) * 90000),
- },
+ ChapterEnd = job.ChapterEnd,
+ ChapterStart = job.ChapterStart,
+ FrameToStart = job.FramesStart,
+ FrameToStop = job.FramesEnd,
+ PtsToStart = (int)(job.SecondsStart * 90000),
+ PtsToStop = (int)((job.SecondsEnd - job.SecondsStart) * 90000),
+ },
Angle = job.Angle
};
return source;
@@ -112,23 +102,24 @@ namespace HandBrake.Interop.Json.Factories {
Destination destination = new Destination
{
- File = job.OutputPath,
- Mp4Options =
- new Mp4Options
- {
- IpodAtom = job.EncodingProfile.IPod5GSupport,
- // LargeFileSize = job.EncodingProfile.LargeFile,
- Mp4Optimize = job.EncodingProfile.Optimize
- },
- ChapterMarkers = job.EncodingProfile.IncludeChapterMarkers,
- Mux = HBFunctions.hb_container_get_from_name(job.EncodingProfile.ContainerName),
+ File = job.OutputPath,
+ Mp4Options = new Mp4Options
+ {
+ IpodAtom = job.EncodingProfile.IPod5GSupport,
+ Mp4Optimize = job.EncodingProfile.Optimize
+ },
+ ChapterMarkers = job.EncodingProfile.IncludeChapterMarkers,
+ Mux = HBFunctions.hb_container_get_from_name(job.EncodingProfile.ContainerName),
ChapterList = new List<ChapterList>()
};
- foreach (string item in job.CustomChapterNames)
+ if (!job.UseDefaultChapterNames)
{
- ChapterList chapter = new ChapterList { Name = item };
- destination.ChapterList.Add(chapter);
+ foreach (string item in job.CustomChapterNames)
+ {
+ ChapterList chapter = new ChapterList { Name = item };
+ destination.ChapterList.Add(chapter);
+ }
}
return destination;
@@ -137,11 +128,15 @@ namespace HandBrake.Interop.Json.Factories /// <summary>
/// Create the PAR object
/// </summary>
- /// <param name="job">The Job</param>
- /// <returns>The produced PAR object.</returns>
+ /// <param name="job">
+ /// The Job
+ /// </param>
+ /// <returns>
+ /// The produced PAR object.
+ /// </returns>
private static PAR CreatePAR(EncodeJob job)
{
- return new PAR {Num = job.EncodingProfile.PixelAspectX, Den = job.EncodingProfile.PixelAspectY} ;
+ return new PAR { Num = job.EncodingProfile.PixelAspectX, Den = job.EncodingProfile.PixelAspectY };
}
/// <summary>
@@ -151,7 +146,7 @@ namespace HandBrake.Interop.Json.Factories /// The job.
/// </param>
/// <returns>
- /// The <see cref="Subtitle"/>.
+ /// The <see cref="Encode.Subtitle"/>.
/// </returns>
private static Subtitle CreateSubtitle(EncodeJob job)
{
@@ -160,11 +155,11 @@ namespace HandBrake.Interop.Json.Factories Search =
new Search
{
- Enable = false,
- Default = false,
- Burn = false,
+ Enable = false,
+ Default = false,
+ Burn = false,
Forced = false
- },
+ },
SubtitleList = new List<SubtitleList>()
};
@@ -172,10 +167,10 @@ namespace HandBrake.Interop.Json.Factories {
SubtitleList track = new SubtitleList
{
- Burn = item.BurnedIn,
- Default = item.Default,
- Force = item.Forced,
- ID = item.TrackNumber,
+ Burn = item.BurnedIn,
+ Default = item.Default,
+ Force = item.Forced,
+ ID = item.TrackNumber,
Track = item.TrackNumber
};
@@ -186,13 +181,13 @@ namespace HandBrake.Interop.Json.Factories {
SubtitleList track = new SubtitleList
{
- Default = item.Default,
- Offset = item.Offset,
+ Default = item.Default,
+ Offset = item.Offset,
SRT =
new SRT
{
- Filename = item.FileName,
- Codeset = item.CharacterCode,
+ Filename = item.FileName,
+ Codeset = item.CharacterCode,
Language = item.LanguageCode
}
};
@@ -270,15 +265,15 @@ namespace HandBrake.Interop.Json.Factories AudioList audioTrack = new AudioList
{
- Track = numTracks++,
- Bitrate = item.Bitrate,
- CompressionLevel = item.Compression,
- DRC = item.Drc,
- Encoder = encoder.Id,
- Gain = item.Gain,
- Mixdown = mixdown.Id,
- NormalizeMixLevel = false,
- Quality = item.Quality,
+ Track = numTracks++,
+ Bitrate = item.Bitrate,
+ CompressionLevel = item.Compression,
+ DRC = item.Drc,
+ Encoder = encoder.Id,
+ Gain = item.Gain,
+ Mixdown = mixdown.Id,
+ NormalizeMixLevel = false,
+ Quality = item.Quality,
Samplerate = item.SampleRateRaw
};
@@ -289,19 +284,22 @@ namespace HandBrake.Interop.Json.Factories }
/// <summary>
- /// The create filter. TODO
+ /// The create filter.
/// </summary>
/// <param name="job">
/// The job.
/// </param>
+ /// <param name="title">
+ /// The title.
+ /// </param>
/// <returns>
/// The <see cref="Filter"/>.
/// </returns>
- private static Filter CreateFilter(EncodeJob job)
+ private static Filter CreateFilter(EncodeJob job, Title title)
{
Filter filter = new Filter
{
- FilterList = new List<FilterList>(),
+ FilterList = new List<FilterList>(),
Grayscale = job.EncodingProfile.Grayscale
};
@@ -315,7 +313,7 @@ namespace HandBrake.Interop.Json.Factories // Decomb
if (job.EncodingProfile.Decomb != Decomb.Off)
{
- string options = "";
+ string options;
if (job.EncodingProfile.Decomb == Decomb.Fast)
{
options = "7:2:6:9:1:80";
@@ -336,7 +334,7 @@ namespace HandBrake.Interop.Json.Factories // Deinterlace
if (job.EncodingProfile.Deinterlace != Deinterlace.Off)
{
- string options = string.Empty;
+ string options;
if (job.EncodingProfile.Deinterlace == Deinterlace.Fast)
{
options = "0";
@@ -362,12 +360,12 @@ namespace HandBrake.Interop.Json.Factories filter.FilterList.Add(filterItem);
}
- // VFR / CFR TODO
+ // VFR / CFR TODO Setup the framerate shaper.
FilterList framerateShaper = new FilterList { ID = (int)hb_filter_ids.HB_FILTER_VFR, Settings = string.Empty };
filter.FilterList.Add(framerateShaper);
// Deblock
- if (job.EncodingProfile.Deblock < 5)
+ if (job.EncodingProfile.Deblock >= 5)
{
FilterList filterItem = new FilterList { ID = (int)hb_filter_ids.HB_FILTER_DEBLOCK, Settings = job.EncodingProfile.Deblock.ToString() };
filter.FilterList.Add(filterItem);
@@ -397,17 +395,19 @@ namespace HandBrake.Interop.Json.Factories }
// CropScale Filter
+ // TODO handle anamorphic.
+ Geometry resultGeometry = AnamorphicFactory.CreateGeometry(job, title, AnamorphicFactory.KeepSetting.HB_KEEP_WIDTH);
FilterList cropScale = new FilterList
{
- ID = (int)hb_filter_ids.HB_FILTER_CROP_SCALE,
+ ID = (int)hb_filter_ids.HB_FILTER_CROP_SCALE,
Settings =
string.Format(
- "{0}:{1}:{2}:{3}:{4}:{5}",
- job.EncodingProfile.Width,
- job.EncodingProfile.Height,
- job.EncodingProfile.Cropping.Top,
- job.EncodingProfile.Cropping.Bottom,
- job.EncodingProfile.Cropping.Left,
+ "{0}:{1}:{2}:{3}:{4}:{5}",
+ resultGeometry.Width,
+ resultGeometry.Height,
+ job.EncodingProfile.Cropping.Top,
+ job.EncodingProfile.Cropping.Bottom,
+ job.EncodingProfile.Cropping.Left,
job.EncodingProfile.Cropping.Right)
};
filter.FilterList.Add(cropScale);
@@ -430,6 +430,8 @@ namespace HandBrake.Interop.Json.Factories private static MetaData CreateMetaData(EncodeJob job)
{
MetaData metaData = new MetaData();
+
+ /* TODO NOT SUPPORTED YET. */
return metaData;
}
}
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/EncodingProfile.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/EncodingProfile.cs index bcabcf282..82cbe55b1 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/EncodingProfile.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/EncodingProfile.cs @@ -44,11 +44,6 @@ namespace HandBrake.Interop.Model.Encoding public bool IncludeChapterMarkers { get; set; }
/// <summary>
- /// Gets or sets a value indicating whether large file.
- /// </summary>
- public bool LargeFile { get; set; }
-
- /// <summary>
/// Gets or sets a value indicating whether optimize.
/// </summary>
public bool Optimize { get; set; }
@@ -320,7 +315,6 @@ namespace HandBrake.Interop.Model.Encoding ContainerName = this.ContainerName,
PreferredExtension = this.PreferredExtension,
IncludeChapterMarkers = this.IncludeChapterMarkers,
- LargeFile = this.LargeFile,
Optimize = this.Optimize,
IPod5GSupport = this.IPod5GSupport,
|