From f01528f435e6b1f02d118fcd8305a148c27a89f1 Mon Sep 17 00:00:00 2001 From: James Dong Date: Wed, 28 Jul 2010 10:08:03 -0700 Subject: Interleave the audio and video by default - default interleave duration is set to 1 second This can dramatically reduce the memory usage by the MP4 file writer. Change-Id: Ia3ff202cabfcd2d3f183065d31e4596617c2dded --- media/libmediaplayerservice/StagefrightRecorder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'media/libmediaplayerservice/StagefrightRecorder.cpp') diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index b56f997..f26676d 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -981,8 +981,10 @@ status_t StagefrightRecorder::startMPEG4Recording() { totalBitRate += mVideoBitRate; } - reinterpret_cast(writer.get())-> - setInterleaveDuration(mInterleaveDurationUs); + if (mInterleaveDurationUs > 0) { + reinterpret_cast(writer.get())-> + setInterleaveDuration(mInterleaveDurationUs); + } if (mMaxFileDurationUs != 0) { writer->setMaxFileDuration(mMaxFileDurationUs); -- cgit v1.1