ResponseProfile.cs 1.2 KB

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