DirectTvProfile.cs 4.0 KB

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