LgTvProfile.cs 6.3 KB

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