summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/StagefrightRecorder.cpp
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-07-28 10:08:03 -0700
committerJames Dong <jdong@google.com>2010-07-28 10:08:03 -0700
commitf01528f435e6b1f02d118fcd8305a148c27a89f1 (patch)
tree82d72c57f4f99358d361242029396ef133bd2062 /media/libmediaplayerservice/StagefrightRecorder.cpp
parent542db5d438988360d491a5add1040a2df9aa90c9 (diff)
downloadframeworks_av-f01528f435e6b1f02d118fcd8305a148c27a89f1.zip
frameworks_av-f01528f435e6b1f02d118fcd8305a148c27a89f1.tar.gz
frameworks_av-f01528f435e6b1f02d118fcd8305a148c27a89f1.tar.bz2
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
Diffstat (limited to 'media/libmediaplayerservice/StagefrightRecorder.cpp')
-rw-r--r--media/libmediaplayerservice/StagefrightRecorder.cpp6
1 files changed, 4 insertions, 2 deletions
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<MPEG4Writer *>(writer.get())->
- setInterleaveDuration(mInterleaveDurationUs);
+ if (mInterleaveDurationUs > 0) {
+ reinterpret_cast<MPEG4Writer *>(writer.get())->
+ setInterleaveDuration(mInterleaveDurationUs);
+ }
if (mMaxFileDurationUs != 0) {
writer->setMaxFileDuration(mMaxFileDurationUs);