DirectPlayProfile.cs 1015 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System.Collections.Generic;
  2. using System.Linq;
  3. namespace MediaBrowser.Controller.Dlna
  4. {
  5. public class DirectPlayProfile
  6. {
  7. public string[] Containers { get; set; }
  8. public string AudioCodec { get; set; }
  9. public string VideoCodec { get; set; }
  10. public DlnaProfileType Type { get; set; }
  11. public List<ProfileCondition> Conditions { get; set; }
  12. public DirectPlayProfile()
  13. {
  14. Conditions = new List<ProfileCondition>();
  15. Containers = new string[] { };
  16. }
  17. public List<string> GetAudioCodecs()
  18. {
  19. return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
  20. }
  21. public List<string> GetVideoCodecs()
  22. {
  23. return (VideoCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
  24. }
  25. }
  26. public enum DlnaProfileType
  27. {
  28. Audio = 0,
  29. Video = 1,
  30. Photo = 2
  31. }
  32. }