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

Commit 612f648a authored by Lajos Molnar's avatar Lajos Molnar Committed by Automerger Merge Worker
Browse files

Merge "VT: Update payload value at runtime for SFR" am: d6556012

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia20b0b4bdeb367e0b609c61bfdf938b471ad066f
parents 596da0d5 d6556012
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -835,9 +835,14 @@ status_t StagefrightRecorder::setParamVideoOpponentID(int32_t opponentID) {
}

status_t StagefrightRecorder::setParamPayloadType(int32_t payloadType) {
    ALOGV("setParamPayloadType: %x", payloadType);
    ALOGV("setParamPayloadType: %d", payloadType);

    mPayloadType = payloadType;

    if (mStarted && mOutputFormat == OUTPUT_FORMAT_RTP_AVP) {
        mWriter->updatePayloadType(mPayloadType);
    }

    return OK;
}

+2 −0
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@ struct MediaWriter : public RefBase {
    virtual int32_t getStartTimeOffsetMs() const { return 0; }
    virtual status_t setNextFd(int /*fd*/) { return INVALID_OPERATION; }
    virtual void updateCVODegrees(int32_t /*cvoDegrees*/) {}
    virtual void updatePayloadType(int32_t /*payloadType*/) {}

protected:
    virtual ~MediaWriter() {}
    int64_t mMaxFileSizeLimitBytes;
+5 −0
Original line number Diff line number Diff line
@@ -1165,6 +1165,11 @@ void ARTPWriter::updateCVODegrees(int32_t cvoDegrees) {
    mRTPCVODegrees = cvoDegrees;
}

void ARTPWriter::updatePayloadType(int32_t payloadType) {
    Mutex::Autolock autoLock(mLock);
    mPayloadType = payloadType;
}

static size_t getFrameSize(bool isWide, unsigned FT) {
    static const size_t kFrameSizeNB[8] = {
        95, 103, 118, 134, 148, 159, 204, 244
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ struct ARTPWriter : public MediaWriter {
    virtual status_t stop();
    virtual status_t pause();
    void updateCVODegrees(int32_t cvoDegrees);
    void updatePayloadType(int32_t payloadType);

    virtual void onMessageReceived(const sp<AMessage> &msg);
    virtual void setTMMBNInfo(uint32_t opponentID, uint32_t bitrate);