DirectPlayProfile.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System.Collections.Generic;
  2. namespace MediaBrowser.Model.Dlna
  3. {
  4. public class DirectPlayProfile
  5. {
  6. public string Container { get; set; }
  7. public string AudioCodec { get; set; }
  8. public string VideoCodec { get; set; }
  9. public DlnaProfileType Type { get; set; }
  10. public List<string> GetContainers()
  11. {
  12. List<string> list = new List<string>();
  13. foreach (string i in (Container ?? string.Empty).Split(','))
  14. {
  15. if (!string.IsNullOrEmpty(i)) list.Add(i);
  16. }
  17. return list;
  18. }
  19. public List<string> GetAudioCodecs()
  20. {
  21. List<string> list = new List<string>();
  22. foreach (string i in (AudioCodec ?? string.Empty).Split(','))
  23. {
  24. if (!string.IsNullOrEmpty(i)) list.Add(i);
  25. }
  26. return list;
  27. }
  28. public List<string> GetVideoCodecs()
  29. {
  30. List<string> list = new List<string>();
  31. foreach (string i in (VideoCodec ?? string.Empty).Split(','))
  32. {
  33. if (!string.IsNullOrEmpty(i)) list.Add(i);
  34. }
  35. return list;
  36. }
  37. }
  38. }