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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 StreamDataCountersCallback* callback); | 180 StreamDataCountersCallback* callback); |
181 | 181 |
182 void GetSendRtcpPacketTypeCounter( | 182 void GetSendRtcpPacketTypeCounter( |
183 RtcpPacketTypeCounter* packet_counter) const; | 183 RtcpPacketTypeCounter* packet_counter) const; |
184 | 184 |
185 void GetReceiveRtcpPacketTypeCounter( | 185 void GetReceiveRtcpPacketTypeCounter( |
186 RtcpPacketTypeCounter* packet_counter) const; | 186 RtcpPacketTypeCounter* packet_counter) const; |
187 | 187 |
188 void RegisterSendSideDelayObserver(SendSideDelayObserver* observer); | 188 void RegisterSendSideDelayObserver(SendSideDelayObserver* observer); |
189 | 189 |
| 190 void RegisterSendPacketObserver(SendPacketObserver* observer); |
| 191 |
190 // Called on any new send bitrate estimate. | 192 // Called on any new send bitrate estimate. |
191 void RegisterSendBitrateObserver(BitrateStatisticsObserver* observer); | 193 void RegisterSendBitrateObserver(BitrateStatisticsObserver* observer); |
192 | 194 |
193 // Implements RtpFeedback. | 195 // Implements RtpFeedback. |
194 int32_t OnInitializeDecoder(const int8_t payload_type, | 196 int32_t OnInitializeDecoder(const int8_t payload_type, |
195 const char payload_name[RTP_PAYLOAD_NAME_SIZE], | 197 const char payload_name[RTP_PAYLOAD_NAME_SIZE], |
196 const int frequency, | 198 const int frequency, |
197 const uint8_t channels, | 199 const uint8_t channels, |
198 const uint32_t rate) override; | 200 const uint32_t rate) override; |
199 void OnIncomingSSRCChanged(const uint32_t ssrc) override; | 201 void OnIncomingSSRCChanged(const uint32_t ssrc) override; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 RtcpBandwidthObserver* bandwidth_callback, | 299 RtcpBandwidthObserver* bandwidth_callback, |
298 TransportFeedbackObserver* transport_feedback_callback, | 300 TransportFeedbackObserver* transport_feedback_callback, |
299 RtcpRttStats* rtt_stats, | 301 RtcpRttStats* rtt_stats, |
300 RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer, | 302 RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer, |
301 RemoteBitrateEstimator* remote_bitrate_estimator, | 303 RemoteBitrateEstimator* remote_bitrate_estimator, |
302 RtpPacketSender* paced_sender, | 304 RtpPacketSender* paced_sender, |
303 TransportSequenceNumberAllocator* transport_sequence_number_allocator, | 305 TransportSequenceNumberAllocator* transport_sequence_number_allocator, |
304 BitrateStatisticsObserver* send_bitrate_observer, | 306 BitrateStatisticsObserver* send_bitrate_observer, |
305 FrameCountObserver* send_frame_count_observer, | 307 FrameCountObserver* send_frame_count_observer, |
306 SendSideDelayObserver* send_side_delay_observer, | 308 SendSideDelayObserver* send_side_delay_observer, |
| 309 SendPacketObserver* send_packet_observer, |
307 size_t num_modules); | 310 size_t num_modules); |
308 | 311 |
309 // Assumed to be protected. | 312 // Assumed to be protected. |
310 void StartDecodeThread(); | 313 void StartDecodeThread(); |
311 void StopDecodeThread(); | 314 void StopDecodeThread(); |
312 | 315 |
313 void ProcessNACKRequest(const bool enable); | 316 void ProcessNACKRequest(const bool enable); |
314 // Compute NACK list parameters for the buffering mode. | 317 // Compute NACK list parameters for the buffering mode. |
315 int GetRequiredNackListSize(int target_delay_ms); | 318 int GetRequiredNackListSize(int target_delay_ms); |
316 void SetRtxSendStatus(bool enable); | 319 void SetRtxSendStatus(bool enable); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 public RegisterableCallback<SendSideDelayObserver> { | 376 public RegisterableCallback<SendSideDelayObserver> { |
374 void SendSideDelayUpdated(int avg_delay_ms, | 377 void SendSideDelayUpdated(int avg_delay_ms, |
375 int max_delay_ms, | 378 int max_delay_ms, |
376 uint32_t ssrc) override { | 379 uint32_t ssrc) override { |
377 CriticalSectionScoped cs(critsect_.get()); | 380 CriticalSectionScoped cs(critsect_.get()); |
378 if (callback_) | 381 if (callback_) |
379 callback_->SendSideDelayUpdated(avg_delay_ms, max_delay_ms, ssrc); | 382 callback_->SendSideDelayUpdated(avg_delay_ms, max_delay_ms, ssrc); |
380 } | 383 } |
381 } send_side_delay_observer_; | 384 } send_side_delay_observer_; |
382 | 385 |
| 386 class RegisterableSendPacketObserver |
| 387 : public RegisterableCallback<SendPacketObserver> { |
| 388 void OnSendPacket(uint16_t packet_id, |
| 389 int64_t capture_time_ms, |
| 390 uint32_t ssrc) override { |
| 391 CriticalSectionScoped cs(critsect_.get()); |
| 392 if (callback_) |
| 393 callback_->OnSendPacket(packet_id, capture_time_ms, ssrc); |
| 394 } |
| 395 } send_packet_observer_; |
| 396 |
383 class RegisterableRtcpPacketTypeCounterObserver | 397 class RegisterableRtcpPacketTypeCounterObserver |
384 : public RegisterableCallback<RtcpPacketTypeCounterObserver> { | 398 : public RegisterableCallback<RtcpPacketTypeCounterObserver> { |
385 public: | 399 public: |
386 void RtcpPacketTypesCounterUpdated( | 400 void RtcpPacketTypesCounterUpdated( |
387 uint32_t ssrc, | 401 uint32_t ssrc, |
388 const RtcpPacketTypeCounter& packet_counter) override { | 402 const RtcpPacketTypeCounter& packet_counter) override { |
389 CriticalSectionScoped cs(critsect_.get()); | 403 CriticalSectionScoped cs(critsect_.get()); |
390 if (callback_) | 404 if (callback_) |
391 callback_->RtcpPacketTypesCounterUpdated(ssrc, packet_counter); | 405 callback_->RtcpPacketTypesCounterUpdated(ssrc, packet_counter); |
392 counter_map_[ssrc] = packet_counter; | 406 counter_map_[ssrc] = packet_counter; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 size_t num_rtts_ GUARDED_BY(crit_); | 462 size_t num_rtts_ GUARDED_BY(crit_); |
449 | 463 |
450 // RtpRtcp modules, declared last as they use other members on construction. | 464 // RtpRtcp modules, declared last as they use other members on construction. |
451 const std::vector<RtpRtcp*> rtp_rtcp_modules_; | 465 const std::vector<RtpRtcp*> rtp_rtcp_modules_; |
452 size_t num_active_rtp_rtcp_modules_ GUARDED_BY(crit_); | 466 size_t num_active_rtp_rtcp_modules_ GUARDED_BY(crit_); |
453 }; | 467 }; |
454 | 468 |
455 } // namespace webrtc | 469 } // namespace webrtc |
456 | 470 |
457 #endif // WEBRTC_VIDEO_VIE_CHANNEL_H_ | 471 #endif // WEBRTC_VIDEO_VIE_CHANNEL_H_ |
OLD | NEW |