StreamState.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. using MediaBrowser.Common.Net;
  2. using MediaBrowser.Controller.Dlna;
  3. using MediaBrowser.Model.Entities;
  4. using MediaBrowser.Model.IO;
  5. using System.Collections.Generic;
  6. using System.IO;
  7. using System.Threading;
  8. namespace MediaBrowser.Api.Playback
  9. {
  10. public class StreamState
  11. {
  12. public string RequestedUrl { get; set; }
  13. public StreamRequest Request { get; set; }
  14. public VideoStreamRequest VideoRequest
  15. {
  16. get { return Request as VideoStreamRequest; }
  17. }
  18. /// <summary>
  19. /// Gets or sets the log file stream.
  20. /// </summary>
  21. /// <value>The log file stream.</value>
  22. public Stream LogFileStream { get; set; }
  23. public MediaStream AudioStream { get; set; }
  24. public MediaStream VideoStream { get; set; }
  25. public MediaStream SubtitleStream { get; set; }
  26. /// <summary>
  27. /// Gets or sets the iso mount.
  28. /// </summary>
  29. /// <value>The iso mount.</value>
  30. public IIsoMount IsoMount { get; set; }
  31. public string MediaPath { get; set; }
  32. public bool IsRemote { get; set; }
  33. public bool IsInputVideo { get; set; }
  34. public VideoType VideoType { get; set; }
  35. public IsoType? IsoType { get; set; }
  36. public List<string> PlayableStreamFileNames { get; set; }
  37. public bool HasMediaStreams { get; set; }
  38. public bool SendInputOverStandardInput { get; set; }
  39. public CancellationTokenSource StandardInputCancellationTokenSource { get; set; }
  40. public string LiveTvStreamId { get; set; }
  41. public int SegmentLength = 10;
  42. public int HlsListSize;
  43. public long? RunTimeTicks;
  44. public string AudioSync = "1";
  45. public string VideoSync = "vfr";
  46. public string InputAudioSync { get; set; }
  47. public string InputVideoSync { get; set; }
  48. public bool DeInterlace { get; set; }
  49. public bool ReadInputAtNativeFramerate { get; set; }
  50. public string InputFormat { get; set; }
  51. public string InputVideoCodec { get; set; }
  52. public string InputAudioCodec { get; set; }
  53. public string MimeType { get; set; }
  54. public string OrgPn { get; set; }
  55. // DLNA Settings
  56. public bool EstimateContentLength { get; set; }
  57. public bool EnableMpegtsM2TsMode { get; set; }
  58. public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
  59. public string GetMimeType(string outputPath)
  60. {
  61. if (!string.IsNullOrEmpty(MimeType))
  62. {
  63. return MimeType;
  64. }
  65. return MimeTypes.GetMimeType(outputPath);
  66. }
  67. }
  68. }