aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Entities/MediaStream.cs
diff options
context:
space:
mode:
author7illusions <z@7illusions.com>2014-05-12 16:55:07 +0200
committer7illusions <z@7illusions.com>2014-05-12 16:55:07 +0200
commitbaf5cf2544fcaad2246923f60caaf3fed4a94aaf (patch)
treea808b700095f876e437b95c432c0220e241f9fda /MediaBrowser.Model/Entities/MediaStream.cs
parent8f3a6279e173dcbaaa05a56556afb410ee12dd4d (diff)
parentb9b568de13d81f9db1a8502d50940475c1d79c72 (diff)
Merge pull request #3 from MediaBrowser/master
Sync with Master
Diffstat (limited to 'MediaBrowser.Model/Entities/MediaStream.cs')
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs62
1 files changed, 16 insertions, 46 deletions
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index d54e3c0ef..9f64b36e4 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -1,5 +1,6 @@
-using System.Collections.Generic;
+using System;
using System.Diagnostics;
+using System.Runtime.Serialization;
namespace MediaBrowser.Model.Entities
{
@@ -129,6 +130,20 @@ namespace MediaBrowser.Model.Entities
/// <value><c>true</c> if this instance is external; otherwise, <c>false</c>.</value>
public bool IsExternal { get; set; }
+ [IgnoreDataMember]
+ public bool IsGraphicalSubtitleStream
+ {
+ get
+ {
+ if (IsExternal) return false;
+
+ var codec = Codec ?? string.Empty;
+
+ return codec.IndexOf("pgs", StringComparison.OrdinalIgnoreCase) != -1 ||
+ codec.IndexOf("dvd", StringComparison.OrdinalIgnoreCase) != -1;
+ }
+ }
+
/// <summary>
/// Gets or sets the filename.
/// </summary>
@@ -147,49 +162,4 @@ namespace MediaBrowser.Model.Entities
/// <value>The level.</value>
public double? Level { get; set; }
}
-
- /// <summary>
- /// Enum MediaStreamType
- /// </summary>
- public enum MediaStreamType
- {
- /// <summary>
- /// The audio
- /// </summary>
- Audio,
- /// <summary>
- /// The video
- /// </summary>
- Video,
- /// <summary>
- /// The subtitle
- /// </summary>
- Subtitle,
- /// <summary>
- /// The embedded image
- /// </summary>
- EmbeddedImage
- }
-
- public class MediaInfo
- {
- /// <summary>
- /// Gets or sets the media streams.
- /// </summary>
- /// <value>The media streams.</value>
- public List<MediaStream> MediaStreams { get; set; }
-
- /// <summary>
- /// Gets or sets the format.
- /// </summary>
- /// <value>The format.</value>
- public string Format { get; set; }
-
- public int? TotalBitrate { get; set; }
-
- public MediaInfo()
- {
- MediaStreams = new List<MediaStream>();
- }
- }
}