From 26a4969ea2f2e82a52909e5e6ea1a9956bd42903 Mon Sep 17 00:00:00 2001 From: Matt Brannock Date: Mon, 9 Feb 2015 15:01:10 -0800 Subject: [PATCH] Increase packager input/output file buffers to 2MB Increases the read/write buffers for packager input and output files to 2MB from 256KB, which helps throughput when using network file systems. Change-Id: Iff5d1b796ba4648f1436e0559c0ca2d353b6c4b5 --- packager/media/base/demuxer.cc | 2 +- packager/media/formats/mp4/single_segment_segmenter.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packager/media/base/demuxer.cc b/packager/media/base/demuxer.cc index e9ce0ce3de..38b404ab11 100644 --- a/packager/media/base/demuxer.cc +++ b/packager/media/base/demuxer.cc @@ -23,7 +23,7 @@ namespace { const size_t kInitBufSize = 0x4000; // 16KB, sufficient to determine the // container and likely all init data. -const size_t kBufSize = 0x40000; // 256KB. +const size_t kBufSize = 0x200000; // 2MB } namespace edash_packager { diff --git a/packager/media/formats/mp4/single_segment_segmenter.cc b/packager/media/formats/mp4/single_segment_segmenter.cc index a0bc6bba82..635d538be7 100644 --- a/packager/media/formats/mp4/single_segment_segmenter.cc +++ b/packager/media/formats/mp4/single_segment_segmenter.cc @@ -107,7 +107,7 @@ Status SingleSegmentSegmenter::DoFinalize() { "Cannot open file to read " + temp_file_name_); } - const int kBufSize = 0x40000; // 256KB. + const int kBufSize = 0x200000; // 2MB. scoped_ptr buf(new uint8_t[kBufSize]); while (!temp_file->Eof()) { int64_t size = temp_file->Read(buf.get(), kBufSize);