ResponseProfile.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #nullable disable
  2. #pragma warning disable CS1591
  3. using System;
  4. using System.Xml.Serialization;
  5. namespace MediaBrowser.Model.Dlna
  6. {
  7. public class ResponseProfile
  8. {
  9. [XmlAttribute("container")]
  10. public string Container { get; set; }
  11. [XmlAttribute("audioCodec")]
  12. public string AudioCodec { get; set; }
  13. [XmlAttribute("videoCodec")]
  14. public string VideoCodec { get; set; }
  15. [XmlAttribute("type")]
  16. public DlnaProfileType Type { get; set; }
  17. [XmlAttribute("orgPn")]
  18. public string OrgPn { get; set; }
  19. [XmlAttribute("mimeType")]
  20. public string MimeType { get; set; }
  21. public ProfileCondition[] Conditions { get; set; }
  22. public ResponseProfile()
  23. {
  24. Conditions = Array.Empty<ProfileCondition>();
  25. }
  26. public string[] GetContainers()
  27. {
  28. return ContainerProfile.SplitValue(Container);
  29. }
  30. public string[] GetAudioCodecs()
  31. {
  32. return ContainerProfile.SplitValue(AudioCodec);
  33. }
  34. public string[] GetVideoCodecs()
  35. {
  36. return ContainerProfile.SplitValue(VideoCodec);
  37. }
  38. }
  39. }