DirectTvProfile.cs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. #pragma warning disable CS1591
  2. using MediaBrowser.Model.Dlna;
  3. namespace Emby.Dlna.Profiles
  4. {
  5. [System.Xml.Serialization.XmlRoot("Profile")]
  6. public class DirectTvProfile : DefaultProfile
  7. {
  8. public DirectTvProfile()
  9. {
  10. Name = "DirecTV HD-DVR";
  11. TimelineOffsetSeconds = 10;
  12. RequiresPlainFolders = true;
  13. RequiresPlainVideoItems = true;
  14. Identification = new DeviceIdentification
  15. {
  16. Headers = new[]
  17. {
  18. new HttpHeaderInfo
  19. {
  20. Match = HeaderMatchType.Substring,
  21. Name = "User-Agent",
  22. Value = "DIRECTV"
  23. }
  24. },
  25. FriendlyName = "^DIRECTV.*$"
  26. };
  27. DirectPlayProfiles = new[]
  28. {
  29. new DirectPlayProfile
  30. {
  31. Container = "mpeg",
  32. VideoCodec = "mpeg2video",
  33. AudioCodec = "mp2",
  34. Type = DlnaProfileType.Video
  35. },
  36. new DirectPlayProfile
  37. {
  38. Container = "jpeg,jpg",
  39. Type = DlnaProfileType.Photo
  40. }
  41. };
  42. TranscodingProfiles = new[]
  43. {
  44. new TranscodingProfile
  45. {
  46. Container = "mpeg",
  47. VideoCodec = "mpeg2video",
  48. AudioCodec = "mp2",
  49. Type = DlnaProfileType.Video
  50. },
  51. new TranscodingProfile
  52. {
  53. Container = "jpeg",
  54. Type = DlnaProfileType.Photo
  55. }
  56. };
  57. CodecProfiles = new[]
  58. {
  59. new CodecProfile
  60. {
  61. Codec = "mpeg2video",
  62. Type = CodecType.Video,
  63. Conditions = new[]
  64. {
  65. new ProfileCondition
  66. {
  67. Condition = ProfileConditionType.LessThanEqual,
  68. Property = ProfileConditionValue.Width,
  69. Value = "1920"
  70. },
  71. new ProfileCondition
  72. {
  73. Condition = ProfileConditionType.LessThanEqual,
  74. Property = ProfileConditionValue.Height,
  75. Value = "1080"
  76. },
  77. new ProfileCondition
  78. {
  79. Condition = ProfileConditionType.LessThanEqual,
  80. Property = ProfileConditionValue.VideoFramerate,
  81. Value = "30"
  82. },
  83. new ProfileCondition
  84. {
  85. Condition = ProfileConditionType.LessThanEqual,
  86. Property = ProfileConditionValue.VideoBitrate,
  87. Value = "8192000"
  88. }
  89. }
  90. },
  91. new CodecProfile
  92. {
  93. Codec = "mp2",
  94. Type = CodecType.Audio,
  95. Conditions = new[]
  96. {
  97. new ProfileCondition
  98. {
  99. Condition = ProfileConditionType.LessThanEqual,
  100. Property = ProfileConditionValue.AudioChannels,
  101. Value = "2"
  102. }
  103. }
  104. }
  105. };
  106. SubtitleProfiles = new[]
  107. {
  108. new SubtitleProfile
  109. {
  110. Format = "srt",
  111. Method = SubtitleDeliveryMethod.Embed
  112. }
  113. };
  114. ResponseProfiles = new ResponseProfile[] { };
  115. }
  116. }
  117. }