DefaultProfile.cs 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. using MediaBrowser.Controller.Dlna;
  2. using System.Xml.Serialization;
  3. namespace MediaBrowser.Dlna.Profiles
  4. {
  5. [XmlRoot("Profile")]
  6. public class DefaultProfile : DeviceProfile
  7. {
  8. public DefaultProfile()
  9. {
  10. Name = "Generic Device";
  11. ProtocolInfo = "DLNA";
  12. FriendlyName = "Media Browser";
  13. Manufacturer = "Media Browser";
  14. ModelDescription = "Media Browser";
  15. ModelName = "Media Browser";
  16. ModelNumber = "Media Browser";
  17. ModelUrl = "http://mediabrowser3.com/";
  18. ManufacturerUrl = "http://mediabrowser3.com/";
  19. TranscodingProfiles = new[]
  20. {
  21. new TranscodingProfile
  22. {
  23. Container = "mp3",
  24. AudioCodec = "mp3",
  25. Type = DlnaProfileType.Audio
  26. },
  27. new TranscodingProfile
  28. {
  29. Container = "ts",
  30. Type = DlnaProfileType.Video,
  31. AudioCodec = "aac",
  32. VideoCodec = "h264",
  33. Settings = new []
  34. {
  35. new TranscodingSetting {Name = TranscodingSettingType.VideoProfile, Value = "baseline"}
  36. }
  37. }
  38. };
  39. DirectPlayProfiles = new[]
  40. {
  41. new DirectPlayProfile
  42. {
  43. Container = "mp3,wma",
  44. Type = DlnaProfileType.Audio
  45. },
  46. new DirectPlayProfile
  47. {
  48. Container = "avi,mp4",
  49. Type = DlnaProfileType.Video
  50. }
  51. };
  52. CodecProfiles = new[]
  53. {
  54. new CodecProfile
  55. {
  56. Type = CodecType.VideoCodec,
  57. Conditions = new []
  58. {
  59. new ProfileCondition
  60. {
  61. Condition = ProfileConditionType.LessThanEqual,
  62. Property = ProfileConditionValue.VideoLevel,
  63. Value = "3",
  64. IsRequired = false
  65. }
  66. }
  67. }
  68. };
  69. }
  70. }
  71. }