AndroidProfile.cs 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. using System.Xml.Serialization;
  2. namespace MediaBrowser.Model.Dlna.Profiles
  3. {
  4. [XmlRoot("Profile")]
  5. public class AndroidProfile : DefaultProfile
  6. {
  7. public AndroidProfile()
  8. {
  9. Name = "Android";
  10. TranscodingProfiles = new[]
  11. {
  12. new TranscodingProfile
  13. {
  14. Container = "mp3",
  15. AudioCodec = "mp3",
  16. Type = DlnaProfileType.Audio
  17. },
  18. new TranscodingProfile
  19. {
  20. Protocol = "hls",
  21. Container = "ts",
  22. VideoCodec = "h264",
  23. AudioCodec = "aac",
  24. Type = DlnaProfileType.Video,
  25. VideoProfile = "Baseline",
  26. Context = EncodingContext.Streaming
  27. },
  28. new TranscodingProfile
  29. {
  30. Container = "mp4",
  31. VideoCodec = "h264",
  32. AudioCodec = "aac",
  33. Type = DlnaProfileType.Video,
  34. VideoProfile = "Baseline",
  35. Context = EncodingContext.Static
  36. }
  37. };
  38. DirectPlayProfiles = new[]
  39. {
  40. new DirectPlayProfile
  41. {
  42. Container = "mp4",
  43. VideoCodec = "h264,mpeg4",
  44. AudioCodec = "aac",
  45. Type = DlnaProfileType.Video
  46. },
  47. new DirectPlayProfile
  48. {
  49. Container = "mp4,aac",
  50. AudioCodec = "aac",
  51. Type = DlnaProfileType.Audio
  52. },
  53. new DirectPlayProfile
  54. {
  55. Container = "mp3",
  56. AudioCodec = "mp3",
  57. Type = DlnaProfileType.Audio
  58. },
  59. new DirectPlayProfile
  60. {
  61. Container = "flac",
  62. AudioCodec = "flac",
  63. Type = DlnaProfileType.Audio
  64. },
  65. new DirectPlayProfile
  66. {
  67. Container = "ogg",
  68. AudioCodec = "vorbis",
  69. Type = DlnaProfileType.Audio
  70. },
  71. new DirectPlayProfile
  72. {
  73. Container = "jpeg,png,gif,bmp",
  74. Type = DlnaProfileType.Photo
  75. }
  76. };
  77. CodecProfiles = new[]
  78. {
  79. new CodecProfile
  80. {
  81. Type = CodecType.Video,
  82. Conditions = new []
  83. {
  84. new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Width, "1920"),
  85. new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Height, "1080"),
  86. new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.VideoBitDepth, "8"),
  87. new ProfileCondition(ProfileConditionType.NotEquals, ProfileConditionValue.IsAnamorphic, "true")
  88. }
  89. },
  90. new CodecProfile
  91. {
  92. Type = CodecType.VideoAudio,
  93. Codec = "aac",
  94. Conditions = new []
  95. {
  96. new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.AudioChannels, "2")
  97. }
  98. },
  99. new CodecProfile
  100. {
  101. Type = CodecType.Audio,
  102. Codec = "aac",
  103. Conditions = new []
  104. {
  105. new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.AudioChannels, "2")
  106. }
  107. },
  108. new CodecProfile
  109. {
  110. Type = CodecType.Audio,
  111. Codec = "mp3",
  112. Conditions = new []
  113. {
  114. new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.AudioChannels, "2"),
  115. new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.AudioBitrate, "320000")
  116. }
  117. }
  118. };
  119. }
  120. }
  121. }