diff options
author | James Dong <jdong@google.com> | 2010-11-18 20:59:13 -0800 |
---|---|---|
committer | James Dong <jdong@google.com> | 2010-11-19 10:48:22 -0800 |
commit | 674ebd0b4e1143e38392a4e3bb38b4679a4577bc (patch) | |
tree | 413ce9a380d7c35b935e475ea21fecf5cc5466e7 /media/libmediaplayerservice/StagefrightRecorder.cpp | |
parent | 317ca79a49746dbd1b6bb83712e93e2dc5f6e4f0 (diff) | |
download | frameworks_av-674ebd0b4e1143e38392a4e3bb38b4679a4577bc.zip frameworks_av-674ebd0b4e1143e38392a4e3bb38b4679a4577bc.tar.gz frameworks_av-674ebd0b4e1143e38392a4e3bb38b4679a4577bc.tar.bz2 |
Removed uncessary FILE structure pointer for I/O
o also move the fd owner from caller to callee in the Writers
Change-Id: I510ccfdd0fcc58f1777fea4ed1349fd251852c65
Diffstat (limited to 'media/libmediaplayerservice/StagefrightRecorder.cpp')
-rw-r--r-- | media/libmediaplayerservice/StagefrightRecorder.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index dadd1db..ec3b5a2 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -864,7 +864,7 @@ status_t StagefrightRecorder::startAMRRecording() { return UNKNOWN_ERROR; } - mWriter = new AMRWriter(dup(mOutputFd)); + mWriter = new AMRWriter(mOutputFd); mWriter->addSource(audioEncoder); if (mMaxFileDurationUs != 0) { @@ -912,7 +912,7 @@ status_t StagefrightRecorder::startRTPRecording() { } } - mWriter = new ARTPWriter(dup(mOutputFd)); + mWriter = new ARTPWriter(mOutputFd); mWriter->addSource(source); mWriter->setListener(mListener); @@ -922,7 +922,7 @@ status_t StagefrightRecorder::startRTPRecording() { status_t StagefrightRecorder::startMPEG2TSRecording() { CHECK_EQ(mOutputFormat, OUTPUT_FORMAT_MPEG2TS); - sp<MediaWriter> writer = new MPEG2TSWriter(dup(mOutputFd)); + sp<MediaWriter> writer = new MPEG2TSWriter(mOutputFd); if (mAudioSource != AUDIO_SOURCE_LIST_END) { if (mAudioEncoder != AUDIO_ENCODER_AAC) { @@ -1204,7 +1204,7 @@ status_t StagefrightRecorder::setupMPEG4Recording( mediaWriter->clear(); *totalBitRate = 0; status_t err = OK; - sp<MediaWriter> writer = new MPEG4Writer(dup(outputFd)); + sp<MediaWriter> writer = new MPEG4Writer(outputFd); // Add audio source first if it exists if (!mCaptureTimeLapse && (mAudioSource != AUDIO_SOURCE_LIST_END)) { |