LiveStreamRequest.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using MediaBrowser.Model.Dlna;
  2. namespace MediaBrowser.Model.MediaInfo
  3. {
  4. public class LiveStreamRequest
  5. {
  6. public string OpenToken { get; set; }
  7. public string UserId { get; set; }
  8. public string PlaySessionId { get; set; }
  9. public long? MaxStreamingBitrate { get; set; }
  10. public long? StartTimeTicks { get; set; }
  11. public int? AudioStreamIndex { get; set; }
  12. public int? SubtitleStreamIndex { get; set; }
  13. public int? MaxAudioChannels { get; set; }
  14. public string ItemId { get; set; }
  15. public DeviceProfile DeviceProfile { get; set; }
  16. public bool EnableDirectPlay { get; set; }
  17. public bool EnableDirectStream { get; set; }
  18. public bool EnableMediaProbe { get; set; }
  19. public LiveStreamRequest()
  20. {
  21. EnableDirectPlay = true;
  22. EnableDirectStream = true;
  23. EnableMediaProbe = true;
  24. }
  25. public LiveStreamRequest(AudioOptions options)
  26. {
  27. MaxStreamingBitrate = options.MaxBitrate;
  28. ItemId = options.ItemId;
  29. DeviceProfile = options.Profile;
  30. MaxAudioChannels = options.MaxAudioChannels;
  31. VideoOptions videoOptions = options as VideoOptions;
  32. if (videoOptions != null)
  33. {
  34. AudioStreamIndex = videoOptions.AudioStreamIndex;
  35. SubtitleStreamIndex = videoOptions.SubtitleStreamIndex;
  36. }
  37. }
  38. }
  39. }