mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 996560 - Increase maxFileSize of recorded video upto 4GB for >=720p resolution. r=mikeh
This commit is contained in:
parent
79fabcdae3
commit
e7535bc435
@ -51,6 +51,7 @@
|
||||
#include <cutils/properties.h>
|
||||
#include <system/audio.h>
|
||||
|
||||
#define RES_720P (720 * 1280)
|
||||
namespace android {
|
||||
|
||||
GonkRecorder::GonkRecorder()
|
||||
@ -370,6 +371,11 @@ status_t GonkRecorder::setParamMaxFileSizeBytes(int64_t bytes) {
|
||||
RE_LOGW("Target file size (%lld bytes) is too small to be respected", bytes);
|
||||
}
|
||||
|
||||
if (bytes >= 0xffffffffLL) {
|
||||
RE_LOGW("Target file size (%lld bytes) too large to be respected, clipping to 4GB", bytes);
|
||||
bytes = 0xffffffffLL;
|
||||
}
|
||||
|
||||
mMaxFileSizeBytes = bytes;
|
||||
return OK;
|
||||
}
|
||||
@ -656,6 +662,13 @@ status_t GonkRecorder::setClientName(const String16& clientName) {
|
||||
}
|
||||
|
||||
status_t GonkRecorder::prepare() {
|
||||
if (mVideoSource != VIDEO_SOURCE_LIST_END && mVideoEncoder != VIDEO_ENCODER_LIST_END &&
|
||||
mVideoHeight && mVideoWidth && // Video recording
|
||||
(mVideoHeight * mVideoWidth >= RES_720P)) {
|
||||
// TODO: Above check needs to be updated when mMaxFileDurationUs is set from camera app
|
||||
RE_LOGV("Video is high resolution so setting 64-bit file offsets");
|
||||
setParam64BitFileOffset(true);
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user