aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs10
-rw-r--r--MediaBrowser.Api/Playback/Hls/VideoHlsService.cs8
-rw-r--r--MediaBrowser.Api/Playback/StreamRequest.cs8
3 files changed, 9 insertions, 17 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 4b0406cde..d7f7e2f98 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -1590,7 +1590,7 @@ namespace MediaBrowser.Api.Playback
}
}
- return SupportsAutomaticVideoStreamCopy;
+ return request.EnableAutoStreamCopy;
}
private bool CanStreamCopyAudio(StreamRequest request, MediaStream audioStream, List<string> supportedAudioCodecs)
@@ -1632,14 +1632,6 @@ namespace MediaBrowser.Api.Playback
return true;
}
- protected virtual bool SupportsAutomaticVideoStreamCopy
- {
- get
- {
- return false;
- }
- }
-
private void ApplyDeviceProfileSettings(StreamState state)
{
var headers = new Dictionary<string, string>();
diff --git a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs
index bedf742c2..1bca4cae9 100644
--- a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs
@@ -98,14 +98,6 @@ namespace MediaBrowser.Api.Playback.Hls
ApiEntryPoint.Instance.OnTranscodeEndRequest(playlist, TranscodingJobType.Hls);
}
- protected override bool SupportsAutomaticVideoStreamCopy
- {
- get
- {
- return true;
- }
- }
-
/// <summary>
/// Gets the specified request.
/// </summary>
diff --git a/MediaBrowser.Api/Playback/StreamRequest.cs b/MediaBrowser.Api/Playback/StreamRequest.cs
index add517b5d..d5355783e 100644
--- a/MediaBrowser.Api/Playback/StreamRequest.cs
+++ b/MediaBrowser.Api/Playback/StreamRequest.cs
@@ -171,5 +171,13 @@ namespace MediaBrowser.Api.Playback
return Width.HasValue || Height.HasValue;
}
}
+
+ [ApiMember(Name = "EnableAutoStreamCopy", Description = "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
+ public bool EnableAutoStreamCopy { get; set; }
+
+ public VideoStreamRequest()
+ {
+ EnableAutoStreamCopy = true;
+ }
}
}