PanasonicVieraProfile.cs 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. using System.Xml.Serialization;
  2. using MediaBrowser.Controller.Dlna;
  3. namespace MediaBrowser.Dlna.Profiles
  4. {
  5. [XmlRoot("Profile")]
  6. public class PanasonicVieraProfile : DefaultProfile
  7. {
  8. public PanasonicVieraProfile()
  9. {
  10. Name = "Panasonic Viera";
  11. Identification = new DeviceIdentification
  12. {
  13. FriendlyName = @"VIERA",
  14. Manufacturer = "Panasonic",
  15. Headers = new[]
  16. {
  17. new HttpHeaderInfo
  18. {
  19. Name = "User-Agent",
  20. Value = "Panasonic MIL DLNA",
  21. Match = HeaderMatchType.Substring
  22. }
  23. }
  24. };
  25. TimelineOffsetSeconds = 10;
  26. TranscodingProfiles = new[]
  27. {
  28. new TranscodingProfile
  29. {
  30. Container = "mp3",
  31. AudioCodec = "mp3",
  32. Type = DlnaProfileType.Audio
  33. },
  34. new TranscodingProfile
  35. {
  36. Container = "ts",
  37. AudioCodec = "ac3",
  38. VideoCodec = "h264",
  39. Type = DlnaProfileType.Video
  40. },
  41. new TranscodingProfile
  42. {
  43. Container = "jpeg",
  44. Type = DlnaProfileType.Photo
  45. }
  46. };
  47. DirectPlayProfiles = new[]
  48. {
  49. new DirectPlayProfile
  50. {
  51. Container = "mpeg",
  52. VideoCodec = "mpeg2video,mpeg4",
  53. AudioCodec = "ac3,mp3",
  54. Type = DlnaProfileType.Video
  55. },
  56. new DirectPlayProfile
  57. {
  58. Container = "mkv",
  59. VideoCodec = "h264",
  60. AudioCodec = "aac,ac3,mp3,pcm",
  61. Type = DlnaProfileType.Video
  62. },
  63. new DirectPlayProfile
  64. {
  65. Container = "ts",
  66. VideoCodec = "h264",
  67. AudioCodec = "aac,mp3",
  68. Type = DlnaProfileType.Video
  69. },
  70. new DirectPlayProfile
  71. {
  72. Container = "mp4",
  73. VideoCodec = "h264",
  74. AudioCodec = "aac,ac3,mp3,pcm",
  75. Type = DlnaProfileType.Video
  76. },
  77. new DirectPlayProfile
  78. {
  79. Container = "mov",
  80. VideoCodec = "h264",
  81. AudioCodec = "aac,pcm",
  82. Type = DlnaProfileType.Video
  83. },
  84. new DirectPlayProfile
  85. {
  86. Container = "avi",
  87. VideoCodec = "mpeg4",
  88. AudioCodec = "pcm",
  89. Type = DlnaProfileType.Video
  90. },
  91. new DirectPlayProfile
  92. {
  93. Container = "flv",
  94. VideoCodec = "h264",
  95. AudioCodec = "aac",
  96. Type = DlnaProfileType.Video
  97. },
  98. new DirectPlayProfile
  99. {
  100. Container = "mp3",
  101. AudioCodec = "mp3",
  102. Type = DlnaProfileType.Audio
  103. },
  104. new DirectPlayProfile
  105. {
  106. Container = "mp4",
  107. AudioCodec = "aac",
  108. Type = DlnaProfileType.Audio
  109. },
  110. new DirectPlayProfile
  111. {
  112. Container = "jpeg",
  113. Type = DlnaProfileType.Photo
  114. }
  115. };
  116. ContainerProfiles = new[]
  117. {
  118. new ContainerProfile
  119. {
  120. Type = DlnaProfileType.Photo,
  121. Conditions = new []
  122. {
  123. new ProfileCondition
  124. {
  125. Condition = ProfileConditionType.LessThanEqual,
  126. Property = ProfileConditionValue.Width,
  127. Value = "1920"
  128. },
  129. new ProfileCondition
  130. {
  131. Condition = ProfileConditionType.LessThanEqual,
  132. Property = ProfileConditionValue.Height,
  133. Value = "1080"
  134. }
  135. }
  136. }
  137. };
  138. CodecProfiles = new[]
  139. {
  140. new CodecProfile
  141. {
  142. Type = CodecType.Video,
  143. Conditions = new[]
  144. {
  145. new ProfileCondition
  146. {
  147. Condition = ProfileConditionType.LessThanEqual,
  148. Property = ProfileConditionValue.Width,
  149. Value = "1920"
  150. },
  151. new ProfileCondition
  152. {
  153. Condition = ProfileConditionType.LessThanEqual,
  154. Property = ProfileConditionValue.Height,
  155. Value = "1080"
  156. },
  157. new ProfileCondition
  158. {
  159. Condition = ProfileConditionType.LessThanEqual,
  160. Property = ProfileConditionValue.VideoBitDepth,
  161. Value = "8",
  162. IsRequired = false
  163. }
  164. }
  165. }
  166. };
  167. }
  168. }
  169. }