TranscodingProfile.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System.Xml.Serialization;
  2. namespace MediaBrowser.Model.Dlna
  3. {
  4. public class TranscodingProfile
  5. {
  6. [XmlAttribute("container")]
  7. public string Container { get; set; }
  8. [XmlAttribute("type")]
  9. public DlnaProfileType Type { get; set; }
  10. [XmlAttribute("videoCodec")]
  11. public string VideoCodec { get; set; }
  12. [XmlAttribute("audioCodec")]
  13. public string AudioCodec { get; set; }
  14. [XmlAttribute("protocol")]
  15. public string Protocol { get; set; }
  16. [XmlAttribute("estimateContentLength")]
  17. public bool EstimateContentLength { get; set; }
  18. [XmlAttribute("enableMpegtsM2TsMode")]
  19. public bool EnableMpegtsM2TsMode { get; set; }
  20. [XmlAttribute("transcodeSeekInfo")]
  21. public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
  22. [XmlAttribute("copyTimestamps")]
  23. public bool CopyTimestamps { get; set; }
  24. [XmlAttribute("context")]
  25. public EncodingContext Context { get; set; }
  26. [XmlAttribute("enableSubtitlesInManifest")]
  27. public bool EnableSubtitlesInManifest { get; set; }
  28. [XmlAttribute("maxAudioChannels")]
  29. public string MaxAudioChannels { get; set; }
  30. [XmlAttribute("minSegments")]
  31. public int MinSegments { get; set; }
  32. [XmlAttribute("segmentLength")]
  33. public int SegmentLength { get; set; }
  34. [XmlAttribute("breakOnNonKeyFrames")]
  35. public bool BreakOnNonKeyFrames { get; set; }
  36. public string[] GetAudioCodecs()
  37. {
  38. return ContainerProfile.SplitValue(AudioCodec);
  39. }
  40. }
  41. }