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

Commit b13d332c authored by Chih-hung Hsieh's avatar Chih-hung Hsieh Committed by Gerrit Code Review
Browse files

Merge "Fix cert-dcl16-c clang-tidy warnings in libmediaplayer2."

parents c6b48fe6 d42529d5
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -272,10 +272,10 @@ void NuPlayer2::HTTPLiveSource2::pollForRawData(

        if (fetchType == LiveSession::STREAMTYPE_SUBTITLES) {
            notify->post();
            msg->post(delayUs > 0ll ? delayUs : 0ll);
            msg->post(delayUs > 0LL ? delayUs : 0LL);
            return;
        } else if (fetchType == LiveSession::STREAMTYPE_METADATA) {
            if (delayUs < -1000000ll) { // 1 second
            if (delayUs < -1000000LL) { // 1 second
                continue;
            }
            notify->post();
@@ -287,7 +287,7 @@ void NuPlayer2::HTTPLiveSource2::pollForRawData(
    }

    // try again in 1 second
    msg->post(1000000ll);
    msg->post(1000000LL);
}

void NuPlayer2::HTTPLiveSource2::onMessageReceived(const sp<AMessage> &msg) {
+3 −3
Original line number Diff line number Diff line
@@ -888,7 +888,7 @@ void NuPlayer2::onMessageReceived(const sp<AMessage> &msg) {
                }
            }

            msg->post(1000000ll);  // poll again in a second.
            msg->post(1000000LL);  // poll again in a second.
            break;
        }

@@ -1178,7 +1178,7 @@ void NuPlayer2::onMessageReceived(const sp<AMessage> &msg) {
            }

            if (rescan) {
                msg->post(100000ll);
                msg->post(100000LL);
                mScanSourcesPending = true;
            }
            break;
@@ -2768,7 +2768,7 @@ void NuPlayer2::onSourceNotify(const sp<AMessage> &msg) {
            int64_t posMs;
            int64_t timeUs, posUs;
            driver->getCurrentPosition(&posMs);
            posUs = posMs * 1000ll;
            posUs = posMs * 1000LL;
            CHECK(buffer->meta()->findInt64("timeUs", &timeUs));

            if (posUs < timeUs) {
+1 −1
Original line number Diff line number Diff line
@@ -541,7 +541,7 @@ void NuPlayer2::CCDecoder::display(int64_t timeUs) {

        ccBuf->meta()->setInt32(AMEDIAFORMAT_KEY_TRACK_INDEX, mSelectedTrack);
        ccBuf->meta()->setInt64("timeUs", timeUs);
        ccBuf->meta()->setInt64("durationUs", 0ll);
        ccBuf->meta()->setInt64("durationUs", 0LL);

        sp<AMessage> msg = mNotify->dup();
        msg->setInt32("what", kWhatClosedCaptionData);
+7 −7
Original line number Diff line number Diff line
@@ -71,10 +71,10 @@ NuPlayer2::Decoder::Decoder(
      mCCDecoder(ccDecoder),
      mPid(pid),
      mUid(uid),
      mSkipRenderingUntilMediaTimeUs(-1ll),
      mNumFramesTotal(0ll),
      mNumInputFramesDropped(0ll),
      mNumOutputFramesDropped(0ll),
      mSkipRenderingUntilMediaTimeUs(-1LL),
      mNumFramesTotal(0LL),
      mNumInputFramesDropped(0LL),
      mNumOutputFramesDropped(0LL),
      mVideoWidth(0),
      mVideoHeight(0),
      mIsAudio(true),
@@ -428,10 +428,10 @@ void NuPlayer2::Decoder::onSetParameters(const sp<AMessage> &params) {
        // TODO: For now, layer fps is calculated for some specific architectures.
        // But it really should be extracted from the stream.
        mVideoTemporalLayerAggregateFps[0] =
            mFrameRateTotal / (float)(1ll << (mNumVideoTemporalLayerTotal - 1));
            mFrameRateTotal / (float)(1LL << (mNumVideoTemporalLayerTotal - 1));
        for (int32_t i = 1; i < mNumVideoTemporalLayerTotal; ++i) {
            mVideoTemporalLayerAggregateFps[i] =
                mFrameRateTotal / (float)(1ll << (mNumVideoTemporalLayerTotal - i))
                mFrameRateTotal / (float)(1LL << (mNumVideoTemporalLayerTotal - i))
                + mVideoTemporalLayerAggregateFps[i - 1];
        }
    }
@@ -952,7 +952,7 @@ status_t NuPlayer2::Decoder::fetchInputData(sp<AMessage> &reply) {

            int32_t layerId = 0;
            bool haveLayerId = accessUnit->meta()->findInt32("temporal-layer-id", &layerId);
            if (mRenderer->getVideoLateByUs() > 100000ll
            if (mRenderer->getVideoLateByUs() > 100000LL
                    && mIsVideoAVC
                    && !IsAVCReferenceFrame(accessUnit)) {
                dropAccessUnit = true;
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ void NuPlayer2::DecoderBase::onRequestInputBuffers() {
        mRequestInputBuffersPending = true;

        sp<AMessage> msg = new AMessage(kWhatRequestInputBuffers, this);
        msg->post(10 * 1000ll);
        msg->post(10 * 1000LL);
    }
}

Loading