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

Side by Side Diff: webrtc/call/call.cc

Issue 1748403002: Move RtcEventLog object from inside VoiceEngine to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Another rebase and accompanying changes. Created 4 years, 5 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
« no previous file with comments | « webrtc/call.h ('k') | webrtc/call/rtc_event_log.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 17 matching lines...) Expand all
28 #include "webrtc/call.h" 28 #include "webrtc/call.h"
29 #include "webrtc/call/bitrate_allocator.h" 29 #include "webrtc/call/bitrate_allocator.h"
30 #include "webrtc/call/rtc_event_log.h" 30 #include "webrtc/call/rtc_event_log.h"
31 #include "webrtc/config.h" 31 #include "webrtc/config.h"
32 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" 32 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
33 #include "webrtc/modules/congestion_controller/include/congestion_controller.h" 33 #include "webrtc/modules/congestion_controller/include/congestion_controller.h"
34 #include "webrtc/modules/pacing/paced_sender.h" 34 #include "webrtc/modules/pacing/paced_sender.h"
35 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h" 35 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
36 #include "webrtc/modules/rtp_rtcp/source/byte_io.h" 36 #include "webrtc/modules/rtp_rtcp/source/byte_io.h"
37 #include "webrtc/modules/utility/include/process_thread.h" 37 #include "webrtc/modules/utility/include/process_thread.h"
38 #include "webrtc/system_wrappers/include/clock.h"
38 #include "webrtc/system_wrappers/include/cpu_info.h" 39 #include "webrtc/system_wrappers/include/cpu_info.h"
39 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" 40 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
40 #include "webrtc/system_wrappers/include/metrics.h" 41 #include "webrtc/system_wrappers/include/metrics.h"
41 #include "webrtc/system_wrappers/include/rw_lock_wrapper.h" 42 #include "webrtc/system_wrappers/include/rw_lock_wrapper.h"
42 #include "webrtc/system_wrappers/include/trace.h" 43 #include "webrtc/system_wrappers/include/trace.h"
43 #include "webrtc/video/call_stats.h" 44 #include "webrtc/video/call_stats.h"
44 #include "webrtc/video/send_delay_stats.h" 45 #include "webrtc/video/send_delay_stats.h"
45 #include "webrtc/video/video_receive_stream.h" 46 #include "webrtc/video/video_receive_stream.h"
46 #include "webrtc/video/video_send_stream.h" 47 #include "webrtc/video/video_send_stream.h"
47 #include "webrtc/video/vie_remb.h" 48 #include "webrtc/video/vie_remb.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 void OnSentPacket(const rtc::SentPacket& sent_packet) override; 101 void OnSentPacket(const rtc::SentPacket& sent_packet) override;
101 102
102 // Implements BitrateObserver. 103 // Implements BitrateObserver.
103 void OnNetworkChanged(uint32_t bitrate_bps, uint8_t fraction_loss, 104 void OnNetworkChanged(uint32_t bitrate_bps, uint8_t fraction_loss,
104 int64_t rtt_ms) override; 105 int64_t rtt_ms) override;
105 106
106 // Implements BitrateAllocator::LimitObserver. 107 // Implements BitrateAllocator::LimitObserver.
107 void OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps, 108 void OnAllocationLimitsChanged(uint32_t min_send_bitrate_bps,
108 uint32_t max_padding_bitrate_bps) override; 109 uint32_t max_padding_bitrate_bps) override;
109 110
111 bool StartEventLog(rtc::PlatformFile log_file,
112 int64_t max_size_bytes) override {
113 return event_log_->StartLogging(log_file, max_size_bytes);
114 }
115
116 void StopEventLog() override { event_log_->StopLogging(); }
117
110 private: 118 private:
111 DeliveryStatus DeliverRtcp(MediaType media_type, const uint8_t* packet, 119 DeliveryStatus DeliverRtcp(MediaType media_type, const uint8_t* packet,
112 size_t length); 120 size_t length);
113 DeliveryStatus DeliverRtp(MediaType media_type, 121 DeliveryStatus DeliverRtp(MediaType media_type,
114 const uint8_t* packet, 122 const uint8_t* packet,
115 size_t length, 123 size_t length,
116 const PacketTime& packet_time); 124 const PacketTime& packet_time);
117 void ConfigureSync(const std::string& sync_group) 125 void ConfigureSync(const std::string& sync_group)
118 EXCLUSIVE_LOCKS_REQUIRED(receive_crit_); 126 EXCLUSIVE_LOCKS_REQUIRED(receive_crit_);
119 127
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 GUARDED_BY(receive_crit_); 163 GUARDED_BY(receive_crit_);
156 164
157 std::unique_ptr<RWLockWrapper> send_crit_; 165 std::unique_ptr<RWLockWrapper> send_crit_;
158 // Audio and Video send streams are owned by the client that creates them. 166 // Audio and Video send streams are owned by the client that creates them.
159 std::map<uint32_t, AudioSendStream*> audio_send_ssrcs_ GUARDED_BY(send_crit_); 167 std::map<uint32_t, AudioSendStream*> audio_send_ssrcs_ GUARDED_BY(send_crit_);
160 std::map<uint32_t, VideoSendStream*> video_send_ssrcs_ GUARDED_BY(send_crit_); 168 std::map<uint32_t, VideoSendStream*> video_send_ssrcs_ GUARDED_BY(send_crit_);
161 std::set<VideoSendStream*> video_send_streams_ GUARDED_BY(send_crit_); 169 std::set<VideoSendStream*> video_send_streams_ GUARDED_BY(send_crit_);
162 170
163 VideoSendStream::RtpStateMap suspended_video_send_ssrcs_; 171 VideoSendStream::RtpStateMap suspended_video_send_ssrcs_;
164 172
165 RtcEventLog* event_log_ = nullptr; 173 std::unique_ptr<webrtc::RtcEventLog> event_log_;
166 174
167 // The following members are only accessed (exclusively) from one thread and 175 // The following members are only accessed (exclusively) from one thread and
168 // from the destructor, and therefore doesn't need any explicit 176 // from the destructor, and therefore doesn't need any explicit
169 // synchronization. 177 // synchronization.
170 int64_t received_video_bytes_; 178 int64_t received_video_bytes_;
171 int64_t received_audio_bytes_; 179 int64_t received_audio_bytes_;
172 int64_t received_rtcp_bytes_; 180 int64_t received_rtcp_bytes_;
173 int64_t first_rtp_packet_received_ms_; 181 int64_t first_rtp_packet_received_ms_;
174 int64_t last_rtp_packet_received_ms_; 182 int64_t last_rtp_packet_received_ms_;
175 int64_t first_packet_sent_ms_; 183 int64_t first_packet_sent_ms_;
(...skipping 27 matching lines...) Expand all
203 num_cpu_cores_(CpuInfo::DetectNumberOfCores()), 211 num_cpu_cores_(CpuInfo::DetectNumberOfCores()),
204 module_process_thread_(ProcessThread::Create("ModuleProcessThread")), 212 module_process_thread_(ProcessThread::Create("ModuleProcessThread")),
205 pacer_thread_(ProcessThread::Create("PacerThread")), 213 pacer_thread_(ProcessThread::Create("PacerThread")),
206 call_stats_(new CallStats(clock_)), 214 call_stats_(new CallStats(clock_)),
207 bitrate_allocator_(new BitrateAllocator(this)), 215 bitrate_allocator_(new BitrateAllocator(this)),
208 config_(config), 216 config_(config),
209 audio_network_state_(kNetworkUp), 217 audio_network_state_(kNetworkUp),
210 video_network_state_(kNetworkUp), 218 video_network_state_(kNetworkUp),
211 receive_crit_(RWLockWrapper::CreateRWLock()), 219 receive_crit_(RWLockWrapper::CreateRWLock()),
212 send_crit_(RWLockWrapper::CreateRWLock()), 220 send_crit_(RWLockWrapper::CreateRWLock()),
221 event_log_(RtcEventLog::Create(webrtc::Clock::GetRealTimeClock())),
213 received_video_bytes_(0), 222 received_video_bytes_(0),
214 received_audio_bytes_(0), 223 received_audio_bytes_(0),
215 received_rtcp_bytes_(0), 224 received_rtcp_bytes_(0),
216 first_rtp_packet_received_ms_(-1), 225 first_rtp_packet_received_ms_(-1),
217 last_rtp_packet_received_ms_(-1), 226 last_rtp_packet_received_ms_(-1),
218 first_packet_sent_ms_(-1), 227 first_packet_sent_ms_(-1),
219 estimated_send_bitrate_sum_kbits_(0), 228 estimated_send_bitrate_sum_kbits_(0),
220 pacer_bitrate_sum_kbits_(0), 229 pacer_bitrate_sum_kbits_(0),
221 min_allocated_send_bitrate_bps_(0), 230 min_allocated_send_bitrate_bps_(0),
222 num_bitrate_updates_(0), 231 num_bitrate_updates_(0),
223 remb_(clock_), 232 remb_(clock_),
224 congestion_controller_(new CongestionController(clock_, this, &remb_)), 233 congestion_controller_(
234 new CongestionController(clock_, this, &remb_, event_log_.get())),
225 video_send_delay_stats_(new SendDelayStats(clock_)) { 235 video_send_delay_stats_(new SendDelayStats(clock_)) {
226 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 236 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
227 RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0); 237 RTC_DCHECK_GE(config.bitrate_config.min_bitrate_bps, 0);
228 RTC_DCHECK_GE(config.bitrate_config.start_bitrate_bps, 238 RTC_DCHECK_GE(config.bitrate_config.start_bitrate_bps,
229 config.bitrate_config.min_bitrate_bps); 239 config.bitrate_config.min_bitrate_bps);
230 if (config.bitrate_config.max_bitrate_bps != -1) { 240 if (config.bitrate_config.max_bitrate_bps != -1) {
231 RTC_DCHECK_GE(config.bitrate_config.max_bitrate_bps, 241 RTC_DCHECK_GE(config.bitrate_config.max_bitrate_bps,
232 config.bitrate_config.start_bitrate_bps); 242 config.bitrate_config.start_bitrate_bps);
233 } 243 }
234 if (config.audio_state.get()) {
235 ScopedVoEInterface<VoECodec> voe_codec(voice_engine());
236 event_log_ = voe_codec->GetEventLog();
237 }
238 244
239 Trace::CreateTrace(); 245 Trace::CreateTrace();
240 call_stats_->RegisterStatsObserver(congestion_controller_.get()); 246 call_stats_->RegisterStatsObserver(congestion_controller_.get());
241 247
242 congestion_controller_->SetBweBitrates( 248 congestion_controller_->SetBweBitrates(
243 config_.bitrate_config.min_bitrate_bps, 249 config_.bitrate_config.min_bitrate_bps,
244 config_.bitrate_config.start_bitrate_bps, 250 config_.bitrate_config.start_bitrate_bps,
245 config_.bitrate_config.max_bitrate_bps); 251 config_.bitrate_config.max_bitrate_bps);
246 congestion_controller_->GetBitrateController()->SetEventLog(event_log_);
247 252
248 module_process_thread_->Start(); 253 module_process_thread_->Start();
249 module_process_thread_->RegisterModule(call_stats_.get()); 254 module_process_thread_->RegisterModule(call_stats_.get());
250 module_process_thread_->RegisterModule(congestion_controller_.get()); 255 module_process_thread_->RegisterModule(congestion_controller_.get());
251 pacer_thread_->RegisterModule(congestion_controller_->pacer()); 256 pacer_thread_->RegisterModule(congestion_controller_->pacer());
252 pacer_thread_->RegisterModule( 257 pacer_thread_->RegisterModule(
253 congestion_controller_->GetRemoteBitrateEstimator(true)); 258 congestion_controller_->GetRemoteBitrateEstimator(true));
254 pacer_thread_->Start(); 259 pacer_thread_->Start();
255 } 260 }
256 261
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 RTC_DCHECK(num_deleted == 1); 369 RTC_DCHECK(num_deleted == 1);
365 } 370 }
366 UpdateAggregateNetworkState(); 371 UpdateAggregateNetworkState();
367 delete audio_send_stream; 372 delete audio_send_stream;
368 } 373 }
369 374
370 webrtc::AudioReceiveStream* Call::CreateAudioReceiveStream( 375 webrtc::AudioReceiveStream* Call::CreateAudioReceiveStream(
371 const webrtc::AudioReceiveStream::Config& config) { 376 const webrtc::AudioReceiveStream::Config& config) {
372 TRACE_EVENT0("webrtc", "Call::CreateAudioReceiveStream"); 377 TRACE_EVENT0("webrtc", "Call::CreateAudioReceiveStream");
373 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 378 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
374 AudioReceiveStream* receive_stream = new AudioReceiveStream( 379 AudioReceiveStream* receive_stream =
375 congestion_controller_.get(), config, config_.audio_state); 380 new AudioReceiveStream(congestion_controller_.get(), config,
381 config_.audio_state, event_log_.get());
376 { 382 {
377 WriteLockScoped write_lock(*receive_crit_); 383 WriteLockScoped write_lock(*receive_crit_);
378 RTC_DCHECK(audio_receive_ssrcs_.find(config.rtp.remote_ssrc) == 384 RTC_DCHECK(audio_receive_ssrcs_.find(config.rtp.remote_ssrc) ==
379 audio_receive_ssrcs_.end()); 385 audio_receive_ssrcs_.end());
380 audio_receive_ssrcs_[config.rtp.remote_ssrc] = receive_stream; 386 audio_receive_ssrcs_[config.rtp.remote_ssrc] = receive_stream;
381 ConfigureSync(config.sync_group); 387 ConfigureSync(config.sync_group);
382 } 388 }
383 receive_stream->SignalNetworkState(audio_network_state_); 389 receive_stream->SignalNetworkState(audio_network_state_);
384 UpdateAggregateNetworkState(); 390 UpdateAggregateNetworkState();
385 return receive_stream; 391 return receive_stream;
(...skipping 28 matching lines...) Expand all
414 const VideoEncoderConfig& encoder_config) { 420 const VideoEncoderConfig& encoder_config) {
415 TRACE_EVENT0("webrtc", "Call::CreateVideoSendStream"); 421 TRACE_EVENT0("webrtc", "Call::CreateVideoSendStream");
416 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 422 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
417 423
418 video_send_delay_stats_->AddSsrcs(config); 424 video_send_delay_stats_->AddSsrcs(config);
419 // TODO(mflodman): Base the start bitrate on a current bandwidth estimate, if 425 // TODO(mflodman): Base the start bitrate on a current bandwidth estimate, if
420 // the call has already started. 426 // the call has already started.
421 VideoSendStream* send_stream = new VideoSendStream( 427 VideoSendStream* send_stream = new VideoSendStream(
422 num_cpu_cores_, module_process_thread_.get(), call_stats_.get(), 428 num_cpu_cores_, module_process_thread_.get(), call_stats_.get(),
423 congestion_controller_.get(), bitrate_allocator_.get(), 429 congestion_controller_.get(), bitrate_allocator_.get(),
424 video_send_delay_stats_.get(), &remb_, event_log_, config, encoder_config, 430 video_send_delay_stats_.get(), &remb_, event_log_.get(), config,
425 suspended_video_send_ssrcs_); 431 encoder_config, suspended_video_send_ssrcs_);
426 { 432 {
427 WriteLockScoped write_lock(*send_crit_); 433 WriteLockScoped write_lock(*send_crit_);
428 for (uint32_t ssrc : config.rtp.ssrcs) { 434 for (uint32_t ssrc : config.rtp.ssrcs) {
429 RTC_DCHECK(video_send_ssrcs_.find(ssrc) == video_send_ssrcs_.end()); 435 RTC_DCHECK(video_send_ssrcs_.find(ssrc) == video_send_ssrcs_.end());
430 video_send_ssrcs_[ssrc] = send_stream; 436 video_send_ssrcs_[ssrc] = send_stream;
431 } 437 }
432 video_send_streams_.insert(send_stream); 438 video_send_streams_.insert(send_stream);
433 } 439 }
434 send_stream->SignalNetworkState(video_network_state_); 440 send_stream->SignalNetworkState(video_network_state_);
435 UpdateAggregateNetworkState(); 441 UpdateAggregateNetworkState();
436 if (event_log_) 442 event_log_->LogVideoSendStreamConfig(config);
437 event_log_->LogVideoSendStreamConfig(config);
438 return send_stream; 443 return send_stream;
439 } 444 }
440 445
441 void Call::DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) { 446 void Call::DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) {
442 TRACE_EVENT0("webrtc", "Call::DestroyVideoSendStream"); 447 TRACE_EVENT0("webrtc", "Call::DestroyVideoSendStream");
443 RTC_DCHECK(send_stream != nullptr); 448 RTC_DCHECK(send_stream != nullptr);
444 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 449 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
445 450
446 send_stream->Stop(); 451 send_stream->Stop();
447 452
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 WriteLockScoped write_lock(*receive_crit_); 491 WriteLockScoped write_lock(*receive_crit_);
487 RTC_DCHECK(video_receive_ssrcs_.find(config.rtp.remote_ssrc) == 492 RTC_DCHECK(video_receive_ssrcs_.find(config.rtp.remote_ssrc) ==
488 video_receive_ssrcs_.end()); 493 video_receive_ssrcs_.end());
489 video_receive_ssrcs_[config.rtp.remote_ssrc] = receive_stream; 494 video_receive_ssrcs_[config.rtp.remote_ssrc] = receive_stream;
490 // TODO(pbos): Configure different RTX payloads per receive payload. 495 // TODO(pbos): Configure different RTX payloads per receive payload.
491 VideoReceiveStream::Config::Rtp::RtxMap::const_iterator it = 496 VideoReceiveStream::Config::Rtp::RtxMap::const_iterator it =
492 config.rtp.rtx.begin(); 497 config.rtp.rtx.begin();
493 if (it != config.rtp.rtx.end()) 498 if (it != config.rtp.rtx.end())
494 video_receive_ssrcs_[it->second.ssrc] = receive_stream; 499 video_receive_ssrcs_[it->second.ssrc] = receive_stream;
495 video_receive_streams_.insert(receive_stream); 500 video_receive_streams_.insert(receive_stream);
496
497 ConfigureSync(config.sync_group); 501 ConfigureSync(config.sync_group);
498 } 502 }
499 receive_stream->SignalNetworkState(video_network_state_); 503 receive_stream->SignalNetworkState(video_network_state_);
500 UpdateAggregateNetworkState(); 504 UpdateAggregateNetworkState();
501 if (event_log_) 505 event_log_->LogVideoReceiveStreamConfig(config);
502 event_log_->LogVideoReceiveStreamConfig(config);
503 return receive_stream; 506 return receive_stream;
504 } 507 }
505 508
506 void Call::DestroyVideoReceiveStream( 509 void Call::DestroyVideoReceiveStream(
507 webrtc::VideoReceiveStream* receive_stream) { 510 webrtc::VideoReceiveStream* receive_stream) {
508 TRACE_EVENT0("webrtc", "Call::DestroyVideoReceiveStream"); 511 TRACE_EVENT0("webrtc", "Call::DestroyVideoReceiveStream");
509 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread()); 512 RTC_DCHECK(configuration_thread_checker_.CalledOnValidThread());
510 RTC_DCHECK(receive_stream != nullptr); 513 RTC_DCHECK(receive_stream != nullptr);
511 VideoReceiveStream* receive_stream_impl = nullptr; 514 VideoReceiveStream* receive_stream_impl = nullptr;
512 { 515 {
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 823
821 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]); 824 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]);
822 ReadLockScoped read_lock(*receive_crit_); 825 ReadLockScoped read_lock(*receive_crit_);
823 if (media_type == MediaType::ANY || media_type == MediaType::AUDIO) { 826 if (media_type == MediaType::ANY || media_type == MediaType::AUDIO) {
824 auto it = audio_receive_ssrcs_.find(ssrc); 827 auto it = audio_receive_ssrcs_.find(ssrc);
825 if (it != audio_receive_ssrcs_.end()) { 828 if (it != audio_receive_ssrcs_.end()) {
826 received_audio_bytes_ += length; 829 received_audio_bytes_ += length;
827 auto status = it->second->DeliverRtp(packet, length, packet_time) 830 auto status = it->second->DeliverRtp(packet, length, packet_time)
828 ? DELIVERY_OK 831 ? DELIVERY_OK
829 : DELIVERY_PACKET_ERROR; 832 : DELIVERY_PACKET_ERROR;
830 if (status == DELIVERY_OK && event_log_) 833 if (status == DELIVERY_OK)
831 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length); 834 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length);
832 return status; 835 return status;
833 } 836 }
834 } 837 }
835 if (media_type == MediaType::ANY || media_type == MediaType::VIDEO) { 838 if (media_type == MediaType::ANY || media_type == MediaType::VIDEO) {
836 auto it = video_receive_ssrcs_.find(ssrc); 839 auto it = video_receive_ssrcs_.find(ssrc);
837 if (it != video_receive_ssrcs_.end()) { 840 if (it != video_receive_ssrcs_.end()) {
838 received_video_bytes_ += length; 841 received_video_bytes_ += length;
839 auto status = it->second->DeliverRtp(packet, length, packet_time) 842 auto status = it->second->DeliverRtp(packet, length, packet_time)
840 ? DELIVERY_OK 843 ? DELIVERY_OK
841 : DELIVERY_PACKET_ERROR; 844 : DELIVERY_PACKET_ERROR;
842 if (status == DELIVERY_OK && event_log_) 845 if (status == DELIVERY_OK)
843 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length); 846 event_log_->LogRtpHeader(kIncomingPacket, media_type, packet, length);
844 return status; 847 return status;
845 } 848 }
846 } 849 }
847 return DELIVERY_UNKNOWN_SSRC; 850 return DELIVERY_UNKNOWN_SSRC;
848 } 851 }
849 852
850 PacketReceiver::DeliveryStatus Call::DeliverPacket( 853 PacketReceiver::DeliveryStatus Call::DeliverPacket(
851 MediaType media_type, 854 MediaType media_type,
852 const uint8_t* packet, 855 const uint8_t* packet,
853 size_t length, 856 size_t length,
854 const PacketTime& packet_time) { 857 const PacketTime& packet_time) {
855 // TODO(solenberg): Tests call this function on a network thread, libjingle 858 // TODO(solenberg): Tests call this function on a network thread, libjingle
856 // calls on the worker thread. We should move towards always using a network 859 // calls on the worker thread. We should move towards always using a network
857 // thread. Then this check can be enabled. 860 // thread. Then this check can be enabled.
858 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); 861 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread());
859 if (RtpHeaderParser::IsRtcp(packet, length)) 862 if (RtpHeaderParser::IsRtcp(packet, length))
860 return DeliverRtcp(media_type, packet, length); 863 return DeliverRtcp(media_type, packet, length);
861 864
862 return DeliverRtp(media_type, packet, length, packet_time); 865 return DeliverRtp(media_type, packet, length, packet_time);
863 } 866 }
864 867
865 } // namespace internal 868 } // namespace internal
866 } // namespace webrtc 869 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call.h ('k') | webrtc/call/rtc_event_log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698