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

Commit 26b0a9d0 authored by Andreas Huber's avatar Andreas Huber
Browse files

A few more patches to fix wfd tcp unicast transport.

Change-Id: Ie2f1b1e56c487ac4c3ef19d9e79022a35084e042
parent a0dd0068
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@

namespace android {

#if 0
#if 1
// static
const int64_t DirectRenderer::kPacketLostDelayUs = 80000ll;

+13 −1
Original line number Diff line number Diff line
@@ -250,6 +250,8 @@ RTPSink::RTPSink(
    : mNetSession(netSession),
      mSurfaceTex(bufferProducer),
      mNotify(notify),
      mUsingTCPTransport(false),
      mUsingTCPInterleaving(false),
      mRTPPort(0),
      mRTPSessionID(0),
      mRTCPSessionID(0),
@@ -280,6 +282,9 @@ RTPSink::~RTPSink() {
}

status_t RTPSink::init(bool usingTCPTransport, bool usingTCPInterleaving) {
    mUsingTCPTransport = usingTCPTransport;
    mUsingTCPInterleaving = usingTCPInterleaving;

    if (usingTCPInterleaving) {
        return OK;
    }
@@ -717,7 +722,9 @@ status_t RTPSink::connect(
            mRTCPSessionID, buf->data(), buf->size());
#endif

    if (!mUsingTCPTransport) {
        scheduleSendRR();
    }

    return OK;
}
@@ -820,6 +827,11 @@ void RTPSink::onSendRR() {
}

void RTPSink::onPacketLost(const sp<AMessage> &msg) {
    if (mUsingTCPTransport) {
        ALOGW("huh? lost a packet even though using reliable transport?");
        return;
    }

    uint32_t srcId;
    CHECK(msg->findInt32("ssrc", (int32_t *)&srcId));

+3 −0
Original line number Diff line number Diff line
@@ -78,6 +78,9 @@ private:
    sp<AMessage> mNotify;
    KeyedVector<uint32_t, sp<Source> > mSources;

    bool mUsingTCPTransport;
    bool mUsingTCPInterleaving;

    int32_t mRTPPort;

    int32_t mRTPSessionID;   // in TCP unicast mode these are just server