PanasonicVieraProfile.cs 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. using MediaBrowser.Model.Dlna;
  2. namespace Emby.Dlna.Profiles
  3. {
  4. [System.Xml.Serialization.XmlRoot("Profile")]
  5. public class PanasonicVieraProfile : DefaultProfile
  6. {
  7. public PanasonicVieraProfile()
  8. {
  9. Name = "Panasonic Viera";
  10. Identification = new DeviceIdentification
  11. {
  12. FriendlyName = @"VIERA",
  13. Manufacturer = "Panasonic",
  14. Headers = new[]
  15. {
  16. new HttpHeaderInfo
  17. {
  18. Name = "User-Agent",
  19. Value = "Panasonic MIL DLNA",
  20. Match = HeaderMatchType.Substring
  21. }
  22. }
  23. };
  24. AddXmlRootAttribute("xmlns:pv", "http://www.pv.com/pvns/");
  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,mpg",
  52. VideoCodec = "mpeg2video,mpeg4",
  53. AudioCodec = "ac3,mp3,pcm_dvd",
  54. Type = DlnaProfileType.Video
  55. },
  56. new DirectPlayProfile
  57. {
  58. Container = "mkv",
  59. VideoCodec = "h264,mpeg2video",
  60. AudioCodec = "aac,ac3,dca,mp3,mp2,pcm,dts",
  61. Type = DlnaProfileType.Video
  62. },
  63. new DirectPlayProfile
  64. {
  65. Container = "ts,mpegts",
  66. VideoCodec = "h264,mpeg2video",
  67. AudioCodec = "aac,mp3,mp2",
  68. Type = DlnaProfileType.Video
  69. },
  70. new DirectPlayProfile
  71. {
  72. Container = "mp4,m4v",
  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. SubtitleProfiles = new[]
  168. {
  169. new SubtitleProfile
  170. {
  171. Format = "srt",
  172. Method = SubtitleDeliveryMethod.Embed
  173. },
  174. new SubtitleProfile
  175. {
  176. Format = "srt",
  177. Method = SubtitleDeliveryMethod.External
  178. }
  179. };
  180. ResponseProfiles = new[]
  181. {
  182. new ResponseProfile
  183. {
  184. Type = DlnaProfileType.Video,
  185. Container = "ts,mpegts",
  186. OrgPn = "MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",
  187. MimeType = "video/vnd.dlna.mpeg-tts"
  188. },
  189. new ResponseProfile
  190. {
  191. Container = "m4v",
  192. Type = DlnaProfileType.Video,
  193. MimeType = "video/mp4"
  194. }
  195. };
  196. }
  197. }
  198. }