summaryrefslogtreecommitdiffstats
path: root/media/libmedia/mediarecorder.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-03-12 16:29:55 -0700
committerGlenn Kasten <gkasten@google.com>2012-03-13 11:09:47 -0700
commite53b9ead781c36e96d6b6f012ddffc93a3d80f0d (patch)
tree4bcde0bc9a797851ec1bee4f630c8c4f0735f623 /media/libmedia/mediarecorder.cpp
parentb87396f9ebabbb7b47683bceca96cbe635a1ca00 (diff)
downloadframeworks_av-e53b9ead781c36e96d6b6f012ddffc93a3d80f0d.zip
frameworks_av-e53b9ead781c36e96d6b6f012ddffc93a3d80f0d.tar.gz
frameworks_av-e53b9ead781c36e96d6b6f012ddffc93a3d80f0d.tar.bz2
Whitespace and indentation
Fix indentation to be multiple of 4. Make it easier to search: sp< not sp < to "switch (...)" instead of "switch(...)" (also "if" and "while") Remove redundant blank line at start or EOF. Remove whitespace at end of line. Remove extra blank lines where they don't add value. Use git diff -b or -w to verify. Change-Id: I966b7ba852faa5474be6907fb212f5e267c2874e
Diffstat (limited to 'media/libmedia/mediarecorder.cpp')
-rw-r--r--media/libmedia/mediarecorder.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/media/libmedia/mediarecorder.cpp b/media/libmedia/mediarecorder.cpp
index cc73014..9541015 100644
--- a/media/libmedia/mediarecorder.cpp
+++ b/media/libmedia/mediarecorder.cpp
@@ -31,7 +31,7 @@ namespace android {
status_t MediaRecorder::setCamera(const sp<ICamera>& camera, const sp<ICameraRecordingProxy>& proxy)
{
ALOGV("setCamera(%p,%p)", camera.get(), proxy.get());
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -52,7 +52,7 @@ status_t MediaRecorder::setCamera(const sp<ICamera>& camera, const sp<ICameraRec
status_t MediaRecorder::setPreviewSurface(const sp<Surface>& surface)
{
ALOGV("setPreviewSurface(%p)", surface.get());
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -77,7 +77,7 @@ status_t MediaRecorder::setPreviewSurface(const sp<Surface>& surface)
status_t MediaRecorder::init()
{
ALOGV("init");
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -107,7 +107,7 @@ status_t MediaRecorder::init()
status_t MediaRecorder::setVideoSource(int vs)
{
ALOGV("setVideoSource(%d)", vs);
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -142,7 +142,7 @@ status_t MediaRecorder::setVideoSource(int vs)
status_t MediaRecorder::setAudioSource(int as)
{
ALOGV("setAudioSource(%d)", as);
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -175,7 +175,7 @@ status_t MediaRecorder::setAudioSource(int as)
status_t MediaRecorder::setOutputFormat(int of)
{
ALOGV("setOutputFormat(%d)", of);
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -201,7 +201,7 @@ status_t MediaRecorder::setOutputFormat(int of)
status_t MediaRecorder::setVideoEncoder(int ve)
{
ALOGV("setVideoEncoder(%d)", ve);
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -231,7 +231,7 @@ status_t MediaRecorder::setVideoEncoder(int ve)
status_t MediaRecorder::setAudioEncoder(int ae)
{
ALOGV("setAudioEncoder(%d)", ae);
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -261,7 +261,7 @@ status_t MediaRecorder::setAudioEncoder(int ae)
status_t MediaRecorder::setOutputFile(const char* path)
{
ALOGV("setOutputFile(%s)", path);
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -287,7 +287,7 @@ status_t MediaRecorder::setOutputFile(const char* path)
status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length)
{
ALOGV("setOutputFile(%d, %lld, %lld)", fd, offset, length);
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -324,7 +324,7 @@ status_t MediaRecorder::setOutputFile(int fd, int64_t offset, int64_t length)
status_t MediaRecorder::setVideoSize(int width, int height)
{
ALOGV("setVideoSize(%d, %d)", width, height);
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -367,7 +367,7 @@ sp<ISurfaceTexture> MediaRecorder::
status_t MediaRecorder::setVideoFrameRate(int frames_per_second)
{
ALOGV("setVideoFrameRate(%d)", frames_per_second);
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -391,7 +391,7 @@ status_t MediaRecorder::setVideoFrameRate(int frames_per_second)
status_t MediaRecorder::setParameters(const String8& params) {
ALOGV("setParameters(%s)", params.string());
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -419,7 +419,7 @@ status_t MediaRecorder::setParameters(const String8& params) {
status_t MediaRecorder::prepare()
{
ALOGV("prepare");
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -458,7 +458,7 @@ status_t MediaRecorder::prepare()
status_t MediaRecorder::getMaxAmplitude(int* max)
{
ALOGV("getMaxAmplitude");
- if(mMediaRecorder == NULL) {
+ if (mMediaRecorder == NULL) {
ALOGE("media recorder is not initialized yet");
return INVALID_OPERATION;
}
@@ -536,7 +536,7 @@ status_t MediaRecorder::reset()
doCleanUp();
status_t ret = UNKNOWN_ERROR;
- switch(mCurrentState) {
+ switch (mCurrentState) {
case MEDIA_RECORDER_IDLE:
ret = OK;
break;
@@ -547,7 +547,7 @@ status_t MediaRecorder::reset()
case MEDIA_RECORDER_ERROR: {
ret = doReset();
if (OK != ret) {
- return ret; // No need to continue
+ return ret; // No need to continue
}
} // Intentional fall through
case MEDIA_RECORDER_INITIALIZED: