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

Commit 3eaa3006 authored by Andreas Huber's avatar Andreas Huber
Browse files

Better support for fake timestamps in RTP, H.263 video now also requests FIR.

Change-Id: I2385461887197fe4062d329086e0204f6d6620fc
parent fb861523
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1225,7 +1225,10 @@ status_t AwesomePlayer::finishSetDataSource_l() {
    } else if (!strcmp("rtsp://gtalk", mUri.string())) {
        if (mLooper == NULL) {
            mLooper = new ALooper;
            mLooper->start();
            mLooper->start(
                    false /* runOnCallingThread */,
                    false /* canCallJava */,
                    PRIORITY_HIGHEST);
        }

#if 0
+8 −6
Original line number Diff line number Diff line
@@ -405,6 +405,14 @@ status_t ARTPConnection::parseRTP(StreamInfo *s, const sp<ABuffer> &buffer) {
    buffer->setInt32Data(u16at(&data[2]));
    buffer->setRange(payloadOffset, size - payloadOffset);

#if IGNORE_RTCP_TIME
    if (!source->timeEstablished()) {
        source->timeUpdate(rtpTime, 0);
        source->timeUpdate(rtpTime + 20, 0x100000000ll);
        CHECK(source->timeEstablished());
    }
#endif

    source->processRTPPacket(buffer);

    return OK;
@@ -541,12 +549,6 @@ sp<ARTPSource> ARTPConnection::findSource(StreamInfo *info, uint32_t srcId) {
        source = new ARTPSource(
                srcId, info->mSessionDesc, info->mIndex, info->mNotifyMsg);

#if IGNORE_RTCP_TIME
        // For H.263 gtalk to work...
        source->timeUpdate(0, 0);
        source->timeUpdate(30, 0x100000000ll);
#endif

        info->mSources.add(srcId, source);
    } else {
        source = info->mSources.valueAt(index);
+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ ARTPSource::ARTPSource(
    } else if (!strncmp(desc.c_str(), "H263-1998/", 10)
            || !strncmp(desc.c_str(), "H263-2000/", 10)) {
        mAssembler = new AH263Assembler(notify);
        mIssueFIRRequests = true;
    } else if (!strncmp(desc.c_str(), "AMR/", 4)) {
        mAssembler = new AAMRAssembler(notify, false /* isWide */, params);
    } else  if (!strncmp(desc.c_str(), "AMR-WB/", 7)) {
+4 −0
Original line number Diff line number Diff line
@@ -46,6 +46,10 @@ struct ARTPSource : public RefBase {
    void addReceiverReport(const sp<ABuffer> &buffer);
    void addFIR(const sp<ABuffer> &buffer);

    bool timeEstablished() const {
        return mNumTimes == 2;
    }

private:
    uint32_t mID;
    uint32_t mHighestSeqNumber;