TranscodingProfile.cs 1.3 KB

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