diff options
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
3 files changed, 35 insertions, 7 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs index 02bacc429..512aa9b44 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/SubtitleTrack.cs @@ -233,8 +233,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding {
if (this.SourceTrack != null)
{
- return this.SourceTrack.SubtitleType == SubtitleType.VobSub || this.SourceTrack.SubtitleType == SubtitleType.PGS
- || this.SourceTrack.SubtitleType == SubtitleType.ForeignAudioSearch;
+ return this.SourceTrack.CanForce || this.SourceTrack.SubtitleType == SubtitleType.ForeignAudioSearch;
}
return false;
@@ -247,11 +246,10 @@ namespace HandBrake.ApplicationServices.Model.Encoding public bool CanBeBurned
{
get
- {
+ {
if (this.SourceTrack != null)
{
- return this.SourceTrack.SubtitleType == SubtitleType.VobSub || this.SourceTrack.SubtitleType == SubtitleType.PGS
- || this.SourceTrack.SubtitleType == SubtitleType.ForeignAudioSearch || this.SourceTrack.SubtitleType == SubtitleType.SSA;
+ return this.SourceTrack.CanBurnIn || this.SourceTrack.SubtitleType == SubtitleType.ForeignAudioSearch;
}
return false;
diff --git a/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs b/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs index e40734b55..3b026bdf5 100644 --- a/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs +++ b/win/CS/HandBrake.ApplicationServices/Parsing/Subtitle.cs @@ -10,6 +10,7 @@ namespace HandBrake.ApplicationServices.Parsing
{
using System;
+ using System.Xml.Serialization;
using HandBrake.ApplicationServices.Model.Encoding;
using HandBrake.ApplicationServices.Utilities;
@@ -29,6 +30,9 @@ namespace HandBrake.ApplicationServices.Parsing /// <summary>
/// Initializes a new instance of the <see cref="Subtitle"/> class.
/// </summary>
+ /// <param name="sourceId">
+ /// The source Id.
+ /// </param>
/// <param name="trackNumber">
/// The track number.
/// </param>
@@ -41,15 +45,29 @@ namespace HandBrake.ApplicationServices.Parsing /// <param name="subtitleType">
/// The subtitle type.
/// </param>
- public Subtitle(int trackNumber, string language, string languageCode, SubtitleType subtitleType)
+ /// <param name="canBurn">
+ /// The can Burn.
+ /// </param>
+ /// <param name="canForce">
+ /// The can Force.
+ /// </param>
+ public Subtitle(int sourceId, int trackNumber, string language, string languageCode, SubtitleType subtitleType, bool canBurn, bool canForce)
{
+ this.SourceId = sourceId;
this.TrackNumber = trackNumber;
this.Language = language;
this.LanguageCode = languageCode;
this.SubtitleType = subtitleType;
+ this.CanBurnIn = canBurn;
+ this.CanForce = canForce;
}
/// <summary>
+ /// Gets or sets the source id.
+ /// </summary>
+ public int SourceId { get; set; }
+
+ /// <summary>
/// Gets or sets the track number of this Subtitle
/// </summary>
public int TrackNumber { get; set; }
@@ -81,6 +99,18 @@ namespace HandBrake.ApplicationServices.Parsing }
/// <summary>
+ /// Gets a value indicating whether can burn in.
+ /// </summary>
+ [XmlIgnore]
+ public bool CanBurnIn { get; private set; }
+
+ /// <summary>
+ /// Gets a value indicating whether can force.
+ /// </summary>
+ [XmlIgnore]
+ public bool CanForce { get; private set; }
+
+ /// <summary>
/// Gets or sets the Subtitle Type
/// </summary>
public SubtitleType SubtitleType { get; set; }
diff --git a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs index 7831f6bb2..203459e9c 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/LibScan.cs @@ -501,7 +501,7 @@ namespace HandBrake.ApplicationServices.Services break;
}
- converted.Subtitles.Add(new Subtitle(track.TrackNumber, track.Language, track.LanguageCode, convertedType));
+ converted.Subtitles.Add(new Subtitle(track.SubtitleSourceInt, track.TrackNumber, track.Language, track.LanguageCode, convertedType, track.CanBurn, track.CanSetForcedOnly));
}
titleList.Add(converted);
|