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

Commit fdbc1b3a authored by Ronghua Wu's avatar Ronghua Wu
Browse files

libmediaplayerservice: set priority and operating rate for the codec used by recorder.

Bug: 20481562
Change-Id: Ibff54395e00809500d98e3759f9677f8168c98ae
parent f2326ac9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -954,6 +954,7 @@ sp<MediaSource> StagefrightRecorder::createAudioSource() {
    if (mAudioTimeScale > 0) {
        format->setInt32("time-scale", mAudioTimeScale);
    }
    format->setInt32("priority", 0 /* realtime */);

    sp<MediaSource> audioEncoder =
            MediaCodecSource::Create(mLooper, format, audioSource);
@@ -1544,6 +1545,11 @@ status_t StagefrightRecorder::setupVideoEncoder(
        format->setInt32("level", mVideoEncoderLevel);
    }

    format->setInt32("priority", 0 /* realtime */);
    if (mCaptureTimeLapse) {
        format->setFloat("operating-rate", mCaptureFps);
    }

    uint32_t flags = 0;
    if (mIsMetaDataStoredInVideoBuffers) {
        flags |= MediaCodecSource::FLAG_USE_METADATA_INPUT;