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

Commit 65f65a45 authored by Kim Sungyeon's avatar Kim Sungyeon Committed by Automerger Merge Worker
Browse files

VT: Player/Recoder gets its SSRC ID from param am: fc88be84

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/952490

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4e7c767fb559668103f32ee2532943613a47ccee
parents fcb72c62 fc88be84
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -818,6 +818,13 @@ status_t StagefrightRecorder::setParamRtpRemotePort(int32_t remotePort) {
    return OK;
}

status_t StagefrightRecorder::setParamSelfID(int32_t selfID) {
    ALOGV("setParamSelfID: %x", selfID);

    mSelfID = selfID;
    return OK;
}

status_t StagefrightRecorder::setParameter(
        const String8 &key, const String8 &value) {
    ALOGV("setParameter: key (%s) => value (%s)", key.string(), value.string());
@@ -940,6 +947,13 @@ status_t StagefrightRecorder::setParameter(
        if (safe_strtoi32(value.string(), &remotePort)) {
            return setParamRtpRemotePort(remotePort);
        }
    } else if (key == "rtp-param-self-id") {
        int32_t selfID;
        int64_t temp;
        if (safe_strtoi64(value.string(), &temp)) {
            selfID = static_cast<int32_t>(temp);
            return setParamSelfID(selfID);
        }
    } else {
        ALOGE("setParameter: failed to find key %s", key.string());
    }
@@ -1106,6 +1120,7 @@ status_t StagefrightRecorder::start() {
            sp<MetaData> meta = new MetaData;
            int64_t startTimeUs = systemTime() / 1000;
            meta->setInt64(kKeyTime, startTimeUs);
            meta->setInt32(kKeySelfID, mSelfID);
            status = mWriter->start(meta.get());
            break;
        }
+2 −0
Original line number Diff line number Diff line
@@ -142,6 +142,7 @@ private:
    String8 mRemoteIp;
    int32_t mLocalPort;
    int32_t mRemotePort;
    int32_t mSelfID;

    int64_t mDurationRecordedUs;
    int64_t mStartedRecordingUs;
@@ -227,6 +228,7 @@ private:
    status_t setParamRtpLocalPort(int32_t localPort);
    status_t setParamRtpRemoteIp(const String8 &remoteIp);
    status_t setParamRtpRemotePort(int32_t remotePort);
    status_t setParamSelfID(int32_t selfID);
    void clipVideoBitRate();
    void clipVideoFrameRate();
    void clipVideoFrameWidth();
+3 −0
Original line number Diff line number Diff line
@@ -109,6 +109,7 @@ void NuPlayer::RTPSource::prepareAsync() {
        notify->setSize("trackIndex", i);
        // index(i) should be started from 1. 0 is reserved for [root]
        mRTPConn->addStream(sockRtp, sockRtcp, desc, i + 1, notify, false);
        mRTPConn->setSelfID(info->mSelfID);

        info->mRTPSocket = sockRtp;
        info->mRTCPSocket = sockRtcp;
@@ -662,6 +663,8 @@ status_t NuPlayer::RTPSource::setParameter(const String8 &key, const String8 &va
    } else if (key == "rtp-param-rtp-timeout") {
    } else if (key == "rtp-param-rtcp-timeout") {
    } else if (key == "rtp-param-time-scale") {
    } else if (key == "rtp-param-self-id") {
        info->mSelfID = atoi(value);
    }

    return OK;
+3 −0
Original line number Diff line number Diff line
@@ -112,6 +112,9 @@ private:
        int32_t mTimeScale;
        int32_t mAS;

        /* Unique ID indicates itself */
        uint32_t mSelfID;

        /* a copy of TrackInfo in RTSPSource */
        sp<AnotherPacketSource> mSource;
        uint32_t mRTPTime;
+1 −0
Original line number Diff line number Diff line
@@ -249,6 +249,7 @@ enum {
    kKeyEmptyTrackMalFormed = 'nemt', // bool (int32_t)
    kKeySps              = 'sSps', // int32_t, indicates that a buffer is sps.
    kKeyPps              = 'sPps', // int32_t, indicates that a buffer is pps.
    kKeySelfID           = 'sfid', // int32_t, source ID to identify itself on RTP protocol.
};

enum {
Loading