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

Side by Side Diff: talk/app/webrtc/webrtcsession.cc

Issue 1505023003: Add tracing to upper-level WebRTC calls. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 | « no previous file | talk/media/webrtc/webrtcvideoengine2.cc » ('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 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "talk/media/base/videocapturer.h" 43 #include "talk/media/base/videocapturer.h"
44 #include "talk/session/media/channel.h" 44 #include "talk/session/media/channel.h"
45 #include "talk/session/media/channelmanager.h" 45 #include "talk/session/media/channelmanager.h"
46 #include "talk/session/media/mediasession.h" 46 #include "talk/session/media/mediasession.h"
47 #include "webrtc/base/basictypes.h" 47 #include "webrtc/base/basictypes.h"
48 #include "webrtc/base/checks.h" 48 #include "webrtc/base/checks.h"
49 #include "webrtc/base/helpers.h" 49 #include "webrtc/base/helpers.h"
50 #include "webrtc/base/logging.h" 50 #include "webrtc/base/logging.h"
51 #include "webrtc/base/stringencode.h" 51 #include "webrtc/base/stringencode.h"
52 #include "webrtc/base/stringutils.h" 52 #include "webrtc/base/stringutils.h"
53 #include "webrtc/base/trace_event.h"
53 #include "webrtc/call.h" 54 #include "webrtc/call.h"
54 #include "webrtc/p2p/base/portallocator.h" 55 #include "webrtc/p2p/base/portallocator.h"
55 #include "webrtc/p2p/base/transportchannel.h" 56 #include "webrtc/p2p/base/transportchannel.h"
56 57
57 using cricket::ContentInfo; 58 using cricket::ContentInfo;
58 using cricket::ContentInfos; 59 using cricket::ContentInfos;
59 using cricket::MediaContentDescription; 60 using cricket::MediaContentDescription;
60 using cricket::SessionDescription; 61 using cricket::SessionDescription;
61 using cricket::TransportInfo; 62 using cricket::TransportInfo;
62 63
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 void WebRtcSession::CreateAnswer( 784 void WebRtcSession::CreateAnswer(
784 CreateSessionDescriptionObserver* observer, 785 CreateSessionDescriptionObserver* observer,
785 const MediaConstraintsInterface* constraints, 786 const MediaConstraintsInterface* constraints,
786 const cricket::MediaSessionOptions& session_options) { 787 const cricket::MediaSessionOptions& session_options) {
787 webrtc_session_desc_factory_->CreateAnswer(observer, constraints, 788 webrtc_session_desc_factory_->CreateAnswer(observer, constraints,
788 session_options); 789 session_options);
789 } 790 }
790 791
791 bool WebRtcSession::SetLocalDescription(SessionDescriptionInterface* desc, 792 bool WebRtcSession::SetLocalDescription(SessionDescriptionInterface* desc,
792 std::string* err_desc) { 793 std::string* err_desc) {
794 TRACE_EVENT0("webrtc", "WebRtcSession::SetLocalDescription");
793 ASSERT(signaling_thread()->IsCurrent()); 795 ASSERT(signaling_thread()->IsCurrent());
794 796
795 // Takes the ownership of |desc| regardless of the result. 797 // Takes the ownership of |desc| regardless of the result.
796 rtc::scoped_ptr<SessionDescriptionInterface> desc_temp(desc); 798 rtc::scoped_ptr<SessionDescriptionInterface> desc_temp(desc);
797 799
798 // Validate SDP. 800 // Validate SDP.
799 if (!ValidateSessionDescription(desc, cricket::CS_LOCAL, err_desc)) { 801 if (!ValidateSessionDescription(desc, cricket::CS_LOCAL, err_desc)) {
800 return false; 802 return false;
801 } 803 }
802 804
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 } 839 }
838 840
839 if (error() != ERROR_NONE) { 841 if (error() != ERROR_NONE) {
840 return BadLocalSdp(desc->type(), GetSessionErrorMsg(), err_desc); 842 return BadLocalSdp(desc->type(), GetSessionErrorMsg(), err_desc);
841 } 843 }
842 return true; 844 return true;
843 } 845 }
844 846
845 bool WebRtcSession::SetRemoteDescription(SessionDescriptionInterface* desc, 847 bool WebRtcSession::SetRemoteDescription(SessionDescriptionInterface* desc,
846 std::string* err_desc) { 848 std::string* err_desc) {
849 TRACE_EVENT0("webrtc", "WebRtcSession::SetRemoteDescription");
847 ASSERT(signaling_thread()->IsCurrent()); 850 ASSERT(signaling_thread()->IsCurrent());
848 851
849 // Takes the ownership of |desc| regardless of the result. 852 // Takes the ownership of |desc| regardless of the result.
850 rtc::scoped_ptr<SessionDescriptionInterface> desc_temp(desc); 853 rtc::scoped_ptr<SessionDescriptionInterface> desc_temp(desc);
851 854
852 // Validate SDP. 855 // Validate SDP.
853 if (!ValidateSessionDescription(desc, cricket::CS_REMOTE, err_desc)) { 856 if (!ValidateSessionDescription(desc, cricket::CS_REMOTE, err_desc)) {
854 return false; 857 return false;
855 } 858 }
856 859
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after
2189 } 2192 }
2190 } 2193 }
2191 2194
2192 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, 2195 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel,
2193 const rtc::SentPacket& sent_packet) { 2196 const rtc::SentPacket& sent_packet) {
2194 RTC_DCHECK(worker_thread()->IsCurrent()); 2197 RTC_DCHECK(worker_thread()->IsCurrent());
2195 media_controller_->call_w()->OnSentPacket(sent_packet); 2198 media_controller_->call_w()->OnSentPacket(sent_packet);
2196 } 2199 }
2197 2200
2198 } // namespace webrtc 2201 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | talk/media/webrtc/webrtcvideoengine2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698