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

Side by Side Diff: media/audio/audio_logging.cc

Issue 1864483002: Forward output glitch information from stream WebRTC log (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 4 years, 8 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/logging.h"
6 #include "media/audio/audio_logging.h"
7
8 namespace media {
9
10 WebRtcLoggingCallback g_webrtc_logging_callback = nullptr;
11
12 // TODO: Make sure it's thread safe.
o1ka 2016/04/05 15:28:42 You can use atomic flag to guard initialization.
13
14 void InitWebRtcLoggingCallback(WebRtcLoggingCallback callback) {
15 CHECK(!g_webrtc_logging_callback);
16 g_webrtc_logging_callback = callback;
17 }
18
19 void WebRtcLogMessage(const std::string& message) {
20 if (g_webrtc_logging_callback)
21 g_webrtc_logging_callback(message);
22 }
23
24 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698