summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2010-07-28 11:58:12 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-07-28 11:58:12 -0700
commit5587bb7e375c17c1320918e6f473625af1f5e5ac (patch)
treed168206181d11cb0f849473a345892cd94d2a088
parent0c39b6c65bcb96ed6438c7d792a67708409d8f0f (diff)
parent63299c03875f414ff6d5867fbca9a7b11699a644 (diff)
downloadframeworks_base-5587bb7e375c17c1320918e6f473625af1f5e5ac.zip
frameworks_base-5587bb7e375c17c1320918e6f473625af1f5e5ac.tar.gz
frameworks_base-5587bb7e375c17c1320918e6f473625af1f5e5ac.tar.bz2
Merge "Interleave the audio and video by default - default interleave duration is set to 1 second" into gingerbread
-rw-r--r--media/libmediaplayerservice/StagefrightRecorder.cpp6
-rw-r--r--media/libstagefright/MPEG4Writer.cpp4
2 files changed, 6 insertions, 4 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);
diff --git a/media/libstagefright/MPEG4Writer.cpp b/media/libstagefright/MPEG4Writer.cpp
index c4a25bc..78970b3 100644
--- a/media/libstagefright/MPEG4Writer.cpp
+++ b/media/libstagefright/MPEG4Writer.cpp
@@ -145,7 +145,7 @@ MPEG4Writer::MPEG4Writer(const char *filename)
mOffset(0),
mMdatOffset(0),
mEstimatedMoovBoxSize(0),
- mInterleaveDurationUs(500000) {
+ mInterleaveDurationUs(1000000) {
CHECK(mFile != NULL);
}
@@ -157,7 +157,7 @@ MPEG4Writer::MPEG4Writer(int fd)
mOffset(0),
mMdatOffset(0),
mEstimatedMoovBoxSize(0),
- mInterleaveDurationUs(500000) {
+ mInterleaveDurationUs(1000000) {
CHECK(mFile != NULL);
}