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

Commit e3fef042 authored by Somraj Mani's avatar Somraj Mani Committed by Lajos Molnar
Browse files

VT: Update payload value at runtime for SFR



payload type might be re-assigned if there is a modification
in ongoing session.

We need to provide a new payload type in above case.

Merged-in: I9e19a7bb3e0c7849cbb244fd3a3221ce79c4e56d
Change-Id: I9e19a7bb3e0c7849cbb244fd3a3221ce79c4e56d
Signed-off-by: default avatarSomraj Mani <som.mani@samsung.com>
parent 4b08d94c
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);