Revert r4328
R=pwestin@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1774005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4343 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
8543c1c77c
commit
6f5707e184
@ -69,18 +69,5 @@ class ReceiveStatistics : public Module {
|
||||
virtual StreamStatistician* GetStatistician(uint32_t ssrc) const = 0;
|
||||
};
|
||||
|
||||
class NullReceiveStatistics : public ReceiveStatistics {
|
||||
public:
|
||||
virtual void IncomingPacket(const RTPHeader& rtp_header, size_t bytes,
|
||||
bool retransmitted, bool in_order) {}
|
||||
virtual void GetActiveStatisticians(
|
||||
StatisticianMap* statisticians) const { statisticians->clear(); }
|
||||
virtual StreamStatistician* GetStatistician(uint32_t ssrc) const {
|
||||
return NULL;
|
||||
}
|
||||
virtual int32_t TimeUntilNextProcess() { return 0; }
|
||||
virtual int32_t Process() { return 0; }
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
#endif // WEBRTC_MODULES_RTP_RTCP_INTERFACE_RECEIVE_STATISTICS_H_
|
||||
|
@ -1689,12 +1689,14 @@ int RTCPSender::PrepareRTCP(
|
||||
// If the data does not fit in the packet we fill it as much as possible.
|
||||
int32_t buildVal = 0;
|
||||
|
||||
// We need to send our NTP even if we haven't received any reports.
|
||||
_clock->CurrentNtp(NTPsec, NTPfrac);
|
||||
if (ShouldSendReportBlocks(rtcpPacketTypeFlags)) {
|
||||
ReceiveStatistics::StatisticianMap statisticians;
|
||||
receive_statistics_->GetActiveStatisticians(&statisticians);
|
||||
if (!statisticians.empty()) {
|
||||
if (statisticians.empty()) {
|
||||
// We need to send our NTP even if we dont have received any
|
||||
// reports.
|
||||
_clock->CurrentNtp(NTPsec, NTPfrac);
|
||||
} else {
|
||||
ReceiveStatistics::StatisticianMap::const_iterator it;
|
||||
int i;
|
||||
for (it = statisticians.begin(), i = 0; it != statisticians.end();
|
||||
@ -1703,8 +1705,9 @@ int RTCPSender::PrepareRTCP(
|
||||
if (PrepareReport(it->second, &report_block, &NTPsec, &NTPfrac))
|
||||
AddReportBlock(it->first, &internal_report_blocks_, &report_block);
|
||||
}
|
||||
if (_IJ && !statisticians.empty()) {
|
||||
rtcpPacketTypeFlags |= kRtcpTransmissionTimeOffset;
|
||||
if (_IJ && !statisticians.empty())
|
||||
{
|
||||
rtcpPacketTypeFlags |= kRtcpTransmissionTimeOffset;
|
||||
}
|
||||
_lastRTCPTime[0] = Clock::NtpToMs(NTPsec, NTPfrac);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ RtpRtcp::Configuration::Configuration()
|
||||
audio(false),
|
||||
clock(NULL),
|
||||
default_module(NULL),
|
||||
receive_statistics(NullObjectReceiveStatistics()),
|
||||
receive_statistics(),
|
||||
outgoing_transport(NULL),
|
||||
rtcp_feedback(NULL),
|
||||
intra_frame_callback(NULL),
|
||||
|
@ -61,11 +61,6 @@ RtpAudioFeedback* NullObjectRtpAudioFeedback() {
|
||||
return &null_rtp_audio_feedback;
|
||||
}
|
||||
|
||||
ReceiveStatistics* NullObjectReceiveStatistics() {
|
||||
static NullReceiveStatistics null_receive_statistics;
|
||||
return &null_receive_statistics;
|
||||
}
|
||||
|
||||
namespace ModuleRTPUtility {
|
||||
|
||||
enum {
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include <cstddef> // size_t, ptrdiff_t
|
||||
|
||||
#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
|
||||
#include "webrtc/modules/rtp_rtcp/interface/receive_statistics.h"
|
||||
#include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h"
|
||||
#include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
@ -26,7 +25,6 @@ const uint8_t kRtpMarkerBitMask = 0x80;
|
||||
RtpData* NullObjectRtpData();
|
||||
RtpFeedback* NullObjectRtpFeedback();
|
||||
RtpAudioFeedback* NullObjectRtpAudioFeedback();
|
||||
ReceiveStatistics* NullObjectReceiveStatistics();
|
||||
|
||||
namespace ModuleRTPUtility
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user