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

Side by Side Diff: third_party/libjingle/overrides/init_webrtc.cc

Issue 23619017: Add a trace for WebRTC initialization time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "init_webrtc.h" 5 #include "init_webrtc.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/native_library.h" 10 #include "base/native_library.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #elif defined(OS_ANDROID) 64 #elif defined(OS_ANDROID)
65 path = path.Append(FILE_PATH_LITERAL("libpeerconnection.so")); 65 path = path.Append(FILE_PATH_LITERAL("libpeerconnection.so"));
66 #else 66 #else
67 path = path.Append(FILE_PATH_LITERAL("lib")) 67 path = path.Append(FILE_PATH_LITERAL("lib"))
68 .Append(FILE_PATH_LITERAL("libpeerconnection.so")); 68 .Append(FILE_PATH_LITERAL("libpeerconnection.so"));
69 #endif 69 #endif
70 return path; 70 return path;
71 } 71 }
72 72
73 bool InitializeWebRtcModule() { 73 bool InitializeWebRtcModule() {
74 TRACE_EVENT0("webrtc", "InitializeWebRtcModule");
75
74 if (g_create_webrtc_media_engine) 76 if (g_create_webrtc_media_engine)
75 return true; // InitializeWebRtcModule has already been called. 77 return true; // InitializeWebRtcModule has already been called.
76 78
77 base::FilePath path(GetLibPeerConnectionPath()); 79 base::FilePath path(GetLibPeerConnectionPath());
78 DVLOG(1) << "Loading WebRTC module: " << path.value(); 80 DVLOG(1) << "Loading WebRTC module: " << path.value();
79 81
80 std::string error; 82 std::string error;
81 static base::NativeLibrary lib = 83 static base::NativeLibrary lib =
82 base::LoadNativeLibrary(path, &error); 84 base::LoadNativeLibrary(path, &error);
83 CHECK(lib) << error; 85 CHECK(lib) << error;
(...skipping 30 matching lines...) Expand all
114 InitializeWebRtcModule(); 116 InitializeWebRtcModule();
115 return g_create_webrtc_media_engine(adm, adm_sc, encoder_factory, 117 return g_create_webrtc_media_engine(adm, adm_sc, encoder_factory,
116 decoder_factory); 118 decoder_factory);
117 } 119 }
118 120
119 void DestroyWebRtcMediaEngine(cricket::MediaEngineInterface* media_engine) { 121 void DestroyWebRtcMediaEngine(cricket::MediaEngineInterface* media_engine) {
120 g_destroy_webrtc_media_engine(media_engine); 122 g_destroy_webrtc_media_engine(media_engine);
121 } 123 }
122 124
123 #endif // LIBPEERCONNECTION_LIB 125 #endif // LIBPEERCONNECTION_LIB
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698