LgTvProfile.cs 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. using MediaBrowser.Model.Dlna;
  2. using System.Xml.Serialization;
  3. namespace Emby.Dlna.Profiles
  4. {
  5. [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",
  51. VideoCodec = "h264",
  52. AudioCodec = "aac,ac3,mp3,dca,dts",
  53. Type = DlnaProfileType.Video
  54. },
  55. new DirectPlayProfile
  56. {
  57. Container = "mkv",
  58. VideoCodec = "h264",
  59. AudioCodec = "aac,ac3,mp3,dca,dts",
  60. Type = DlnaProfileType.Video
  61. },
  62. new DirectPlayProfile
  63. {
  64. Container = "mp4",
  65. VideoCodec = "h264,mpeg4",
  66. AudioCodec = "aac,ac3,mp3,dca,dts",
  67. Type = DlnaProfileType.Video
  68. },
  69. new DirectPlayProfile
  70. {
  71. Container = "mp3",
  72. Type = DlnaProfileType.Audio
  73. },
  74. new DirectPlayProfile
  75. {
  76. Container = "jpeg",
  77. Type = DlnaProfileType.Photo
  78. }
  79. };
  80. ContainerProfiles = new[]
  81. {
  82. new ContainerProfile
  83. {
  84. Type = DlnaProfileType.Photo,
  85. Conditions = new []
  86. {
  87. new ProfileCondition
  88. {
  89. Condition = ProfileConditionType.LessThanEqual,
  90. Property = ProfileConditionValue.Width,
  91. Value = "1920"
  92. },
  93. new ProfileCondition
  94. {
  95. Condition = ProfileConditionType.LessThanEqual,
  96. Property = ProfileConditionValue.Height,
  97. Value = "1080"
  98. }
  99. }
  100. }
  101. };
  102. CodecProfiles = new[]
  103. {
  104. new CodecProfile
  105. {
  106. Type = CodecType.Video,
  107. Codec = "mpeg4",
  108. Conditions = new[]
  109. {
  110. new ProfileCondition
  111. {
  112. Condition = ProfileConditionType.LessThanEqual,
  113. Property = ProfileConditionValue.Width,
  114. Value = "1920"
  115. },
  116. new ProfileCondition
  117. {
  118. Condition = ProfileConditionType.LessThanEqual,
  119. Property = ProfileConditionValue.Height,
  120. Value = "1080"
  121. },
  122. new ProfileCondition
  123. {
  124. Condition = ProfileConditionType.LessThanEqual,
  125. Property = ProfileConditionValue.VideoFramerate,
  126. Value = "30"
  127. }
  128. }
  129. },
  130. new CodecProfile
  131. {
  132. Type = CodecType.Video,
  133. Codec = "h264",
  134. Conditions = new[]
  135. {
  136. new ProfileCondition
  137. {
  138. Condition = ProfileConditionType.LessThanEqual,
  139. Property = ProfileConditionValue.Width,
  140. Value = "1920"
  141. },
  142. new ProfileCondition
  143. {
  144. Condition = ProfileConditionType.LessThanEqual,
  145. Property = ProfileConditionValue.Height,
  146. Value = "1080"
  147. },
  148. new ProfileCondition
  149. {
  150. Condition = ProfileConditionType.LessThanEqual,
  151. Property = ProfileConditionValue.VideoFramerate,
  152. Value = "30"
  153. },
  154. new ProfileCondition
  155. {
  156. Condition = ProfileConditionType.LessThanEqual,
  157. Property = ProfileConditionValue.VideoLevel,
  158. Value = "41"
  159. }
  160. }
  161. },
  162. new CodecProfile
  163. {
  164. Type = CodecType.VideoAudio,
  165. Codec = "ac3,aac,mp3",
  166. Conditions = new[]
  167. {
  168. new ProfileCondition
  169. {
  170. Condition = ProfileConditionType.LessThanEqual,
  171. Property = ProfileConditionValue.AudioChannels,
  172. Value = "6"
  173. }
  174. }
  175. }
  176. };
  177. SubtitleProfiles = new[]
  178. {
  179. new SubtitleProfile
  180. {
  181. Format = "srt",
  182. Method = SubtitleDeliveryMethod.Embed
  183. },
  184. new SubtitleProfile
  185. {
  186. Format = "srt",
  187. Method = SubtitleDeliveryMethod.External
  188. }
  189. };
  190. ResponseProfiles = new ResponseProfile[] { };
  191. }
  192. }
  193. }