LgTvProfile.cs 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. #pragma warning disable CS1591
  2. #pragma warning disable SA1600
  3. using MediaBrowser.Model.Dlna;
  4. namespace Emby.Dlna.Profiles
  5. {
  6. [System.Xml.Serialization.XmlRoot("Profile")]
  7. public class LgTvProfile : DefaultProfile
  8. {
  9. public LgTvProfile()
  10. {
  11. Name = "LG Smart TV";
  12. TimelineOffsetSeconds = 10;
  13. Identification = new DeviceIdentification
  14. {
  15. FriendlyName = @"LG.*",
  16. Headers = new[]
  17. {
  18. new HttpHeaderInfo
  19. {
  20. Name = "User-Agent",
  21. Value = "LG",
  22. Match = HeaderMatchType.Substring
  23. }
  24. }
  25. };
  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,aac,mp3",
  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 = "ts,mpegts,avi,mkv,m2ts",
  52. VideoCodec = "h264",
  53. AudioCodec = "aac,ac3,eac3,mp3,dca,dts",
  54. Type = DlnaProfileType.Video
  55. },
  56. new DirectPlayProfile
  57. {
  58. Container = "mp4,m4v",
  59. VideoCodec = "h264,mpeg4",
  60. AudioCodec = "aac,ac3,eac3,mp3,dca,dts",
  61. Type = DlnaProfileType.Video
  62. },
  63. new DirectPlayProfile
  64. {
  65. Container = "mp3",
  66. Type = DlnaProfileType.Audio
  67. },
  68. new DirectPlayProfile
  69. {
  70. Container = "jpeg",
  71. Type = DlnaProfileType.Photo
  72. }
  73. };
  74. ContainerProfiles = new[]
  75. {
  76. new ContainerProfile
  77. {
  78. Type = DlnaProfileType.Photo,
  79. Conditions = new []
  80. {
  81. new ProfileCondition
  82. {
  83. Condition = ProfileConditionType.LessThanEqual,
  84. Property = ProfileConditionValue.Width,
  85. Value = "1920"
  86. },
  87. new ProfileCondition
  88. {
  89. Condition = ProfileConditionType.LessThanEqual,
  90. Property = ProfileConditionValue.Height,
  91. Value = "1080"
  92. }
  93. }
  94. }
  95. };
  96. CodecProfiles = new[]
  97. {
  98. new CodecProfile
  99. {
  100. Type = CodecType.Video,
  101. Codec = "mpeg4",
  102. Conditions = new[]
  103. {
  104. new ProfileCondition
  105. {
  106. Condition = ProfileConditionType.LessThanEqual,
  107. Property = ProfileConditionValue.Width,
  108. Value = "1920"
  109. },
  110. new ProfileCondition
  111. {
  112. Condition = ProfileConditionType.LessThanEqual,
  113. Property = ProfileConditionValue.Height,
  114. Value = "1080"
  115. },
  116. new ProfileCondition
  117. {
  118. Condition = ProfileConditionType.LessThanEqual,
  119. Property = ProfileConditionValue.VideoFramerate,
  120. Value = "30"
  121. }
  122. }
  123. },
  124. new CodecProfile
  125. {
  126. Type = CodecType.Video,
  127. Codec = "h264",
  128. Conditions = new[]
  129. {
  130. new ProfileCondition
  131. {
  132. Condition = ProfileConditionType.LessThanEqual,
  133. Property = ProfileConditionValue.Width,
  134. Value = "1920"
  135. },
  136. new ProfileCondition
  137. {
  138. Condition = ProfileConditionType.LessThanEqual,
  139. Property = ProfileConditionValue.Height,
  140. Value = "1080"
  141. },
  142. new ProfileCondition
  143. {
  144. Condition = ProfileConditionType.LessThanEqual,
  145. Property = ProfileConditionValue.VideoLevel,
  146. Value = "41"
  147. }
  148. }
  149. },
  150. new CodecProfile
  151. {
  152. Type = CodecType.VideoAudio,
  153. Codec = "ac3,eac3,aac,mp3",
  154. Conditions = new[]
  155. {
  156. new ProfileCondition
  157. {
  158. Condition = ProfileConditionType.LessThanEqual,
  159. Property = ProfileConditionValue.AudioChannels,
  160. Value = "6"
  161. }
  162. }
  163. }
  164. };
  165. SubtitleProfiles = new[]
  166. {
  167. new SubtitleProfile
  168. {
  169. Format = "srt",
  170. Method = SubtitleDeliveryMethod.Embed
  171. },
  172. new SubtitleProfile
  173. {
  174. Format = "srt",
  175. Method = SubtitleDeliveryMethod.External
  176. }
  177. };
  178. ResponseProfiles = new ResponseProfile[]
  179. {
  180. new ResponseProfile
  181. {
  182. Container = "m4v",
  183. Type = DlnaProfileType.Video,
  184. MimeType = "video/mp4"
  185. },
  186. new ResponseProfile
  187. {
  188. Container = "ts,mpegts",
  189. Type = DlnaProfileType.Video,
  190. MimeType = "video/mpeg"
  191. }
  192. };
  193. }
  194. }
  195. }