TranscodingProfile.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #pragma warning disable CS1591
  2. #pragma warning disable SA1600
  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("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 string[] GetAudioCodecs()
  39. {
  40. return ContainerProfile.SplitValue(AudioCodec);
  41. }
  42. }
  43. }