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

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

Issue 1457383002: Implement standalone event tracing in AppRTCDemo. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: readd jitter_buffer trace, rebase Created 5 years 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/base/event_tracer.cc ('k') | webrtc/examples/androidapp/res/values/strings.xml » ('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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 sync_audio_stream->config().voe_channel_id); 648 sync_audio_stream->config().voe_channel_id);
649 } else { 649 } else {
650 video_stream->SetSyncChannel(voice_engine(), -1); 650 video_stream->SetSyncChannel(voice_engine(), -1);
651 } 651 }
652 } 652 }
653 } 653 }
654 654
655 PacketReceiver::DeliveryStatus Call::DeliverRtcp(MediaType media_type, 655 PacketReceiver::DeliveryStatus Call::DeliverRtcp(MediaType media_type,
656 const uint8_t* packet, 656 const uint8_t* packet,
657 size_t length) { 657 size_t length) {
658 TRACE_EVENT0("webrtc", "Call::DeliverRtcp");
658 // TODO(pbos): Figure out what channel needs it actually. 659 // TODO(pbos): Figure out what channel needs it actually.
659 // Do NOT broadcast! Also make sure it's a valid packet. 660 // Do NOT broadcast! Also make sure it's a valid packet.
660 // Return DELIVERY_UNKNOWN_SSRC if it can be determined that 661 // Return DELIVERY_UNKNOWN_SSRC if it can be determined that
661 // there's no receiver of the packet. 662 // there's no receiver of the packet.
662 received_rtcp_bytes_ += length; 663 received_rtcp_bytes_ += length;
663 bool rtcp_delivered = false; 664 bool rtcp_delivered = false;
664 if (media_type == MediaType::ANY || media_type == MediaType::VIDEO) { 665 if (media_type == MediaType::ANY || media_type == MediaType::VIDEO) {
665 ReadLockScoped read_lock(*receive_crit_); 666 ReadLockScoped read_lock(*receive_crit_);
666 for (VideoReceiveStream* stream : video_receive_streams_) { 667 for (VideoReceiveStream* stream : video_receive_streams_) {
667 if (stream->DeliverRtcp(packet, length)) { 668 if (stream->DeliverRtcp(packet, length)) {
(...skipping 13 matching lines...) Expand all
681 } 682 }
682 } 683 }
683 } 684 }
684 return rtcp_delivered ? DELIVERY_OK : DELIVERY_PACKET_ERROR; 685 return rtcp_delivered ? DELIVERY_OK : DELIVERY_PACKET_ERROR;
685 } 686 }
686 687
687 PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type, 688 PacketReceiver::DeliveryStatus Call::DeliverRtp(MediaType media_type,
688 const uint8_t* packet, 689 const uint8_t* packet,
689 size_t length, 690 size_t length,
690 const PacketTime& packet_time) { 691 const PacketTime& packet_time) {
692 TRACE_EVENT0("webrtc", "Call::DeliverRtp");
691 // Minimum RTP header size. 693 // Minimum RTP header size.
692 if (length < 12) 694 if (length < 12)
693 return DELIVERY_PACKET_ERROR; 695 return DELIVERY_PACKET_ERROR;
694 696
695 last_rtp_packet_received_ms_ = clock_->TimeInMilliseconds(); 697 last_rtp_packet_received_ms_ = clock_->TimeInMilliseconds();
696 if (first_rtp_packet_received_ms_ == -1) 698 if (first_rtp_packet_received_ms_ == -1)
697 first_rtp_packet_received_ms_ = last_rtp_packet_received_ms_; 699 first_rtp_packet_received_ms_ = last_rtp_packet_received_ms_;
698 700
699 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]); 701 uint32_t ssrc = ByteReader<uint32_t>::ReadBigEndian(&packet[8]);
700 ReadLockScoped read_lock(*receive_crit_); 702 ReadLockScoped read_lock(*receive_crit_);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 // thread. Then this check can be enabled. 737 // thread. Then this check can be enabled.
736 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread()); 738 // RTC_DCHECK(!configuration_thread_checker_.CalledOnValidThread());
737 if (RtpHeaderParser::IsRtcp(packet, length)) 739 if (RtpHeaderParser::IsRtcp(packet, length))
738 return DeliverRtcp(media_type, packet, length); 740 return DeliverRtcp(media_type, packet, length);
739 741
740 return DeliverRtp(media_type, packet, length, packet_time); 742 return DeliverRtp(media_type, packet, length, packet_time);
741 } 743 }
742 744
743 } // namespace internal 745 } // namespace internal
744 } // namespace webrtc 746 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/base/event_tracer.cc ('k') | webrtc/examples/androidapp/res/values/strings.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698