diff options
author | Chong Zhang <chz@google.com> | 2015-02-23 22:00:08 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-02-23 22:00:09 +0000 |
commit | 96faa25f4aea2c792523ae920da91f919f5ea392 (patch) | |
tree | f4c8c458cf7581e6a861c5dc9995a568a7abfaac /media/libmediaplayerservice | |
parent | 17af11925f50393f4ff355ebef39aa5a03f1d990 (diff) | |
parent | e76dba7af9589d9ed7b116eec3a74168a8352925 (diff) | |
download | frameworks_av-96faa25f4aea2c792523ae920da91f919f5ea392.zip frameworks_av-96faa25f4aea2c792523ae920da91f919f5ea392.tar.gz frameworks_av-96faa25f4aea2c792523ae920da91f919f5ea392.tar.bz2 |
Merge "MPEG4Writer: add capture fps in meta data"
Diffstat (limited to 'media/libmediaplayerservice')
-rw-r--r-- | media/libmediaplayerservice/StagefrightRecorder.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index 2551040..887d4ec 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -1581,10 +1581,11 @@ status_t StagefrightRecorder::setupMPEG4orWEBMRecording() { status_t err = OK; sp<MediaWriter> writer; + sp<MPEG4Writer> mp4writer; if (mOutputFormat == OUTPUT_FORMAT_WEBM) { writer = new WebmWriter(mOutputFd); } else { - writer = new MPEG4Writer(mOutputFd); + writer = mp4writer = new MPEG4Writer(mOutputFd); } if (mVideoSource < VIDEO_SOURCE_LIST_END) { @@ -1617,13 +1618,16 @@ status_t StagefrightRecorder::setupMPEG4orWEBMRecording() { mTotalBitRate += mAudioBitRate; } + if (mCaptureTimeLapse) { + // TODO(chz): pass down fps in float from MediaRecorder.java + mp4writer->setCaptureRate(1000000.0f / mTimeBetweenTimeLapseFrameCaptureUs); + } + if (mInterleaveDurationUs > 0) { - reinterpret_cast<MPEG4Writer *>(writer.get())-> - setInterleaveDuration(mInterleaveDurationUs); + mp4writer->setInterleaveDuration(mInterleaveDurationUs); } if (mLongitudex10000 > -3600000 && mLatitudex10000 > -3600000) { - reinterpret_cast<MPEG4Writer *>(writer.get())-> - setGeoData(mLatitudex10000, mLongitudex10000); + mp4writer->setGeoData(mLatitudex10000, mLongitudex10000); } } if (mMaxFileDurationUs != 0) { |