diff options
| -rw-r--r-- | MediaBrowser.Api/Playback/Hls/VideoHlsService.cs | 14 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/StreamRequest.cs | 14 |
2 files changed, 26 insertions, 2 deletions
diff --git a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs index 699d45de3..4931383b6 100644 --- a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs @@ -8,14 +8,14 @@ using ServiceStack.ServiceHost; namespace MediaBrowser.Api.Playback.Hls { [Route("/Videos/{Id}/stream.m3u8", "GET")] - [ServiceStack.ServiceHost.Api(Description = "Gets a video stream using HTTP live streaming.")] + [Api(Description = "Gets a video stream using HTTP live streaming.")] public class GetHlsVideoStream : VideoStreamRequest { } [Route("/Videos/{Id}/segments/{SegmentId}/stream.ts", "GET")] - [ServiceStack.ServiceHost.Api(Description = "Gets an Http live streaming segment file. Internal use only.")] + [Api(Description = "Gets an Http live streaming segment file. Internal use only.")] public class GetHlsVideoSegment { public string Id { get; set; } @@ -154,6 +154,16 @@ namespace MediaBrowser.Api.Playback.Hls args += " -vsync vfr"; + if (!string.IsNullOrEmpty(state.VideoRequest.Profile)) + { + args += " -profile:v " + state.VideoRequest.Profile; + } + + if (!string.IsNullOrEmpty(state.VideoRequest.Level)) + { + args += " -level 3 " + state.VideoRequest.Level; + } + if (state.SubtitleStream != null) { // This is for internal graphical subs diff --git a/MediaBrowser.Api/Playback/StreamRequest.cs b/MediaBrowser.Api/Playback/StreamRequest.cs index a0b0a1a72..d4da11e3f 100644 --- a/MediaBrowser.Api/Playback/StreamRequest.cs +++ b/MediaBrowser.Api/Playback/StreamRequest.cs @@ -135,5 +135,19 @@ namespace MediaBrowser.Api.Playback /// <value>The framerate.</value> [ApiMember(Name = "Framerate", Description = "Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements.", IsRequired = false, DataType = "double", ParameterType = "query", Verb = "GET")] public double? Framerate { get; set; } + + /// <summary> + /// Gets or sets the profile. + /// </summary> + /// <value>The profile.</value> + [ApiMember(Name = "Profile", Description = "Optional. Specify a specific h264 profile, e.g. main, baseline, high.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] + public string Profile { get; set; } + + /// <summary> + /// Gets or sets the level. + /// </summary> + /// <value>The level.</value> + [ApiMember(Name = "Level", Description = "Optional. Specify a level for the h264 profile, e.g. 3, 3.1.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")] + public string Level { get; set; } } } |
