2
0

DirectPlayProfile.cs 901 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Xml.Serialization;
  4. namespace MediaBrowser.Model.Dlna
  5. {
  6. public class DirectPlayProfile
  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. public bool SupportsContainer(string container)
  17. {
  18. return ContainerProfile.ContainsContainer(Container, container);
  19. }
  20. public string[] GetAudioCodecs()
  21. {
  22. return ContainerProfile.SplitValue(AudioCodec);
  23. }
  24. public string[] GetVideoCodecs()
  25. {
  26. return ContainerProfile.SplitValue(VideoCodec);
  27. }
  28. }
  29. }