PanasonicVieraProfile.cs 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. using MediaBrowser.Model.Dlna;
  2. using System.Xml.Serialization;
  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. XmlRootAttributes = new[]
  26. {
  27. new XmlAttribute
  28. {
  29. Name = "xmlns:pv",
  30. Value = "http://www.pv.com/pvns/"
  31. }
  32. };
  33. TimelineOffsetSeconds = 10;
  34. TranscodingProfiles = new[]
  35. {
  36. new TranscodingProfile
  37. {
  38. Container = "mp3",
  39. AudioCodec = "mp3",
  40. Type = DlnaProfileType.Audio
  41. },
  42. new TranscodingProfile
  43. {
  44. Container = "ts",
  45. AudioCodec = "ac3",
  46. VideoCodec = "h264",
  47. Type = DlnaProfileType.Video
  48. },
  49. new TranscodingProfile
  50. {
  51. Container = "jpeg",
  52. Type = DlnaProfileType.Photo
  53. }
  54. };
  55. DirectPlayProfiles = new[]
  56. {
  57. new DirectPlayProfile
  58. {
  59. Container = "mpeg",
  60. VideoCodec = "mpeg2video,mpeg4",
  61. AudioCodec = "ac3,mp3",
  62. Type = DlnaProfileType.Video
  63. },
  64. new DirectPlayProfile
  65. {
  66. Container = "mkv",
  67. VideoCodec = "h264",
  68. AudioCodec = "aac,ac3,mp3,pcm",
  69. Type = DlnaProfileType.Video
  70. },
  71. new DirectPlayProfile
  72. {
  73. Container = "ts",
  74. VideoCodec = "h264",
  75. AudioCodec = "aac,mp3",
  76. Type = DlnaProfileType.Video
  77. },
  78. new DirectPlayProfile
  79. {
  80. Container = "mp4",
  81. VideoCodec = "h264",
  82. AudioCodec = "aac,ac3,mp3,pcm",
  83. Type = DlnaProfileType.Video
  84. },
  85. new DirectPlayProfile
  86. {
  87. Container = "mov",
  88. VideoCodec = "h264",
  89. AudioCodec = "aac,pcm",
  90. Type = DlnaProfileType.Video
  91. },
  92. new DirectPlayProfile
  93. {
  94. Container = "avi",
  95. VideoCodec = "mpeg4",
  96. AudioCodec = "pcm",
  97. Type = DlnaProfileType.Video
  98. },
  99. new DirectPlayProfile
  100. {
  101. Container = "flv",
  102. VideoCodec = "h264",
  103. AudioCodec = "aac",
  104. Type = DlnaProfileType.Video
  105. },
  106. new DirectPlayProfile
  107. {
  108. Container = "mp3",
  109. AudioCodec = "mp3",
  110. Type = DlnaProfileType.Audio
  111. },
  112. new DirectPlayProfile
  113. {
  114. Container = "mp4",
  115. AudioCodec = "aac",
  116. Type = DlnaProfileType.Audio
  117. },
  118. new DirectPlayProfile
  119. {
  120. Container = "jpeg",
  121. Type = DlnaProfileType.Photo
  122. }
  123. };
  124. ContainerProfiles = new[]
  125. {
  126. new ContainerProfile
  127. {
  128. Type = DlnaProfileType.Photo,
  129. Conditions = new []
  130. {
  131. new ProfileCondition
  132. {
  133. Condition = ProfileConditionType.LessThanEqual,
  134. Property = ProfileConditionValue.Width,
  135. Value = "1920"
  136. },
  137. new ProfileCondition
  138. {
  139. Condition = ProfileConditionType.LessThanEqual,
  140. Property = ProfileConditionValue.Height,
  141. Value = "1080"
  142. }
  143. }
  144. }
  145. };
  146. CodecProfiles = new[]
  147. {
  148. new CodecProfile
  149. {
  150. Type = CodecType.Video,
  151. Conditions = new[]
  152. {
  153. new ProfileCondition
  154. {
  155. Condition = ProfileConditionType.LessThanEqual,
  156. Property = ProfileConditionValue.Width,
  157. Value = "1920"
  158. },
  159. new ProfileCondition
  160. {
  161. Condition = ProfileConditionType.LessThanEqual,
  162. Property = ProfileConditionValue.Height,
  163. Value = "1080"
  164. },
  165. new ProfileCondition
  166. {
  167. Condition = ProfileConditionType.LessThanEqual,
  168. Property = ProfileConditionValue.VideoBitDepth,
  169. Value = "8",
  170. IsRequired = false
  171. }
  172. }
  173. }
  174. };
  175. }
  176. }
  177. }