mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 810440 - Add missing rotation parameter to SetupRecording function call, drop default parameter values. r=daleharvey
This commit is contained in:
parent
8e0cd86d07
commit
266e0bab6c
@ -851,7 +851,7 @@ nsGonkCameraControl::StartRecordingImpl(StartRecordingTask* aStartRecording)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult rv = SetupRecording(fd, aStartRecording->mOptions.maxFileSizeBytes, aStartRecording->mOptions.maxVideoLengthMs);
|
||||
nsresult rv = SetupRecording(fd, aStartRecording->mOptions.rotation, aStartRecording->mOptions.maxFileSizeBytes, aStartRecording->mOptions.maxVideoLengthMs);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (mRecorder->start() != OK) {
|
||||
@ -1206,6 +1206,10 @@ nsGonkCameraControl::SetupRecording(int aFd, int aRotation, int64_t aMaxFileSize
|
||||
r += 45;
|
||||
r /= 90;
|
||||
r *= 90;
|
||||
if (r < 0) {
|
||||
// the video recorder only supports positive rotations
|
||||
r += 360;
|
||||
}
|
||||
DOM_CAMERA_LOGI("setting video rotation to %d degrees (mapped from %d)\n", r, aRotation);
|
||||
snprintf(buffer, SIZE, "video-param-rotation-angle-degrees=%d", r);
|
||||
CHECK_SETARG(mRecorder->setParameters(String8(buffer)));
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
nsresult GetVideoSizes(nsTArray<CameraSize>& aVideoSizes);
|
||||
nsresult PushParameters();
|
||||
|
||||
nsresult SetupRecording(int aFd, int aRotation = 0, int64_t aMaxFileSizeBytes = -1, int64_t aMaxVideoLengthMs = -1);
|
||||
nsresult SetupRecording(int aFd, int aRotation, int64_t aMaxFileSizeBytes, int64_t aMaxVideoLengthMs);
|
||||
nsresult SetupVideoMode(const nsAString& aProfile);
|
||||
|
||||
void AutoFocusComplete(bool aSuccess);
|
||||
|
Loading…
Reference in New Issue
Block a user