C-style bindings around RTC event log analyzer.
This is currently a stub. The analysis will be added in a followup CL. No-Try: True Bug: None Change-Id: Ief381d0c30ec29a0ef170523d31f1f902d0e6b09 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324620 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Björn Terelius <terelius@webrtc.org> Commit-Queue: Björn Terelius <terelius@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40989}
This commit is contained in:
parent
8c16f1f49d
commit
ad69832b7f
@ -423,6 +423,15 @@ if (!build_with_chromium) {
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
}
|
||||
|
||||
rtc_library("event_log_visualizer_bindings") {
|
||||
visibility = [ "*" ]
|
||||
sources = [
|
||||
"rtc_event_log_visualizer/analyzer_bindings.cc",
|
||||
"rtc_event_log_visualizer/analyzer_bindings.h",
|
||||
]
|
||||
deps = [ ":event_log_visualizer_utils" ]
|
||||
}
|
||||
}
|
||||
|
||||
rtc_executable("video_encoder") {
|
||||
|
||||
27
rtc_tools/rtc_event_log_visualizer/analyzer_bindings.cc
Normal file
27
rtc_tools/rtc_event_log_visualizer/analyzer_bindings.cc
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2023 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "rtc_tools/rtc_event_log_visualizer/analyzer_bindings.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
|
||||
void analyze_rtc_event_log(const char* log,
|
||||
size_t log_size,
|
||||
const char* selection,
|
||||
size_t selection_size,
|
||||
char* output,
|
||||
size_t* output_size) {
|
||||
size_t size = std::min(log_size, *output_size);
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
output[i] = log[i];
|
||||
}
|
||||
*output_size = size;
|
||||
}
|
||||
23
rtc_tools/rtc_event_log_visualizer/analyzer_bindings.h
Normal file
23
rtc_tools/rtc_event_log_visualizer/analyzer_bindings.h
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) 2023 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_ANALYZER_BINDINGS_H_
|
||||
#define RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_ANALYZER_BINDINGS_H_
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
void analyze_rtc_event_log(const char* log,
|
||||
size_t log_size,
|
||||
const char* selection,
|
||||
size_t selection_size,
|
||||
char* output,
|
||||
size_t* output_size);
|
||||
|
||||
#endif // RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_ANALYZER_BINDINGS_H_
|
||||
Loading…
x
Reference in New Issue
Block a user