void RTCPInstance::sendReport() { // Hack: Don't send a SR during those (brief) times when the timestamp of the // next outgoing RTP packet has been preset, to ensure that that timestamp gets // used for that outgoing packet. (David Bertrand, 2006.07.18) if (fSink != NULL && fSink->nextTimestampHasBeenPreset()) return; #ifdef DEBUG fprintf(stderr, "sending REPORT\n"); #endif // Begin by including a SR and/or RR report: addReport(); // Then, include a SDES: addSDES(); // Send the report: sendBuiltPacket(); // Periodically clean out old members from our SSRC membership database: const unsigned membershipReapPeriod = 5; if ((++fOutgoingReportCount) % membershipReapPeriod == 0) { unsigned threshold = fOutgoingReportCount - membershipReapPeriod; fKnownMembers->reapOldMembers(threshold); } }
void RTCPInstance::sendBYE() { #ifdef DEBUG fprintf(stderr, "sending BYE\n"); #endif // The packet must begin with a SR and/or RR report: addReport(); addBYE(); sendBuiltPacket(); }
void RTCPInstance::sendReport() { #ifdef DEBUG fprintf(stderr, "sending REPORT\n"); #endif // Begin by including a SR and/or RR report: if (!addReport()) return; // Then, include a SDES: addSDES(); // Send the report: sendBuiltPacket(); // Periodically clean out old members from our SSRC membership database: const unsigned membershipReapPeriod = 5; if ((++fOutgoingReportCount) % membershipReapPeriod == 0) { unsigned threshold = fOutgoingReportCount - membershipReapPeriod; fKnownMembers->reapOldMembers(threshold); } }
void RTCPInstance::sendReport() { // Hack: Don't send a SR during those (brief) times when the timestamp of the // next outgoing RTP packet has been preset, to ensure that that timestamp gets // used for that outgoing packet. (David Bertrand, 2006.07.18) if (fSink != NULL && fSink->nextTimestampHasBeenPreset()) return; #ifdef DEBUG fprintf(stderr, "sending REPORT\n"); #endif // Begin by including a SR and/or RR report: addReport(); // Then, include a SDES: addSDES(); if (fSink && fAppPacketHandler) { unsigned char const* appPacket=NULL; unsigned int appPacketLen = fAppPacketHandler(fAppPacketHandlerClientData, &appPacket); if (appPacketLen && appPacket) { unsigned rtcpHdr = (0x80cc0000|(appPacketLen>>2))+1; fOutBuf->enqueueWord(rtcpHdr); fOutBuf->enqueueWord(fSink->SSRC()); fOutBuf->enqueue(appPacket, appPacketLen); }
// DEPRECATED size_t RTCStatsResponse::addReport() { String fakeId = String::format("Fake ID %lu", (unsigned long) m_result.size()); return addReport(fakeId, "no type", 0); }