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

Commit 38ad9c7d authored by Ronghua Wu's avatar Ronghua Wu Committed by Android (Google) Code Review
Browse files

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

parents 04f07fd6 fdbc1b3a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -953,6 +953,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);
@@ -1543,6 +1544,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;