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

Commit 6851089a authored by Hangyu Kuang's avatar Hangyu Kuang Committed by android-build-merger
Browse files

Merge \"media: set correct mode if both capture and playback rate are set.\" into nyc-mr1-dev

am: d023a770

Change-Id: I61be6e2b08da37bfb7b018641d5eb49f4d8633fa
parents 53789bfd d023a770
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -820,6 +820,9 @@ status_t StagefrightRecorder::prepareInternal() {
            break;
            break;
    }
    }


    ALOGV("Recording frameRate: %d captureFps: %f",
            mFrameRate, mCaptureFps);

    return status;
    return status;
}
}


+5 −1
Original line number Original line Diff line number Diff line
@@ -775,7 +775,9 @@ status_t GraphicBufferSource::signalEndOfInputStream() {
int64_t GraphicBufferSource::getTimestamp(const BufferItem &item) {
int64_t GraphicBufferSource::getTimestamp(const BufferItem &item) {
    int64_t timeUs = item.mTimestamp / 1000;
    int64_t timeUs = item.mTimestamp / 1000;


    if (mTimePerCaptureUs > 0ll) {
    if (mTimePerCaptureUs > 0ll
            && (mTimePerCaptureUs > 2 * mTimePerFrameUs
            || mTimePerFrameUs > 2 * mTimePerCaptureUs)) {
        // Time lapse or slow motion mode
        // Time lapse or slow motion mode
        if (mPrevCaptureUs < 0ll) {
        if (mPrevCaptureUs < 0ll) {
            // first capture
            // first capture
@@ -801,6 +803,8 @@ int64_t GraphicBufferSource::getTimestamp(const BufferItem &item) {


        return mPrevFrameUs;
        return mPrevFrameUs;
    } else if (mMaxTimestampGapUs > 0ll) {
    } else if (mMaxTimestampGapUs > 0ll) {
        //TODO: Fix the case when mMaxTimestampGapUs and mTimePerCaptureUs are both set.

        /* Cap timestamp gap between adjacent frames to specified max
        /* Cap timestamp gap between adjacent frames to specified max
         *
         *
         * In the scenario of cast mirroring, encoding could be suspended for
         * In the scenario of cast mirroring, encoding could be suspended for