diff options
-rw-r--r-- | media/libmediaplayerservice/StagefrightRecorder.cpp | 14 | ||||
-rw-r--r-- | media/libstagefright/CameraSourceTimeLapse.cpp | 2 |
2 files changed, 2 insertions, 14 deletions
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index 54e515a..153b2a6 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -1229,25 +1229,13 @@ status_t StagefrightRecorder::setupVideoEncoder( } if (mVideoEncoderLevel != -1) { enc_meta->setInt32(kKeyVideoLevel, mVideoEncoderLevel); - } else if (mCaptureTimeLapse) { - // Check if we are using high resolution and/or high bitrate and - // set appropriate level for the software AVCEncoder. - if ((width * height >= 921600) // 720p - || (videoBitRate >= 20000000)) { - enc_meta->setInt32(kKeyVideoLevel, OMX_VIDEO_AVCLevel5); - } } OMXClient client; CHECK_EQ(client.connect(), OK); - // Use software codec for time lapse uint32_t encoder_flags = 0; - if (mCaptureTimeLapse) { - // Do not use software encoder for timelapse for now - // It is _very_ slow and the preview appears sluggish - //encoder_flags |= OMXCodec::kPreferSoftwareCodecs; - } else if (mIsMetaDataStoredInVideoBuffers) { + if (mIsMetaDataStoredInVideoBuffers) { encoder_flags |= OMXCodec::kHardwareCodecsOnly; encoder_flags |= OMXCodec::kStoreMetaDataInVideoBuffers; } diff --git a/media/libstagefright/CameraSourceTimeLapse.cpp b/media/libstagefright/CameraSourceTimeLapse.cpp index 31b6ec9..b58b9d8 100644 --- a/media/libstagefright/CameraSourceTimeLapse.cpp +++ b/media/libstagefright/CameraSourceTimeLapse.cpp @@ -66,7 +66,7 @@ CameraSourceTimeLapse::CameraSourceTimeLapse( int32_t videoFrameRate, const sp<Surface>& surface, int64_t timeBetweenTimeLapseFrameCaptureUs) - : CameraSource(camera, cameraId, videoSize, videoFrameRate, surface, false), + : CameraSource(camera, cameraId, videoSize, videoFrameRate, surface, true), mTimeBetweenTimeLapseFrameCaptureUs(timeBetweenTimeLapseFrameCaptureUs), mTimeBetweenTimeLapseVideoFramesUs(1E6/videoFrameRate), mLastTimeLapseFrameRealTimestampUs(0), |