From 9747c5a1f5e51fab72169767972bf55f73711000 Mon Sep 17 00:00:00 2001 From: Jianhong Jiang Date: Mon, 8 Jun 2009 08:50:42 -0700 Subject: NJ-1409: (frameworks/base) Support new audio encoding types(AMR and AAC). --- media/libmedia/mediarecorder.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'media/libmedia/mediarecorder.cpp') diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp index 6b26faf..5093f0e 100644 --- a/media/libmedia/mediarecorder.cpp +++ b/media/libmedia/mediarecorder.cpp @@ -180,7 +180,7 @@ status_t MediaRecorder::setOutputFormat(int of) LOGE("setOutputFormat called in an invalid state: %d", mCurrentState); return INVALID_OPERATION; } - if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_RAW_AMR) { + if (mIsVideoSourceSet && of >= OUTPUT_FORMAT_AUDIO_ONLY_START) { //first non-video output format LOGE("output format (%d) is meant for audio recording only and incompatible with video recording", of); return INVALID_OPERATION; } @@ -345,7 +345,7 @@ status_t MediaRecorder::setVideoFrameRate(int frames_per_second) } if (!mIsVideoSourceSet) { LOGE("try to set video frame rate without setting video source first"); - return INVALID_OPERATION; + return INVALID_OPERATION; } status_t ret = mMediaRecorder->setVideoFrameRate(frames_per_second); @@ -475,7 +475,7 @@ status_t MediaRecorder::stop() mCurrentState = MEDIA_RECORDER_ERROR; return ret; } - + // FIXME: // stop and reset are semantically different. // We treat them the same for now, and will change this in the future. @@ -492,7 +492,7 @@ status_t MediaRecorder::reset() LOGE("media recorder is not initialized yet"); return INVALID_OPERATION; } - + doCleanUp(); status_t ret = UNKNOWN_ERROR; switch(mCurrentState) { -- cgit v1.1