TranscodingProfile.cs 2.1 KB

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