StreamRequest.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using MediaBrowser.Controller.MediaEncoding;
  2. using MediaBrowser.Model.Dlna;
  3. using MediaBrowser.Model.Services;
  4. namespace MediaBrowser.Api.Playback
  5. {
  6. /// <summary>
  7. /// Class StreamRequest
  8. /// </summary>
  9. public class StreamRequest : BaseEncodingJobOptions
  10. {
  11. /// <summary>
  12. /// Gets or sets the id.
  13. /// </summary>
  14. /// <value>The id.</value>
  15. [ApiMember(Name = "Id", Description = "Item Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
  16. public string Id { get; set; }
  17. [ApiMember(Name = "MediaSourceId", Description = "The media version id, if playing an alternate version", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
  18. public string MediaSourceId { get; set; }
  19. [ApiMember(Name = "DeviceId", Description = "The device id of the client requesting. Used to stop encoding processes when needed.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
  20. public string DeviceId { get; set; }
  21. /// <summary>
  22. /// Gets or sets the audio codec.
  23. /// </summary>
  24. /// <value>The audio codec.</value>
  25. [ApiMember(Name = "AudioCodec", Description = "Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url's extension. Options: aac, mp3, vorbis, wma.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
  26. public string AudioCodec { get; set; }
  27. public string SubtitleCodec { get; set; }
  28. [ApiMember(Name = "DeviceProfileId", Description = "Optional. The dlna device profile id to utilize.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
  29. public string DeviceProfileId { get; set; }
  30. public string Params { get; set; }
  31. public string PlaySessionId { get; set; }
  32. public string LiveStreamId { get; set; }
  33. public string Tag { get; set; }
  34. }
  35. public class VideoStreamRequest : StreamRequest
  36. {
  37. /// <summary>
  38. /// Gets a value indicating whether this instance has fixed resolution.
  39. /// </summary>
  40. /// <value><c>true</c> if this instance has fixed resolution; otherwise, <c>false</c>.</value>
  41. public bool HasFixedResolution
  42. {
  43. get
  44. {
  45. return Width.HasValue || Height.HasValue;
  46. }
  47. }
  48. public bool EnableSubtitlesInManifest { get; set; }
  49. }
  50. }