TranscodingProfile.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System.Collections.Generic;
  2. using System.Linq;
  3. using System.Xml.Serialization;
  4. namespace MediaBrowser.Model.Dlna
  5. {
  6. public class TranscodingProfile
  7. {
  8. [XmlAttribute("container")]
  9. public string Container { get; set; }
  10. [XmlAttribute("type")]
  11. public DlnaProfileType Type { get; set; }
  12. [XmlAttribute("videoCodec")]
  13. public string VideoCodec { get; set; }
  14. [XmlAttribute("audioCodec")]
  15. public string AudioCodec { get; set; }
  16. [XmlAttribute("protocol")]
  17. public string Protocol { get; set; }
  18. [XmlAttribute("estimateContentLength")]
  19. public bool EstimateContentLength { get; set; }
  20. [XmlAttribute("enableMpegtsM2TsMode")]
  21. public bool EnableMpegtsM2TsMode { get; set; }
  22. [XmlAttribute("transcodeSeekInfo")]
  23. public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
  24. [XmlAttribute("videoProfile")]
  25. public string VideoProfile { get; set; }
  26. public List<string> GetAudioCodecs()
  27. {
  28. return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
  29. }
  30. }
  31. public enum TranscodeSeekInfo
  32. {
  33. Auto = 0,
  34. Bytes = 1
  35. }
  36. }