diff options
author | James Dong <jdong@google.com> | 2010-11-03 19:22:47 -0700 |
---|---|---|
committer | James Dong <jdong@google.com> | 2010-11-03 19:22:47 -0700 |
commit | c80c28801d683dcf37131b024300058d8df58f4a (patch) | |
tree | 334b83f209a6e6d5041769b5f7a9e9c28eb87e6c /media | |
parent | f1febe470ac30f8992066cb263c10f58493c4c34 (diff) | |
download | frameworks_base-c80c28801d683dcf37131b024300058d8df58f4a.zip frameworks_base-c80c28801d683dcf37131b024300058d8df58f4a.tar.gz frameworks_base-c80c28801d683dcf37131b024300058d8df58f4a.tar.bz2 |
Revert "Support rotation in media recorder"
This reverts commit f1febe470ac30f8992066cb263c10f58493c4c34.
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/MediaRecorder.java | 12 | ||||
-rw-r--r-- | media/libmediaplayerservice/StagefrightRecorder.cpp | 25 | ||||
-rw-r--r-- | media/libmediaplayerservice/StagefrightRecorder.h | 2 |
3 files changed, 0 insertions, 39 deletions
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java index 1c69142..b38124e 100644 --- a/media/java/android/media/MediaRecorder.java +++ b/media/java/android/media/MediaRecorder.java @@ -285,18 +285,6 @@ public class MediaRecorder } /** - * Set the rotation degrees for the video recording. This method should be called - * before start(). - * - * @param degrees the angle to be rotated clockwise. - * - * {@hide} - */ - public void setClockwiseRotation(int degrees) { - setParameter(String.format("video-param-clockwise-rotation-degrees=%d", degrees)); - } - - /** * Sets the format of the output file produced during recording. Call this * after setAudioSource()/setVideoSource() but before prepare(). * diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index 50d7f6d..d37d83d 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -462,17 +462,6 @@ status_t StagefrightRecorder::setParamVideoTimeScale(int32_t timeScale) { return OK; } -status_t StagefrightRecorder::setParamVideoRotation(int32_t degreesClockwise) { - LOGV("setParamVideoRotation: %d", degreesClockwise); - - if (degreesClockwise < 0 || degreesClockwise % 90 != 0) { - LOGE("Unsupported video rotation angle: %d", degreesClockwise); - return BAD_VALUE; - } - mClockwiseRotationDegrees = degreesClockwise; - return OK; -} - status_t StagefrightRecorder::setParamAudioTimeScale(int32_t timeScale) { LOGV("setParamAudioTimeScale: %d", timeScale); @@ -568,11 +557,6 @@ status_t StagefrightRecorder::setParameter( if (safe_strtoi32(value.string(), &timeScale)) { return setParamVideoTimeScale(timeScale); } - } else if (key == "video-param-clockwise-rotation-degrees") { - int32_t degrees; - if (safe_strtoi32(value.string(), °rees)) { - return setParamVideoRotation(degrees); - } } else { LOGE("setParameter: failed to find key %s", key.string()); } @@ -937,12 +921,6 @@ status_t StagefrightRecorder::setupCameraSource() { CameraParameters params(mCamera->getParameters()); params.setPreviewSize(mVideoWidth, mVideoHeight); params.setPreviewFrameRate(mFrameRate); - { - // Optional feature: setting the rotation degrees. - char degrees[4]; - snprintf(degrees, 4, "%d", mClockwiseRotationDegrees); - params.set(CameraParameters::KEY_ROTATION, degrees); - } String8 s = params.flatten(); if (OK != mCamera->setParameters(s)) { LOGE("Could not change settings." @@ -1210,7 +1188,6 @@ status_t StagefrightRecorder::reset() { mMaxFileSizeBytes = 0; mTrackEveryTimeDurationUs = 0; mEncoderProfiles = MediaProfiles::getInstance(); - mClockwiseRotationDegrees = 0; mOutputFd = -1; mFlags = 0; @@ -1284,8 +1261,6 @@ status_t StagefrightRecorder::dump( result.append(buffer); snprintf(buffer, SIZE, " Camera flags: %d\n", mFlags); result.append(buffer); - snprintf(buffer, SIZE, " Rotation (clockwise) degrees: %d\n", mClockwiseRotationDegrees); - result.append(buffer); snprintf(buffer, SIZE, " Encoder: %d\n", mVideoEncoder); result.append(buffer); snprintf(buffer, SIZE, " Encoder profile: %d\n", mVideoEncoderProfile); diff --git a/media/libmediaplayerservice/StagefrightRecorder.h b/media/libmediaplayerservice/StagefrightRecorder.h index 383fec5..ad0dfa0 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.h +++ b/media/libmediaplayerservice/StagefrightRecorder.h @@ -91,7 +91,6 @@ private: int64_t mMaxFileSizeBytes; int64_t mMaxFileDurationUs; int64_t mTrackEveryTimeDurationUs; - int32_t mClockwiseRotationDegrees; String8 mParams; int mOutputFd; @@ -121,7 +120,6 @@ private: status_t setParamVideoEncoderLevel(int32_t level); status_t setParamVideoCameraId(int32_t cameraId); status_t setParamVideoTimeScale(int32_t timeScale); - status_t setParamVideoRotation(int32_t degreesClockwise); status_t setParamTrackTimeStatus(int64_t timeDurationUs); status_t setParamInterleaveDuration(int32_t durationUs); status_t setParam64BitFileOffset(bool use64BitFileOffset); |