void RTCPInstance::addReport() { // Include a SR or a RR, depending on whether we // have an associated sink or source: if (fSink != NULL) { addSR(); } else if (fSource != NULL) { addRR(); } }
Boolean RTCPInstance::addReport(Boolean alwaysAdd) { // Include a SR or a RR, depending on whether we have an associated sink or source: if (fSink != NULL) { if (!alwaysAdd) { if (!fSink->enableRTCPReports()) return False; // 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->nextTimestampHasBeenPreset()) return False; } addSR(); } else if (fSource != NULL) { addRR(); } return True; }