LgTvProfile.cs 6.7 KB

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