Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9f122d8 authored by Zhijun He's avatar Zhijun He
Browse files

StageFrightRecorder: update setVideoFrameRate sanity check

Allow high speed recording fps to be up to 1000fps

Change-Id: I975d11b8a9abbd50ce6982fb46f4a4a3a035e475
parent aafc11b3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -206,7 +206,7 @@ status_t StagefrightRecorder::setVideoSize(int width, int height) {
status_t StagefrightRecorder::setVideoFrameRate(int frames_per_second) {
    ALOGV("setVideoFrameRate: %d", frames_per_second);
    if ((frames_per_second <= 0 && frames_per_second != -1) ||
        frames_per_second > 120) {
        frames_per_second > kMaxHighSpeedFps) {
        ALOGE("Invalid video frame rate: %d", frames_per_second);
        return BAD_VALUE;
    }
+2 −0
Original line number Diff line number Diff line
@@ -126,6 +126,8 @@ private:
    sp<IGraphicBufferProducer> mGraphicBufferProducer;
    sp<ALooper> mLooper;

    static const int kMaxHighSpeedFps = 1000;

    status_t prepareInternal();
    status_t setupMPEG4orWEBMRecording();
    void setupMPEG4orWEBMMetaData(sp<MetaData> *meta);