TranscodingProfile.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. [XmlAttribute("forceLiveStream")]
  28. public bool ForceLiveStream { get; set; }
  29. public List<string> GetAudioCodecs()
  30. {
  31. List<string> list = new List<string>();
  32. foreach (string i in (AudioCodec ?? string.Empty).Split(','))
  33. {
  34. if (!string.IsNullOrEmpty(i)) list.Add(i);
  35. }
  36. return list;
  37. }
  38. }
  39. }