PanasonicVieraProfile.cs 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. #pragma warning disable CS1591
  2. using MediaBrowser.Model.Dlna;
  3. namespace Emby.Dlna.Profiles
  4. {
  5. [System.Xml.Serialization.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. AddXmlRootAttribute("xmlns:pv", "http://www.pv.com/pvns/");
  26. TimelineOffsetSeconds = 10;
  27. TranscodingProfiles = new[]
  28. {
  29. new TranscodingProfile
  30. {
  31. Container = "mp3",
  32. AudioCodec = "mp3",
  33. Type = DlnaProfileType.Audio
  34. },
  35. new TranscodingProfile
  36. {
  37. Container = "ts",
  38. AudioCodec = "ac3",
  39. VideoCodec = "h264",
  40. Type = DlnaProfileType.Video
  41. },
  42. new TranscodingProfile
  43. {
  44. Container = "jpeg",
  45. Type = DlnaProfileType.Photo
  46. }
  47. };
  48. DirectPlayProfiles = new[]
  49. {
  50. new DirectPlayProfile
  51. {
  52. Container = "mpeg,mpg",
  53. VideoCodec = "mpeg2video,mpeg4",
  54. AudioCodec = "ac3,mp3,pcm_dvd",
  55. Type = DlnaProfileType.Video
  56. },
  57. new DirectPlayProfile
  58. {
  59. Container = "mkv",
  60. VideoCodec = "h264,mpeg2video",
  61. AudioCodec = "aac,ac3,dca,mp3,mp2,pcm,dts",
  62. Type = DlnaProfileType.Video
  63. },
  64. new DirectPlayProfile
  65. {
  66. Container = "ts,mpegts",
  67. VideoCodec = "h264,mpeg2video",
  68. AudioCodec = "aac,mp3,mp2",
  69. Type = DlnaProfileType.Video
  70. },
  71. new DirectPlayProfile
  72. {
  73. Container = "mp4,m4v",
  74. VideoCodec = "h264",
  75. AudioCodec = "aac,ac3,mp3,pcm",
  76. Type = DlnaProfileType.Video
  77. },
  78. new DirectPlayProfile
  79. {
  80. Container = "mov",
  81. VideoCodec = "h264",
  82. AudioCodec = "aac,pcm",
  83. Type = DlnaProfileType.Video
  84. },
  85. new DirectPlayProfile
  86. {
  87. Container = "avi",
  88. VideoCodec = "mpeg4",
  89. AudioCodec = "pcm",
  90. Type = DlnaProfileType.Video
  91. },
  92. new DirectPlayProfile
  93. {
  94. Container = "flv",
  95. VideoCodec = "h264",
  96. AudioCodec = "aac",
  97. Type = DlnaProfileType.Video
  98. },
  99. new DirectPlayProfile
  100. {
  101. Container = "mp3",
  102. AudioCodec = "mp3",
  103. Type = DlnaProfileType.Audio
  104. },
  105. new DirectPlayProfile
  106. {
  107. Container = "mp4",
  108. AudioCodec = "aac",
  109. Type = DlnaProfileType.Audio
  110. },
  111. new DirectPlayProfile
  112. {
  113. Container = "jpeg",
  114. Type = DlnaProfileType.Photo
  115. }
  116. };
  117. ContainerProfiles = new[]
  118. {
  119. new ContainerProfile
  120. {
  121. Type = DlnaProfileType.Photo,
  122. Conditions = new []
  123. {
  124. new ProfileCondition
  125. {
  126. Condition = ProfileConditionType.LessThanEqual,
  127. Property = ProfileConditionValue.Width,
  128. Value = "1920"
  129. },
  130. new ProfileCondition
  131. {
  132. Condition = ProfileConditionType.LessThanEqual,
  133. Property = ProfileConditionValue.Height,
  134. Value = "1080"
  135. }
  136. }
  137. }
  138. };
  139. CodecProfiles = new[]
  140. {
  141. new CodecProfile
  142. {
  143. Type = CodecType.Video,
  144. Conditions = new[]
  145. {
  146. new ProfileCondition
  147. {
  148. Condition = ProfileConditionType.LessThanEqual,
  149. Property = ProfileConditionValue.Width,
  150. Value = "1920"
  151. },
  152. new ProfileCondition
  153. {
  154. Condition = ProfileConditionType.LessThanEqual,
  155. Property = ProfileConditionValue.Height,
  156. Value = "1080"
  157. },
  158. new ProfileCondition
  159. {
  160. Condition = ProfileConditionType.LessThanEqual,
  161. Property = ProfileConditionValue.VideoBitDepth,
  162. Value = "8",
  163. IsRequired = false
  164. }
  165. }
  166. }
  167. };
  168. SubtitleProfiles = new[]
  169. {
  170. new SubtitleProfile
  171. {
  172. Format = "srt",
  173. Method = SubtitleDeliveryMethod.Embed
  174. },
  175. new SubtitleProfile
  176. {
  177. Format = "srt",
  178. Method = SubtitleDeliveryMethod.External
  179. }
  180. };
  181. ResponseProfiles = new[]
  182. {
  183. new ResponseProfile
  184. {
  185. Type = DlnaProfileType.Video,
  186. Container = "ts,mpegts",
  187. OrgPn = "MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",
  188. MimeType = "video/vnd.dlna.mpeg-tts"
  189. },
  190. new ResponseProfile
  191. {
  192. Container = "m4v",
  193. Type = DlnaProfileType.Video,
  194. MimeType = "video/mp4"
  195. }
  196. };
  197. }
  198. }
  199. }