summaryrefslogtreecommitdiffstats
path: root/media/libmedia/mediarecorder.cpp
diff options
context:
space:
mode:
authorJianhong Jiang <jianhong@google.com>2009-06-08 08:50:42 -0700
committerJianhong Jiang <jianhong@google.com>2009-06-08 08:50:42 -0700
commit9747c5a1f5e51fab72169767972bf55f73711000 (patch)
treea63bd8ed6aff9fb1cd4326030728fb6f313da585 /media/libmedia/mediarecorder.cpp
parent172fb9ab347e146642234f0bd6f223d351e9fd0b (diff)
downloadframeworks_av-9747c5a1f5e51fab72169767972bf55f73711000.zip
frameworks_av-9747c5a1f5e51fab72169767972bf55f73711000.tar.gz
frameworks_av-9747c5a1f5e51fab72169767972bf55f73711000.tar.bz2
NJ-1409: (frameworks/base) Support new audio encoding types(AMR and AAC).
Diffstat (limited to 'media/libmedia/mediarecorder.cpp')
-rw-r--r--media/libmedia/mediarecorder.cpp8
1 files changed, 4 insertions, 4 deletions
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) {