aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback/Progressive
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Playback/Progressive')
-rw-r--r--MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs5
-rw-r--r--MediaBrowser.Api/Playback/Progressive/VideoService.cs4
2 files changed, 6 insertions, 3 deletions
diff --git a/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs b/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs
index 6a3443f35..adedd9461 100644
--- a/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs
+++ b/MediaBrowser.Api/Playback/Progressive/ProgressiveStreamWriter.cs
@@ -91,6 +91,9 @@ namespace MediaBrowser.Api.Playback.Progressive
private readonly IFileSystem _fileSystem;
private readonly TranscodingJob _job;
+ // 256k
+ private const int BufferSize = 262144;
+
private long _bytesWritten = 0;
public ProgressiveFileCopier(IFileSystem fileSystem, TranscodingJob job)
@@ -108,7 +111,7 @@ namespace MediaBrowser.Api.Playback.Progressive
{
while (eofCount < 15)
{
- CopyToInternal(fs, outputStream, 81920);
+ CopyToInternal(fs, outputStream, BufferSize);
var fsPosition = fs.Position;
diff --git a/MediaBrowser.Api/Playback/Progressive/VideoService.cs b/MediaBrowser.Api/Playback/Progressive/VideoService.cs
index ebd72b2ce..84ae26248 100644
--- a/MediaBrowser.Api/Playback/Progressive/VideoService.cs
+++ b/MediaBrowser.Api/Playback/Progressive/VideoService.cs
@@ -89,7 +89,7 @@ namespace MediaBrowser.Api.Playback.Progressive
protected override string GetCommandLineArguments(string outputPath, StreamState state, bool isEncoding)
{
// Get the output codec name
- var videoCodec = GetVideoEncoder(state.VideoRequest);
+ var videoCodec = GetVideoEncoder(state);
var format = string.Empty;
var keyFrame = string.Empty;
@@ -183,7 +183,7 @@ namespace MediaBrowser.Api.Playback.Progressive
}
// Get the output codec name
- var codec = GetAudioEncoder(state.Request);
+ var codec = GetAudioEncoder(state);
var args = "-codec:a:0 " + codec;