DirectPlayProfile.cs 968 B

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