2
0

DeviceProfile.cs 2.5 KB

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