From 49e87a34a3f3f57716df980c33022336ef9dad0d Mon Sep 17 00:00:00 2001 From: Rintaro Kuroiwa Date: Tue, 5 Apr 2016 23:32:44 -0700 Subject: [PATCH] Expose memory file system prefix - Memory file system prefix should be exposed for testing. Change-Id: Id284d77084b98c8175cdd485480f2fc49241e137 --- packager/media/file/file.h | 1 + packager/media/formats/webm/segmenter_test_base.cc | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packager/media/file/file.h b/packager/media/file/file.h index f1a54d035b..e361c2f240 100644 --- a/packager/media/file/file.h +++ b/packager/media/file/file.h @@ -17,6 +17,7 @@ namespace edash_packager { namespace media { extern const char* kLocalFilePrefix; +extern const char* kMemoryFilePrefix; const int64_t kWholeFile = -1; /// Define an abstract file interface. diff --git a/packager/media/formats/webm/segmenter_test_base.cc b/packager/media/formats/webm/segmenter_test_base.cc index 54100ac22b..628fba8062 100644 --- a/packager/media/formats/webm/segmenter_test_base.cc +++ b/packager/media/formats/webm/segmenter_test_base.cc @@ -39,8 +39,9 @@ const uint8_t kNaluLengthSize = 0; SegmentTestBase::SegmentTestBase() {} void SegmentTestBase::SetUp() { - output_file_name_ = "memory://output-file.webm"; - segment_template_ = "memory://output-template-$Number$.webm"; + output_file_name_ = std::string(kMemoryFilePrefix) + "output-file.webm"; + segment_template_ = + std::string(kMemoryFilePrefix) + "output-template-$Number$.webm"; cur_time_timescale_ = 0; single_segment_ = true; } @@ -84,7 +85,7 @@ MuxerOptions SegmentTestBase::CreateMuxerOptions() const { ret.fragment_sap_aligned = false; // Use memory files for temp storage. Normally this would be a bad idea // since it wouldn't support large files, but for tests the files are small. - ret.temp_dir = "memory://temp/"; + ret.temp_dir = std::string(kMemoryFilePrefix) + "temp/"; return ret; }