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