blob: 10df8b47eb1e946f3d344ab49dbf203262effb15 [file] [log] [blame]
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "init_webrtc.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/native_library.h"
#include "base/path_service.h"
#include "base/trace_event/trace_event.h"
#include "third_party/webrtc/rtc_base/event_tracer.h"
#include "third_party/webrtc/system_wrappers/include/cpu_info.h"
#include "third_party/webrtc_overrides/rtc_base/logging.h"
const unsigned char* GetCategoryGroupEnabled(const char* category_group) {
void AddTraceEvent(char phase,
const unsigned char* category_group_enabled,
const char* name,
unsigned long long id,
int num_args,
const char** arg_names,
const unsigned char* arg_types,
const unsigned long long* arg_values,
unsigned char flags) {
phase, category_group_enabled, name, trace_event_internal::kGlobalScope,
id, num_args, arg_names, arg_types, arg_values, NULL, flags);
bool InitializeWebRtcModule() {
// Workaround for
// On Linux, we can't fetch the number of cores after the sandbox has been
// initialized, so we call DetectNumberOfCores() here, to cache the value.
webrtc::SetupEventTracer(&GetCategoryGroupEnabled, &AddTraceEvent);
return true;