Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.h

Issue 2274573002: Adjust RtcpReceiver to be testable with callbacks: (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: RtpRtcpSender -> ModuleRtpRtcp Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RTCP_IMPL_H_ 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RTCP_IMPL_H_
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RTCP_IMPL_H_ 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RTCP_IMPL_H_
13 13
14 #include <set> 14 #include <set>
15 #include <utility> 15 #include <utility>
16 #include <vector> 16 #include <vector>
17 17
18 #include "webrtc/base/criticalsection.h" 18 #include "webrtc/base/criticalsection.h"
19 #include "webrtc/base/gtest_prod_util.h" 19 #include "webrtc/base/gtest_prod_util.h"
20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" 20 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
21 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" 21 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
22 #include "webrtc/modules/rtp_rtcp/source/packet_loss_stats.h" 22 #include "webrtc/modules/rtp_rtcp/source/packet_loss_stats.h"
23 #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver.h" 23 #include "webrtc/modules/rtp_rtcp/source/rtcp_receiver.h"
24 #include "webrtc/modules/rtp_rtcp/source/rtcp_sender.h" 24 #include "webrtc/modules/rtp_rtcp/source/rtcp_sender.h"
25 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" 25 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h"
26 26
27 namespace webrtc { 27 namespace webrtc {
28 28
29 class ModuleRtpRtcpImpl : public RtpRtcp { 29 class ModuleRtpRtcpImpl : public RtpRtcp, public RTCPReceiver::ModuleRtpRtcp {
30 public: 30 public:
31 explicit ModuleRtpRtcpImpl(const RtpRtcp::Configuration& configuration); 31 explicit ModuleRtpRtcpImpl(const RtpRtcp::Configuration& configuration);
32 32
33 // Returns the number of milliseconds until the module want a worker thread to 33 // Returns the number of milliseconds until the module want a worker thread to
34 // call Process. 34 // call Process.
35 int64_t TimeUntilNextProcess() override; 35 int64_t TimeUntilNextProcess() override;
36 36
37 // Process any pending tasks such as timeouts. 37 // Process any pending tasks such as timeouts.
38 void Process() override; 38 void Process() override;
39 39
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 void SetREMBStatus(bool enable) override; 197 void SetREMBStatus(bool enable) override;
198 198
199 void SetREMBData(uint32_t bitrate, 199 void SetREMBData(uint32_t bitrate,
200 const std::vector<uint32_t>& ssrcs) override; 200 const std::vector<uint32_t>& ssrcs) override;
201 201
202 // (TMMBR) Temporary Max Media Bit Rate. 202 // (TMMBR) Temporary Max Media Bit Rate.
203 bool TMMBR() const override; 203 bool TMMBR() const override;
204 204
205 void SetTMMBRStatus(bool enable) override; 205 void SetTMMBRStatus(bool enable) override;
206 206
207 void SetTmmbn(std::vector<rtcp::TmmbItem> bounding_set); 207 void SetTmmbn(std::vector<rtcp::TmmbItem> bounding_set) override;
208 208
209 uint16_t MaxPayloadLength() const override; 209 uint16_t MaxPayloadLength() const override;
210 210
211 uint16_t MaxDataPayloadLength() const override; 211 uint16_t MaxDataPayloadLength() const override;
212 212
213 int32_t SetMaxTransferUnit(uint16_t size) override; 213 int32_t SetMaxTransferUnit(uint16_t size) override;
214 214
215 int32_t SetTransportOverhead(bool tcp, 215 int32_t SetTransportOverhead(bool tcp,
216 bool ipv6, 216 bool ipv6,
217 uint8_t authentication_overhead = 0) override; 217 uint8_t authentication_overhead = 0) override;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 uint32_t* nackRate) const override; 304 uint32_t* nackRate) const override;
305 305
306 // Good state of RTP receiver inform sender. 306 // Good state of RTP receiver inform sender.
307 int32_t SendRTCPReferencePictureSelection(uint64_t picture_id) override; 307 int32_t SendRTCPReferencePictureSelection(uint64_t picture_id) override;
308 308
309 void RegisterSendChannelRtpStatisticsCallback( 309 void RegisterSendChannelRtpStatisticsCallback(
310 StreamDataCountersCallback* callback) override; 310 StreamDataCountersCallback* callback) override;
311 StreamDataCountersCallback* GetSendChannelRtpStatisticsCallback() 311 StreamDataCountersCallback* GetSendChannelRtpStatisticsCallback()
312 const override; 312 const override;
313 313
314 void OnReceivedNack(const std::vector<uint16_t>& nack_sequence_numbers); 314 void OnReceivedNack(
315 void OnReceivedRtcpReportBlocks(const ReportBlockList& report_blocks); 315 const std::vector<uint16_t>& nack_sequence_numbers) override;
316 316 void OnReceivedRtcpReportBlocks(
317 void OnRequestSendReport(); 317 const ReportBlockList& report_blocks) override;
318 void OnRequestSendReport() override;
318 319
319 protected: 320 protected:
320 bool UpdateRTCPReceiveInformationTimers(); 321 bool UpdateRTCPReceiveInformationTimers();
321 322
322 RTPSender rtp_sender_; 323 RTPSender rtp_sender_;
323 324
324 RTCPSender rtcp_sender_; 325 RTCPSender rtcp_sender_;
325 RTCPReceiver rtcp_receiver_; 326 RTCPReceiver rtcp_receiver_;
326 327
327 Clock* clock_; 328 Clock* clock_;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 PacketLossStats receive_loss_stats_; 360 PacketLossStats receive_loss_stats_;
360 361
361 // The processed RTT from RtcpRttStats. 362 // The processed RTT from RtcpRttStats.
362 rtc::CriticalSection critical_section_rtt_; 363 rtc::CriticalSection critical_section_rtt_;
363 int64_t rtt_ms_; 364 int64_t rtt_ms_;
364 }; 365 };
365 366
366 } // namespace webrtc 367 } // namespace webrtc
367 368
368 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RTCP_IMPL_H_ 369 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_RTCP_IMPL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_receiver.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698