The Free Software Media System - Server Backend & API
added profile and level params for hls
Luke Pulverenti071e13fb4cb0
diff --git a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs b/MediaBrowser.Api/Playback/Hls/VideoHlsService.csindex 699d45de3f..4931383b67 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.Hlsargs += " -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 subsdiff --git a/MediaBrowser.Api/Playback/StreamRequest.cs b/MediaBrowser.Api/Playback/StreamRequest.csindex a0b0a1a72d..d4da11e3f3 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; }}}