2
0

KodiProfile.cs 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. using MediaBrowser.Model.Dlna;
  2. using System.Xml.Serialization;
  3. namespace MediaBrowser.Dlna.Profiles
  4. {
  5. [XmlRoot("Profile")]
  6. public class KodiProfile : DefaultProfile
  7. {
  8. public KodiProfile()
  9. {
  10. Name = "Kodi";
  11. MaxStreamingBitrate = 100000000;
  12. MaxStaticBitrate = 100000000;
  13. MusicStreamingTranscodingBitrate = 1280000;
  14. MusicSyncBitrate = 1280000;
  15. TimelineOffsetSeconds = 5;
  16. Identification = new DeviceIdentification
  17. {
  18. ModelName = "Kodi",
  19. Headers = new[]
  20. {
  21. new HttpHeaderInfo {Name = "User-Agent", Value = "Kodi", Match = HeaderMatchType.Substring}
  22. }
  23. };
  24. TranscodingProfiles = new[]
  25. {
  26. new TranscodingProfile
  27. {
  28. Container = "mp3",
  29. AudioCodec = "mp3",
  30. Type = DlnaProfileType.Audio
  31. },
  32. new TranscodingProfile
  33. {
  34. Container = "ts",
  35. Type = DlnaProfileType.Video,
  36. AudioCodec = "aac",
  37. VideoCodec = "h264"
  38. },
  39. new TranscodingProfile
  40. {
  41. Container = "jpeg",
  42. Type = DlnaProfileType.Photo
  43. }
  44. };
  45. DirectPlayProfiles = new[]
  46. {
  47. new DirectPlayProfile
  48. {
  49. Container = "",
  50. Type = DlnaProfileType.Video
  51. },
  52. new DirectPlayProfile
  53. {
  54. Container = "",
  55. Type = DlnaProfileType.Audio
  56. },
  57. new DirectPlayProfile
  58. {
  59. Container = "",
  60. Type = DlnaProfileType.Photo,
  61. }
  62. };
  63. ResponseProfiles = new ResponseProfile[] { };
  64. ContainerProfiles = new ContainerProfile[] { };
  65. CodecProfiles = new CodecProfile[] { };
  66. SubtitleProfiles = new[]
  67. {
  68. new SubtitleProfile
  69. {
  70. Format = "srt",
  71. Method = SubtitleDeliveryMethod.External,
  72. },
  73. new SubtitleProfile
  74. {
  75. Format = "sub",
  76. Method = SubtitleDeliveryMethod.External,
  77. }
  78. };
  79. }
  80. }
  81. }