blob: f5bcd68af19ed060ae17f5a29b90622ca8cc359c [file] [log] [blame]
henrike@webrtc.orgf0488722014-05-13 18:00:26 +00001/*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#if defined(WEBRTC_WIN)
Tommi23edcff2015-05-25 10:45:43 +020012#if !defined(WIN32_LEAN_AND_MEAN)
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000013#define WIN32_LEAN_AND_MEAN
Tommi23edcff2015-05-25 10:45:43 +020014#endif
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000015#include <windows.h>
16#define snprintf _snprintf
17#undef ERROR // wingdi.h
18#endif
19
20#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
21#include <CoreServices/CoreServices.h>
22#elif defined(WEBRTC_ANDROID)
23#include <android/log.h>
24static const char kLibjingle[] = "libjingle";
25// Android has a 1024 limit on log inputs. We use 60 chars as an
26// approx for the header/tag portion.
27// See android/system/core/liblog/logd_write.c
28static const int kMaxLogLineSize = 1024 - 60;
29#endif // WEBRTC_MAC && !defined(WEBRTC_IOS) || WEBRTC_ANDROID
30
31#include <time.h>
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000032#include <limits.h>
andresp@webrtc.orgff689be2015-02-12 11:54:26 +000033
34#include <algorithm>
35#include <iomanip>
36#include <ostream>
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000037#include <vector>
38
39#include "webrtc/base/logging.h"
Tommi0eefb4d2015-05-23 09:54:07 +020040#include "webrtc/base/scoped_ptr.h"
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000041#include "webrtc/base/stringencode.h"
42#include "webrtc/base/stringutils.h"
43#include "webrtc/base/timeutils.h"
44
45namespace rtc {
46
47/////////////////////////////////////////////////////////////////////////////
48// Constant Labels
49/////////////////////////////////////////////////////////////////////////////
50
51const char * FindLabel(int value, const ConstantLabel entries[]) {
52 for (int i = 0; entries[i].label; ++i) {
53 if (value == entries[i].value) {
54 return entries[i].label;
55 }
56 }
57 return 0;
58}
59
60std::string ErrorName(int err, const ConstantLabel * err_table) {
61 if (err == 0)
62 return "No error";
63
64 if (err_table != 0) {
65 if (const char * value = FindLabel(err, err_table))
66 return value;
67 }
68
69 char buffer[16];
70 snprintf(buffer, sizeof(buffer), "0x%08x", err);
71 return buffer;
72}
73
74/////////////////////////////////////////////////////////////////////////////
75// LogMessage
76/////////////////////////////////////////////////////////////////////////////
77
Tommi0eefb4d2015-05-23 09:54:07 +020078// By default, release builds don't log, debug builds at info level
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000079#if _DEBUG
Tommi0eefb4d2015-05-23 09:54:07 +020080LoggingSeverity LogMessage::min_sev_ = LS_INFO;
81LoggingSeverity LogMessage::dbg_sev_ = LS_INFO;
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000082#else // !_DEBUG
Tommi0eefb4d2015-05-23 09:54:07 +020083LoggingSeverity LogMessage::min_sev_ = LS_NONE;
84LoggingSeverity LogMessage::dbg_sev_ = LS_NONE;
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000085#endif // !_DEBUG
86
87// Global lock for log subsystem, only needed to serialize access to streams_.
88CriticalSection LogMessage::crit_;
89
henrike@webrtc.orgf0488722014-05-13 18:00:26 +000090// The list of logging streams currently configured.
91// Note: we explicitly do not clean this up, because of the uncertain ordering
92// of destructors at program exit. Let the person who sets the stream trigger
93// cleanup by setting to NULL, or let it leak (safe at program exit).
94LogMessage::StreamList LogMessage::streams_;
95
96// Boolean options default to false (0)
97bool LogMessage::thread_, LogMessage::timestamp_;
98
99// If we're in diagnostic mode, we'll be explicitly set that way; default=false.
100bool LogMessage::is_diagnostic_mode_ = false;
101
102LogMessage::LogMessage(const char* file, int line, LoggingSeverity sev,
103 LogErrorContext err_ctx, int err, const char* module)
104 : severity_(sev),
105 warn_slow_logs_delay_(WARN_SLOW_LOGS_DELAY) {
106 if (timestamp_) {
107 uint32 time = TimeSince(LogStartTime());
108 // Also ensure WallClockStartTime is initialized, so that it matches
109 // LogStartTime.
110 WallClockStartTime();
111 print_stream_ << "[" << std::setfill('0') << std::setw(3) << (time / 1000)
112 << ":" << std::setw(3) << (time % 1000) << std::setfill(' ')
113 << "] ";
114 }
115
116 if (thread_) {
117#if defined(WEBRTC_WIN)
118 DWORD id = GetCurrentThreadId();
119 print_stream_ << "[" << std::hex << id << std::dec << "] ";
Tommi0eefb4d2015-05-23 09:54:07 +0200120#endif // WEBRTC_WIN
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000121 }
122
123 if (err_ctx != ERRCTX_NONE) {
124 std::ostringstream tmp;
125 tmp << "[0x" << std::setfill('0') << std::hex << std::setw(8) << err << "]";
126 switch (err_ctx) {
127 case ERRCTX_ERRNO:
128 tmp << " " << strerror(err);
129 break;
130#if WEBRTC_WIN
131 case ERRCTX_HRESULT: {
132 char msgbuf[256];
133 DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM;
134 HMODULE hmod = GetModuleHandleA(module);
135 if (hmod)
136 flags |= FORMAT_MESSAGE_FROM_HMODULE;
137 if (DWORD len = FormatMessageA(
138 flags, hmod, err,
139 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
140 msgbuf, sizeof(msgbuf) / sizeof(msgbuf[0]), NULL)) {
141 while ((len > 0) &&
142 isspace(static_cast<unsigned char>(msgbuf[len-1]))) {
143 msgbuf[--len] = 0;
144 }
145 tmp << " " << msgbuf;
146 }
147 break;
148 }
Tommi0eefb4d2015-05-23 09:54:07 +0200149#endif // WEBRTC_WIN
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000150#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
151 case ERRCTX_OSSTATUS: {
152 tmp << " " << nonnull(GetMacOSStatusErrorString(err), "Unknown error");
153 if (const char* desc = GetMacOSStatusCommentString(err)) {
154 tmp << ": " << desc;
155 }
156 break;
157 }
158#endif // WEBRTC_MAC && !defined(WEBRTC_IOS)
159 default:
160 break;
161 }
162 extra_ = tmp.str();
163 }
164}
165
166LogMessage::~LogMessage() {
167 if (!extra_.empty())
168 print_stream_ << " : " << extra_;
169 print_stream_ << std::endl;
170
171 const std::string& str = print_stream_.str();
172 if (severity_ >= dbg_sev_) {
173 OutputToDebug(str, severity_);
174 }
175
176 uint32 before = Time();
177 // Must lock streams_ before accessing
178 CritScope cs(&crit_);
179 for (StreamList::iterator it = streams_.begin(); it != streams_.end(); ++it) {
180 if (severity_ >= it->second) {
Tommi0eefb4d2015-05-23 09:54:07 +0200181 it->first->OnLogMessage(str);
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000182 }
183 }
184 uint32 delay = TimeSince(before);
185 if (delay >= warn_slow_logs_delay_) {
186 LogMessage slow_log_warning =
187 rtc::LogMessage(__FILE__, __LINE__, LS_WARNING);
188 // If our warning is slow, we don't want to warn about it, because
189 // that would lead to inifinite recursion. So, give a really big
190 // number for the delay threshold.
191 slow_log_warning.warn_slow_logs_delay_ = UINT_MAX;
192 slow_log_warning.stream() << "Slow log: took " << delay << "ms to write "
193 << str.size() << " bytes.";
194 }
195}
196
197uint32 LogMessage::LogStartTime() {
198 static const uint32 g_start = Time();
199 return g_start;
200}
201
202uint32 LogMessage::WallClockStartTime() {
203 static const uint32 g_start_wallclock = time(NULL);
204 return g_start_wallclock;
205}
206
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000207void LogMessage::LogThreads(bool on) {
208 thread_ = on;
209}
210
211void LogMessage::LogTimestamps(bool on) {
212 timestamp_ = on;
213}
214
Tommi0eefb4d2015-05-23 09:54:07 +0200215void LogMessage::LogToDebug(LoggingSeverity min_sev) {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000216 dbg_sev_ = min_sev;
217 UpdateMinLogSeverity();
218}
219
Tommi0eefb4d2015-05-23 09:54:07 +0200220void LogMessage::LogToStream(LogSink* stream, LoggingSeverity min_sev) {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000221 CritScope cs(&crit_);
222 // Discard and delete all previously installed streams
223 for (StreamList::iterator it = streams_.begin(); it != streams_.end(); ++it) {
224 delete it->first;
225 }
226 streams_.clear();
227 // Install the new stream, if specified
228 if (stream) {
229 AddLogToStream(stream, min_sev);
230 }
231}
232
Tommi0eefb4d2015-05-23 09:54:07 +0200233int LogMessage::GetLogToStream(LogSink* stream) {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000234 CritScope cs(&crit_);
Tommi0eefb4d2015-05-23 09:54:07 +0200235 LoggingSeverity sev = LS_NONE;
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000236 for (StreamList::iterator it = streams_.begin(); it != streams_.end(); ++it) {
237 if (!stream || stream == it->first) {
andresp@webrtc.orgff689be2015-02-12 11:54:26 +0000238 sev = std::min(sev, it->second);
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000239 }
240 }
241 return sev;
242}
243
Tommi0eefb4d2015-05-23 09:54:07 +0200244void LogMessage::AddLogToStream(LogSink* stream, LoggingSeverity min_sev) {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000245 CritScope cs(&crit_);
246 streams_.push_back(std::make_pair(stream, min_sev));
247 UpdateMinLogSeverity();
248}
249
Tommi0eefb4d2015-05-23 09:54:07 +0200250void LogMessage::RemoveLogToStream(LogSink* stream) {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000251 CritScope cs(&crit_);
252 for (StreamList::iterator it = streams_.begin(); it != streams_.end(); ++it) {
253 if (stream == it->first) {
254 streams_.erase(it);
255 break;
256 }
257 }
258 UpdateMinLogSeverity();
259}
260
Tommi0eefb4d2015-05-23 09:54:07 +0200261void LogMessage::ConfigureLogging(const char* params) {
262 LoggingSeverity current_level = LS_VERBOSE;
263 LoggingSeverity debug_level = GetLogToDebug();
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000264
265 std::vector<std::string> tokens;
266 tokenize(params, ' ', &tokens);
267
Tommi0eefb4d2015-05-23 09:54:07 +0200268 for (const std::string& token : tokens) {
269 if (token.empty())
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000270 continue;
271
272 // Logging features
Tommi0eefb4d2015-05-23 09:54:07 +0200273 if (token == "tstamp") {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000274 LogTimestamps();
Tommi0eefb4d2015-05-23 09:54:07 +0200275 } else if (token == "thread") {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000276 LogThreads();
277
278 // Logging levels
Tommi0eefb4d2015-05-23 09:54:07 +0200279 } else if (token == "sensitive") {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000280 current_level = LS_SENSITIVE;
Tommi0eefb4d2015-05-23 09:54:07 +0200281 } else if (token == "verbose") {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000282 current_level = LS_VERBOSE;
Tommi0eefb4d2015-05-23 09:54:07 +0200283 } else if (token == "info") {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000284 current_level = LS_INFO;
Tommi0eefb4d2015-05-23 09:54:07 +0200285 } else if (token == "warning") {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000286 current_level = LS_WARNING;
Tommi0eefb4d2015-05-23 09:54:07 +0200287 } else if (token == "error") {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000288 current_level = LS_ERROR;
Tommi0eefb4d2015-05-23 09:54:07 +0200289 } else if (token == "none") {
290 current_level = LS_NONE;
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000291
292 // Logging targets
Tommi0eefb4d2015-05-23 09:54:07 +0200293 } else if (token == "debug") {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000294 debug_level = current_level;
295 }
296 }
297
298#if defined(WEBRTC_WIN)
Tommi0eefb4d2015-05-23 09:54:07 +0200299 if ((LS_NONE != debug_level) && !::IsDebuggerPresent()) {
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000300 // First, attempt to attach to our parent's console... so if you invoke
301 // from the command line, we'll see the output there. Otherwise, create
302 // our own console window.
303 // Note: These methods fail if a console already exists, which is fine.
304 bool success = false;
305 typedef BOOL (WINAPI* PFN_AttachConsole)(DWORD);
306 if (HINSTANCE kernel32 = ::LoadLibrary(L"kernel32.dll")) {
307 // AttachConsole is defined on WinXP+.
308 if (PFN_AttachConsole attach_console = reinterpret_cast<PFN_AttachConsole>
309 (::GetProcAddress(kernel32, "AttachConsole"))) {
310 success = (FALSE != attach_console(ATTACH_PARENT_PROCESS));
311 }
312 ::FreeLibrary(kernel32);
313 }
314 if (!success) {
315 ::AllocConsole();
316 }
317 }
Tommi0eefb4d2015-05-23 09:54:07 +0200318#endif // WEBRTC_WIN
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000319
320 LogToDebug(debug_level);
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000321}
322
323void LogMessage::UpdateMinLogSeverity() {
Tommi0eefb4d2015-05-23 09:54:07 +0200324 LoggingSeverity min_sev = dbg_sev_;
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000325 for (StreamList::iterator it = streams_.begin(); it != streams_.end(); ++it) {
andresp@webrtc.orgff689be2015-02-12 11:54:26 +0000326 min_sev = std::min(dbg_sev_, it->second);
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000327 }
328 min_sev_ = min_sev;
329}
330
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000331void LogMessage::OutputToDebug(const std::string& str,
332 LoggingSeverity severity) {
333 bool log_to_stderr = true;
334#if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) && (!defined(DEBUG) || defined(NDEBUG))
335 // On the Mac, all stderr output goes to the Console log and causes clutter.
336 // So in opt builds, don't log to stderr unless the user specifically sets
337 // a preference to do so.
338 CFStringRef key = CFStringCreateWithCString(kCFAllocatorDefault,
339 "logToStdErr",
340 kCFStringEncodingUTF8);
341 CFStringRef domain = CFBundleGetIdentifier(CFBundleGetMainBundle());
342 if (key != NULL && domain != NULL) {
343 Boolean exists_and_is_valid;
344 Boolean should_log =
345 CFPreferencesGetAppBooleanValue(key, domain, &exists_and_is_valid);
346 // If the key doesn't exist or is invalid or is false, we will not log to
347 // stderr.
348 log_to_stderr = exists_and_is_valid && should_log;
349 }
350 if (key != NULL) {
351 CFRelease(key);
352 }
353#endif
354#if defined(WEBRTC_WIN)
355 // Always log to the debugger.
356 // Perhaps stderr should be controlled by a preference, as on Mac?
357 OutputDebugStringA(str.c_str());
358 if (log_to_stderr) {
359 // This handles dynamically allocated consoles, too.
360 if (HANDLE error_handle = ::GetStdHandle(STD_ERROR_HANDLE)) {
361 log_to_stderr = false;
362 DWORD written = 0;
363 ::WriteFile(error_handle, str.data(), static_cast<DWORD>(str.size()),
364 &written, 0);
365 }
366 }
Tommi0eefb4d2015-05-23 09:54:07 +0200367#endif // WEBRTC_WIN
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000368#if defined(WEBRTC_ANDROID)
369 // Android's logging facility uses severity to log messages but we
370 // need to map libjingle's severity levels to Android ones first.
371 // Also write to stderr which maybe available to executable started
372 // from the shell.
373 int prio;
374 switch (severity) {
375 case LS_SENSITIVE:
376 __android_log_write(ANDROID_LOG_INFO, kLibjingle, "SENSITIVE");
377 if (log_to_stderr) {
378 fprintf(stderr, "SENSITIVE");
379 fflush(stderr);
380 }
381 return;
382 case LS_VERBOSE:
383 prio = ANDROID_LOG_VERBOSE;
384 break;
385 case LS_INFO:
386 prio = ANDROID_LOG_INFO;
387 break;
388 case LS_WARNING:
389 prio = ANDROID_LOG_WARN;
390 break;
391 case LS_ERROR:
392 prio = ANDROID_LOG_ERROR;
393 break;
394 default:
395 prio = ANDROID_LOG_UNKNOWN;
396 }
397
398 int size = str.size();
399 int line = 0;
400 int idx = 0;
401 const int max_lines = size / kMaxLogLineSize + 1;
402 if (max_lines == 1) {
403 __android_log_print(prio, kLibjingle, "%.*s", size, str.c_str());
404 } else {
405 while (size > 0) {
406 const int len = std::min(size, kMaxLogLineSize);
407 // Use the size of the string in the format (str may have \0 in the
408 // middle).
409 __android_log_print(prio, kLibjingle, "[%d/%d] %.*s",
410 line + 1, max_lines,
411 len, str.c_str() + idx);
412 idx += len;
413 size -= len;
414 ++line;
415 }
416 }
417#endif // WEBRTC_ANDROID
418 if (log_to_stderr) {
419 fprintf(stderr, "%s", str.c_str());
420 fflush(stderr);
421 }
422}
423
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000424//////////////////////////////////////////////////////////////////////
425// Logging Helpers
426//////////////////////////////////////////////////////////////////////
427
428void LogMultiline(LoggingSeverity level, const char* label, bool input,
429 const void* data, size_t len, bool hex_mode,
430 LogMultilineState* state) {
431 if (!LOG_CHECK_LEVEL_V(level))
432 return;
433
434 const char * direction = (input ? " << " : " >> ");
435
436 // NULL data means to flush our count of unprintable characters.
437 if (!data) {
438 if (state && state->unprintable_count_[input]) {
439 LOG_V(level) << label << direction << "## "
440 << state->unprintable_count_[input]
441 << " consecutive unprintable ##";
442 state->unprintable_count_[input] = 0;
443 }
444 return;
445 }
446
447 // The ctype classification functions want unsigned chars.
448 const unsigned char* udata = static_cast<const unsigned char*>(data);
449
450 if (hex_mode) {
451 const size_t LINE_SIZE = 24;
452 char hex_line[LINE_SIZE * 9 / 4 + 2], asc_line[LINE_SIZE + 1];
453 while (len > 0) {
454 memset(asc_line, ' ', sizeof(asc_line));
455 memset(hex_line, ' ', sizeof(hex_line));
andresp@webrtc.orgff689be2015-02-12 11:54:26 +0000456 size_t line_len = std::min(len, LINE_SIZE);
henrike@webrtc.orgf0488722014-05-13 18:00:26 +0000457 for (size_t i = 0; i < line_len; ++i) {
458 unsigned char ch = udata[i];
459 asc_line[i] = isprint(ch) ? ch : '.';
460 hex_line[i*2 + i/4] = hex_encode(ch >> 4);
461 hex_line[i*2 + i/4 + 1] = hex_encode(ch & 0xf);
462 }
463 asc_line[sizeof(asc_line)-1] = 0;
464 hex_line[sizeof(hex_line)-1] = 0;
465 LOG_V(level) << label << direction
466 << asc_line << " " << hex_line << " ";
467 udata += line_len;
468 len -= line_len;
469 }
470 return;
471 }
472
473 size_t consecutive_unprintable = state ? state->unprintable_count_[input] : 0;
474
475 const unsigned char* end = udata + len;
476 while (udata < end) {
477 const unsigned char* line = udata;
478 const unsigned char* end_of_line = strchrn<unsigned char>(udata,
479 end - udata,
480 '\n');
481 if (!end_of_line) {
482 udata = end_of_line = end;
483 } else {
484 udata = end_of_line + 1;
485 }
486
487 bool is_printable = true;
488
489 // If we are in unprintable mode, we need to see a line of at least
490 // kMinPrintableLine characters before we'll switch back.
491 const ptrdiff_t kMinPrintableLine = 4;
492 if (consecutive_unprintable && ((end_of_line - line) < kMinPrintableLine)) {
493 is_printable = false;
494 } else {
495 // Determine if the line contains only whitespace and printable
496 // characters.
497 bool is_entirely_whitespace = true;
498 for (const unsigned char* pos = line; pos < end_of_line; ++pos) {
499 if (isspace(*pos))
500 continue;
501 is_entirely_whitespace = false;
502 if (!isprint(*pos)) {
503 is_printable = false;
504 break;
505 }
506 }
507 // Treat an empty line following unprintable data as unprintable.
508 if (consecutive_unprintable && is_entirely_whitespace) {
509 is_printable = false;
510 }
511 }
512 if (!is_printable) {
513 consecutive_unprintable += (udata - line);
514 continue;
515 }
516 // Print out the current line, but prefix with a count of prior unprintable
517 // characters.
518 if (consecutive_unprintable) {
519 LOG_V(level) << label << direction << "## " << consecutive_unprintable
520 << " consecutive unprintable ##";
521 consecutive_unprintable = 0;
522 }
523 // Strip off trailing whitespace.
524 while ((end_of_line > line) && isspace(*(end_of_line-1))) {
525 --end_of_line;
526 }
527 // Filter out any private data
528 std::string substr(reinterpret_cast<const char*>(line), end_of_line - line);
529 std::string::size_type pos_private = substr.find("Email");
530 if (pos_private == std::string::npos) {
531 pos_private = substr.find("Passwd");
532 }
533 if (pos_private == std::string::npos) {
534 LOG_V(level) << label << direction << substr;
535 } else {
536 LOG_V(level) << label << direction << "## omitted for privacy ##";
537 }
538 }
539
540 if (state) {
541 state->unprintable_count_[input] = consecutive_unprintable;
542 }
543}
544
545//////////////////////////////////////////////////////////////////////
546
547} // namespace rtc