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

Commit d3dba698 authored by Byeongjo Park's avatar Byeongjo Park Committed by Lajos Molnar
Browse files

VT: OMX_ErrorStreamCorrupt should be skipped only for RTP scenario.



[Problem]
AOSP take care OMX_ErrorStreamCorrupt as an error.
Mediaplayer will be stopped once an error occured.

[Cause]
OMX_ErrorStreamCorrupt is not handled as an error due to
a patch from video call scenario.

[Solution]
OMX_ErrorStreamCorrupt should be skipped only for
video call(RTP) scenarios.

Merged-in: I5e1fe7f993776a74619ddc88d664799a54bd604e
Change-Id: I5e1fe7f993776a74619ddc88d664799a54bd604e
Signed-off-by: default avatarByeongjo Park <bjo.park@samsung.com>
parent 4bcec5dc
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -378,6 +378,7 @@ void NuPlayer::setDataSourceAsync(const String8& rtpParams) {

    msg->setObject("source", source);
    msg->post();
    mDataSourceType = DATA_SOURCE_TYPE_RTP;
}

void NuPlayer::prepareAsync() {
@@ -1927,6 +1928,13 @@ status_t NuPlayer::instantiateDecoder(

    format->setInt32("priority", 0 /* realtime */);

    AString mime;
    format->findString("mime", &mime);
    if (mDataSourceType == DATA_SOURCE_TYPE_RTP) {
        ALOGV("instantiateDecoder: set decoder error free on stream corrupt.");
        format->setInt32("corrupt-free", true);
    }

    if (!audio) {
        AString mime;
        CHECK(format->findString("mime", &mime));
@@ -2881,6 +2889,9 @@ const char *NuPlayer::getDataSourceType() {
        case DATA_SOURCE_TYPE_HTTP_LIVE:
            return "HTTPLive";

        case DATA_SOURCE_TYPE_RTP:
            return "RTP";

        case DATA_SOURCE_TYPE_RTSP:
            return "RTSP";

+1 −0
Original line number Diff line number Diff line
@@ -260,6 +260,7 @@ private:
    typedef enum {
        DATA_SOURCE_TYPE_NONE,
        DATA_SOURCE_TYPE_HTTP_LIVE,
        DATA_SOURCE_TYPE_RTP,
        DATA_SOURCE_TYPE_RTSP,
        DATA_SOURCE_TYPE_GENERIC_URL,
        DATA_SOURCE_TYPE_GENERIC_FD,
+13 −0
Original line number Diff line number Diff line
@@ -564,6 +564,7 @@ ACodec::ACodec()
      mShutdownInProgress(false),
      mExplicitShutdown(false),
      mIsLegacyVP9Decoder(false),
      mIsStreamCorruptFree(false),
      mIsLowLatency(false),
      mEncoderDelay(0),
      mEncoderPadding(0),
@@ -2339,6 +2340,12 @@ status_t ACodec::configureCodec(
        mChannelMaskPresent = false;
    }

    int32_t isCorruptFree = 0;
    if (msg->findInt32("corrupt-free", &isCorruptFree)) {
        mIsStreamCorruptFree = isCorruptFree == 1 ? true : false;
        ALOGV("corrupt-free=[%d]", mIsStreamCorruptFree);
    }

    int32_t maxInputSize;
    if (msg->findInt32("max-input-size", &maxInputSize)) {
        err = setMinBufferSize(kPortIndexInput, (size_t)maxInputSize);
@@ -6057,6 +6064,12 @@ bool ACodec::BaseState::onOMXEvent(
        return false;
    }

    if (mCodec->mIsStreamCorruptFree && data1 == (OMX_U32)OMX_ErrorStreamCorrupt) {
        ALOGV("[%s] handle OMX_ErrorStreamCorrupt as a normal operation",
                mCodec->mComponentName.c_str());
        return true;
    }

    ALOGE("[%s] ERROR(0x%08x)", mCodec->mComponentName.c_str(), data1);

    // verify OMX component sends back an error we expect.
+1 −0
Original line number Diff line number Diff line
@@ -273,6 +273,7 @@ private:
    bool mShutdownInProgress;
    bool mExplicitShutdown;
    bool mIsLegacyVP9Decoder;
    bool mIsStreamCorruptFree;
    bool mIsLowLatency;

    // If "mKeepComponentAllocated" we only transition back to Loaded state