[Live-devel] [PATCH] RTSPClient: resend dummy packets when sending a per-track PLAY command
Gilles Chanteperdrix
gilles.chanteperdrix at xenomai.org
Mon Dec 16 13:33:56 PST 2013
---
liveMedia/RTSPClient.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/liveMedia/RTSPClient.cpp b/liveMedia/RTSPClient.cpp
index 77efefd..3e0a42a 100644
--- a/liveMedia/RTSPClient.cpp
+++ b/liveMedia/RTSPClient.cpp
@@ -74,6 +74,15 @@ unsigned RTSPClient::sendPlayCommand(MediaSession& session, responseHandler* res
unsigned RTSPClient::sendPlayCommand(MediaSubsession& subsession, responseHandler* responseHandler,
double start, double end, float scale,
Authenticator* authenticator) {
+ Groupsock* gs1 = NULL; Groupsock* gs2 = NULL;
+ if (subsession.rtpSource() != NULL) gs1 = subsession.rtpSource()->RTPgs();
+ if (subsession.rtcpInstance() != NULL) gs2 = subsession.rtcpInstance()->RTCPgs();
+ u_int32_t const dummy = 0xFEEDFACE;
+ unsigned const numDummyPackets = 2;
+ for (unsigned i = 0; i < numDummyPackets; ++i) {
+ if (gs1 != NULL) gs1->output(envir(), 255, (unsigned char*)&dummy, sizeof dummy);
+ if (gs2 != NULL) gs2->output(envir(), 255, (unsigned char*)&dummy, sizeof dummy);
+ }
if (authenticator != NULL) fCurrentAuthenticator = *authenticator;
return sendRequest(new RequestRecord(++fCSeq, "PLAY", responseHandler, NULL, &subsession, 0, start, end, scale));
}
--
1.7.10.4
More information about the live-devel
mailing list