2
0

TranscodingProfile.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using System.Collections.Generic;
  2. using System.Xml.Serialization;
  3. using MediaBrowser.Model.Dlna;
  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("copyTimestamps")]
  25. public bool CopyTimestamps { get; set; }
  26. [XmlAttribute("context")]
  27. public EncodingContext Context { get; set; }
  28. [XmlAttribute("enableSubtitlesInManifest")]
  29. public bool EnableSubtitlesInManifest { get; set; }
  30. [XmlAttribute("maxAudioChannels")]
  31. public string MaxAudioChannels { get; set; }
  32. [XmlAttribute("minSegments")]
  33. public int MinSegments { get; set; }
  34. [XmlAttribute("segmentLength")]
  35. public int SegmentLength { get; set; }
  36. [XmlAttribute("breakOnNonKeyFrames")]
  37. public bool BreakOnNonKeyFrames { get; set; }
  38. public List<string> GetAudioCodecs()
  39. {
  40. List<string> list = new List<string>();
  41. foreach (string i in (AudioCodec ?? string.Empty).Split(','))
  42. {
  43. if (!string.IsNullOrEmpty(i)) list.Add(i);
  44. }
  45. return list;
  46. }
  47. }
  48. }