2
0

TranscodingProfile.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #pragma warning disable CS1591
  2. using System.ComponentModel;
  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; } = string.Empty;
  10. [XmlAttribute("type")]
  11. public DlnaProfileType Type { get; set; }
  12. [XmlAttribute("videoCodec")]
  13. public string VideoCodec { get; set; } = string.Empty;
  14. [XmlAttribute("audioCodec")]
  15. public string AudioCodec { get; set; } = string.Empty;
  16. [XmlAttribute("protocol")]
  17. public string Protocol { get; set; } = string.Empty;
  18. [DefaultValue(false)]
  19. [XmlAttribute("estimateContentLength")]
  20. public bool EstimateContentLength { get; set; }
  21. [DefaultValue(false)]
  22. [XmlAttribute("enableMpegtsM2TsMode")]
  23. public bool EnableMpegtsM2TsMode { get; set; }
  24. [DefaultValue(TranscodeSeekInfo.Auto)]
  25. [XmlAttribute("transcodeSeekInfo")]
  26. public TranscodeSeekInfo TranscodeSeekInfo { get; set; }
  27. [DefaultValue(false)]
  28. [XmlAttribute("copyTimestamps")]
  29. public bool CopyTimestamps { get; set; }
  30. [DefaultValue(EncodingContext.Streaming)]
  31. [XmlAttribute("context")]
  32. public EncodingContext Context { get; set; }
  33. [DefaultValue(false)]
  34. [XmlAttribute("enableSubtitlesInManifest")]
  35. public bool EnableSubtitlesInManifest { get; set; }
  36. [XmlAttribute("maxAudioChannels")]
  37. public string? MaxAudioChannels { get; set; }
  38. [DefaultValue(0)]
  39. [XmlAttribute("minSegments")]
  40. public int MinSegments { get; set; }
  41. [DefaultValue(0)]
  42. [XmlAttribute("segmentLength")]
  43. public int SegmentLength { get; set; }
  44. [DefaultValue(false)]
  45. [XmlAttribute("breakOnNonKeyFrames")]
  46. public bool BreakOnNonKeyFrames { get; set; }
  47. public string[] GetAudioCodecs()
  48. {
  49. return ContainerProfile.SplitValue(AudioCodec);
  50. }
  51. }
  52. }