MediaProfile.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System.Collections.Generic;
  2. using System.Linq;
  3. namespace MediaBrowser.Controller.Dlna
  4. {
  5. public class MediaProfile
  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 string OrgPn { get; set; }
  12. public string MimeType { get; set; }
  13. public ProfileCondition[] Conditions { get; set; }
  14. public MediaProfile()
  15. {
  16. Conditions = new ProfileCondition[] {};
  17. }
  18. public List<string> GetContainers()
  19. {
  20. return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
  21. }
  22. public List<string> GetAudioCodecs()
  23. {
  24. return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
  25. }
  26. public List<string> GetVideoCodecs()
  27. {
  28. return (VideoCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
  29. }
  30. }
  31. }