LiveStreamRequest.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #nullable disable
  2. #pragma warning disable CS1591
  3. using System;
  4. using System.Collections.Generic;
  5. using MediaBrowser.Model.Dlna;
  6. namespace MediaBrowser.Model.MediaInfo
  7. {
  8. public class LiveStreamRequest
  9. {
  10. public LiveStreamRequest()
  11. {
  12. EnableDirectPlay = true;
  13. EnableDirectStream = true;
  14. DirectPlayProtocols = new MediaProtocol[] { MediaProtocol.Http };
  15. }
  16. public LiveStreamRequest(AudioOptions options)
  17. {
  18. MaxStreamingBitrate = options.MaxBitrate;
  19. ItemId = options.ItemId;
  20. DeviceProfile = options.Profile;
  21. MaxAudioChannels = options.MaxAudioChannels;
  22. DirectPlayProtocols = new MediaProtocol[] { MediaProtocol.Http };
  23. if (options is VideoOptions videoOptions)
  24. {
  25. AudioStreamIndex = videoOptions.AudioStreamIndex;
  26. SubtitleStreamIndex = videoOptions.SubtitleStreamIndex;
  27. }
  28. }
  29. public string OpenToken { get; set; }
  30. public Guid UserId { get; set; }
  31. public string PlaySessionId { get; set; }
  32. public int? MaxStreamingBitrate { get; set; }
  33. public long? StartTimeTicks { get; set; }
  34. public int? AudioStreamIndex { get; set; }
  35. public int? SubtitleStreamIndex { get; set; }
  36. public int? MaxAudioChannels { get; set; }
  37. public Guid ItemId { get; set; }
  38. public DeviceProfile DeviceProfile { get; set; }
  39. public bool EnableDirectPlay { get; set; }
  40. public bool EnableDirectStream { get; set; }
  41. public IReadOnlyList<MediaProtocol> DirectPlayProtocols { get; set; }
  42. }
  43. }