DirectTvProfile.cs 3.8 KB

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