summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData
diff options
context:
space:
mode:
authorrandomengy <[email protected]>2013-11-07 18:25:29 +0000
committerrandomengy <[email protected]>2013-11-07 18:25:29 +0000
commit7f98b4c5d93c02b4457a692a52208d0a129e8941 (patch)
tree05476c871fc4df29c053dfba748cc06025ac8605 /win/CS/HandBrake.Interop/HandBrakeInterop/SourceData
parent44c67f5f4929d6a2b6d2e11325612e33069da7a4 (diff)
Interop: Exposed properties and methods on subtitle tracks to determine if they can be burnt in, passed through or marked "forced only".
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5879 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop/SourceData')
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Subtitle.cs49
1 files changed, 44 insertions, 5 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Subtitle.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Subtitle.cs
index 570bc174e..fbb08402f 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Subtitle.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/SourceData/Subtitle.cs
@@ -9,7 +9,9 @@
namespace HandBrake.Interop.SourceData
{
- /// <summary>
+ using HandBrake.Interop.HbLib;
+
+ /// <summary>
/// An object that represents a subtitle associated with a Title, in a DVD
/// </summary>
public class Subtitle
@@ -40,6 +42,43 @@ namespace HandBrake.Interop.SourceData
public SubtitleSource SubtitleSource { get; set; }
/// <summary>
+ /// Gets or sets the subtitle source raw integer.
+ /// </summary>
+ public int SubtitleSourceInt { get; set; }
+
+ /// <summary>
+ /// Gets a value indicating whether the "forced only" flag can be set on this subtitle.
+ /// </summary>
+ public bool CanSetForcedOnly
+ {
+ get
+ {
+ return HBFunctions.hb_subtitle_can_force(this.SubtitleSourceInt) > 0;
+ }
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether this subtitle can be burned into the picture.
+ /// </summary>
+ public bool CanBurn
+ {
+ get
+ {
+ return HBFunctions.hb_subtitle_can_burn(this.SubtitleSourceInt) > 0;
+ }
+ }
+
+ /// <summary>
+ /// Returns true if the subtitle can be passed through using the given muxer.
+ /// </summary>
+ /// <param name="muxer">The muxer ID.</param>
+ /// <returns>True if the subtitle can be passed through.</returns>
+ public bool CanPass(int muxer)
+ {
+ return HBFunctions.hb_subtitle_can_pass(this.SubtitleSourceInt, muxer) > 0;
+ }
+
+ /// <summary>
/// Override of the ToString method to make this object easier to use in the UI
/// </summary>
/// <returns>A string formatted as: {track #} {language}</returns>
@@ -48,10 +87,10 @@ namespace HandBrake.Interop.SourceData
return string.Format("{0} {1} ({2})", this.TrackNumber, this.Language, this.SubtitleSource);
}
- /// <summary>
- /// Gets the display.
- /// </summary>
- public string Display
+ /// <summary>
+ /// Gets the display.
+ /// </summary>
+ public string Display
{
get
{