DeviceProfile.cs 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #pragma warning disable CA1819 // Properties should not return arrays
  2. using System;
  3. using System.Xml.Serialization;
  4. namespace MediaBrowser.Model.Dlna
  5. {
  6. /// <summary>
  7. /// A <see cref="DeviceProfile" /> represents a set of metadata which determines which content a certain device is able to play.
  8. /// <br/>
  9. /// Specifically, it defines the supported <see cref="ContainerProfiles">containers</see> and
  10. /// <see cref="CodecProfiles">codecs</see> (video and/or audio, including codec profiles and levels)
  11. /// the device is able to direct play (without transcoding or remuxing),
  12. /// as well as which <see cref="TranscodingProfiles">containers/codecs to transcode to</see> in case it isn't.
  13. /// </summary>
  14. public class DeviceProfile
  15. {
  16. /// <summary>
  17. /// Gets or sets the name of this device profile.
  18. /// </summary>
  19. public string? Name { get; set; }
  20. /// <summary>
  21. /// Gets or sets the Id.
  22. /// </summary>
  23. [XmlIgnore]
  24. public string? Id { get; set; }
  25. /// <summary>
  26. /// Gets or sets the maximum allowed bitrate for all streamed content.
  27. /// </summary>
  28. public int? MaxStreamingBitrate { get; set; } = 8000000;
  29. /// <summary>
  30. /// Gets or sets the maximum allowed bitrate for statically streamed content (= direct played files).
  31. /// </summary>
  32. public int? MaxStaticBitrate { get; set; } = 8000000;
  33. /// <summary>
  34. /// Gets or sets the maximum allowed bitrate for transcoded music streams.
  35. /// </summary>
  36. public int? MusicStreamingTranscodingBitrate { get; set; } = 128000;
  37. /// <summary>
  38. /// Gets or sets the maximum allowed bitrate for statically streamed (= direct played) music files.
  39. /// </summary>
  40. public int? MaxStaticMusicBitrate { get; set; } = 8000000;
  41. /// <summary>
  42. /// Gets or sets the direct play profiles.
  43. /// </summary>
  44. public DirectPlayProfile[] DirectPlayProfiles { get; set; } = Array.Empty<DirectPlayProfile>();
  45. /// <summary>
  46. /// Gets or sets the transcoding profiles.
  47. /// </summary>
  48. public TranscodingProfile[] TranscodingProfiles { get; set; } = Array.Empty<TranscodingProfile>();
  49. /// <summary>
  50. /// Gets or sets the container profiles.
  51. /// </summary>
  52. public ContainerProfile[] ContainerProfiles { get; set; } = Array.Empty<ContainerProfile>();
  53. /// <summary>
  54. /// Gets or sets the codec profiles.
  55. /// </summary>
  56. public CodecProfile[] CodecProfiles { get; set; } = Array.Empty<CodecProfile>();
  57. /// <summary>
  58. /// Gets or sets the subtitle profiles.
  59. /// </summary>
  60. public SubtitleProfile[] SubtitleProfiles { get; set; } = Array.Empty<SubtitleProfile>();
  61. }
  62. }