OLD | NEW |
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 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 StreamDataCounters* rtx_counters) const; | 123 StreamDataCounters* rtx_counters) const; |
124 | 124 |
125 // Gets received stream data counters. | 125 // Gets received stream data counters. |
126 void GetReceiveStreamDataCounters(StreamDataCounters* rtp_counters, | 126 void GetReceiveStreamDataCounters(StreamDataCounters* rtp_counters, |
127 StreamDataCounters* rtx_counters) const; | 127 StreamDataCounters* rtx_counters) const; |
128 | 128 |
129 // Called on update of RTP statistics. | 129 // Called on update of RTP statistics. |
130 void RegisterSendChannelRtpStatisticsCallback( | 130 void RegisterSendChannelRtpStatisticsCallback( |
131 StreamDataCountersCallback* callback); | 131 StreamDataCountersCallback* callback); |
132 | 132 |
133 void GetSendRtcpPacketTypeCounter( | |
134 RtcpPacketTypeCounter* packet_counter) const; | |
135 | |
136 void GetReceiveRtcpPacketTypeCounter( | |
137 RtcpPacketTypeCounter* packet_counter) const; | |
138 | |
139 void RegisterSendSideDelayObserver(SendSideDelayObserver* observer); | 133 void RegisterSendSideDelayObserver(SendSideDelayObserver* observer); |
140 | 134 |
141 // Called on any new send bitrate estimate. | 135 // Called on any new send bitrate estimate. |
142 void RegisterSendBitrateObserver(BitrateStatisticsObserver* observer); | 136 void RegisterSendBitrateObserver(BitrateStatisticsObserver* observer); |
143 | 137 |
144 // Implements RtpFeedback. | 138 // Implements RtpFeedback. |
145 int32_t OnInitializeDecoder(const int8_t payload_type, | 139 int32_t OnInitializeDecoder(const int8_t payload_type, |
146 const char payload_name[RTP_PAYLOAD_NAME_SIZE], | 140 const char payload_name[RTP_PAYLOAD_NAME_SIZE], |
147 const int frequency, | 141 const int frequency, |
148 const size_t channels, | 142 const size_t channels, |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 305 |
312 class RegisterableRtcpPacketTypeCounterObserver | 306 class RegisterableRtcpPacketTypeCounterObserver |
313 : public RegisterableCallback<RtcpPacketTypeCounterObserver> { | 307 : public RegisterableCallback<RtcpPacketTypeCounterObserver> { |
314 public: | 308 public: |
315 void RtcpPacketTypesCounterUpdated( | 309 void RtcpPacketTypesCounterUpdated( |
316 uint32_t ssrc, | 310 uint32_t ssrc, |
317 const RtcpPacketTypeCounter& packet_counter) override { | 311 const RtcpPacketTypeCounter& packet_counter) override { |
318 rtc::CritScope lock(&critsect_); | 312 rtc::CritScope lock(&critsect_); |
319 if (callback_) | 313 if (callback_) |
320 callback_->RtcpPacketTypesCounterUpdated(ssrc, packet_counter); | 314 callback_->RtcpPacketTypesCounterUpdated(ssrc, packet_counter); |
321 counter_map_[ssrc] = packet_counter; | |
322 } | |
323 | |
324 virtual std::map<uint32_t, RtcpPacketTypeCounter> GetPacketTypeCounterMap() | |
325 const { | |
326 rtc::CritScope lock(&critsect_); | |
327 return counter_map_; | |
328 } | 315 } |
329 | 316 |
330 private: | 317 private: |
331 std::map<uint32_t, RtcpPacketTypeCounter> counter_map_ | |
332 GUARDED_BY(critsect_); | |
333 } rtcp_packet_type_counter_observer_; | 318 } rtcp_packet_type_counter_observer_; |
334 | 319 |
335 const bool sender_; | 320 const bool sender_; |
336 | 321 |
337 ProcessThread* const module_process_thread_; | 322 ProcessThread* const module_process_thread_; |
338 PayloadRouter* const send_payload_router_; | 323 PayloadRouter* const send_payload_router_; |
339 | 324 |
340 // Used for all registered callbacks except rendering. | 325 // Used for all registered callbacks except rendering. |
341 rtc::CriticalSection crit_; | 326 rtc::CriticalSection crit_; |
342 | 327 |
(...skipping 25 matching lines...) Expand all Loading... |
368 int64_t last_rtt_ms_ GUARDED_BY(crit_); | 353 int64_t last_rtt_ms_ GUARDED_BY(crit_); |
369 | 354 |
370 // RtpRtcp modules, declared last as they use other members on construction. | 355 // RtpRtcp modules, declared last as they use other members on construction. |
371 const std::vector<RtpRtcp*> rtp_rtcp_modules_; | 356 const std::vector<RtpRtcp*> rtp_rtcp_modules_; |
372 size_t num_active_rtp_rtcp_modules_ GUARDED_BY(crit_); | 357 size_t num_active_rtp_rtcp_modules_ GUARDED_BY(crit_); |
373 }; | 358 }; |
374 | 359 |
375 } // namespace webrtc | 360 } // namespace webrtc |
376 | 361 |
377 #endif // WEBRTC_VIDEO_VIE_CHANNEL_H_ | 362 #endif // WEBRTC_VIDEO_VIE_CHANNEL_H_ |
OLD | NEW |