From e53b9ead781c36e96d6b6f012ddffc93a3d80f0d Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Mon, 12 Mar 2012 16:29:55 -0700 Subject: 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 --- media/libmedia/mediarecorder.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'media/libmedia/mediarecorder.cpp') 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& camera, const sp& 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& camera, const sp& 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) 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 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: -- cgit v1.1