am 637739d4: Merge "Eliminate recording sound by starting the video track before audio track." into honeycomb
* commit '637739d4bf014e82af19ec4465e6031579ca6eea': Eliminate recording sound by starting the video track before audio track.
This commit is contained in:
@@ -1295,12 +1295,6 @@ status_t StagefrightRecorder::setupMPEG4Recording(
|
|||||||
status_t err = OK;
|
status_t err = OK;
|
||||||
sp<MediaWriter> writer = new MPEG4Writer(outputFd);
|
sp<MediaWriter> writer = new MPEG4Writer(outputFd);
|
||||||
|
|
||||||
// Add audio source first if it exists
|
|
||||||
if (!mCaptureTimeLapse && (mAudioSource != AUDIO_SOURCE_LIST_END)) {
|
|
||||||
err = setupAudioEncoder(writer);
|
|
||||||
if (err != OK) return err;
|
|
||||||
*totalBitRate += mAudioBitRate;
|
|
||||||
}
|
|
||||||
if (mVideoSource == VIDEO_SOURCE_DEFAULT
|
if (mVideoSource == VIDEO_SOURCE_DEFAULT
|
||||||
|| mVideoSource == VIDEO_SOURCE_CAMERA) {
|
|| mVideoSource == VIDEO_SOURCE_CAMERA) {
|
||||||
|
|
||||||
@@ -1332,6 +1326,15 @@ status_t StagefrightRecorder::setupMPEG4Recording(
|
|||||||
*totalBitRate += videoBitRate;
|
*totalBitRate += videoBitRate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Audio source is added at the end if it exists.
|
||||||
|
// This help make sure that the "recoding" sound is suppressed for
|
||||||
|
// camcorder applications in the recorded files.
|
||||||
|
if (!mCaptureTimeLapse && (mAudioSource != AUDIO_SOURCE_LIST_END)) {
|
||||||
|
err = setupAudioEncoder(writer);
|
||||||
|
if (err != OK) return err;
|
||||||
|
*totalBitRate += mAudioBitRate;
|
||||||
|
}
|
||||||
|
|
||||||
if (mInterleaveDurationUs > 0) {
|
if (mInterleaveDurationUs > 0) {
|
||||||
reinterpret_cast<MPEG4Writer *>(writer.get())->
|
reinterpret_cast<MPEG4Writer *>(writer.get())->
|
||||||
setInterleaveDuration(mInterleaveDurationUs);
|
setInterleaveDuration(mInterleaveDurationUs);
|
||||||
|
|||||||
Reference in New Issue
Block a user