Move FrameInstrumentation*Data structs to common_video
This enables usage in, e.g., `modules/rtp_rtcp`. R=sprang@webrtc.org Bug: webrtc:358039777 Change-Id: I0f8aafb75938d07f338bbf7acc4ff7c15a8b0baa Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361285 Commit-Queue: Fanny Linderborg <linderborg@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42920}
This commit is contained in:
parent
a82eb4e2a5
commit
5eb8588a65
@ -8,6 +8,10 @@
|
|||||||
|
|
||||||
import("../webrtc.gni")
|
import("../webrtc.gni")
|
||||||
|
|
||||||
|
rtc_library("frame_instrumentation_data") {
|
||||||
|
sources = [ "frame_instrumentation_data.h" ]
|
||||||
|
}
|
||||||
|
|
||||||
rtc_library("common_video") {
|
rtc_library("common_video") {
|
||||||
visibility = [ "*" ]
|
visibility = [ "*" ]
|
||||||
|
|
||||||
@ -56,6 +60,7 @@ rtc_library("common_video") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
|
":frame_instrumentation_data",
|
||||||
"../api:array_view",
|
"../api:array_view",
|
||||||
"../api:make_ref_counted",
|
"../api:make_ref_counted",
|
||||||
"../api:scoped_refptr",
|
"../api:scoped_refptr",
|
||||||
|
|||||||
35
common_video/frame_instrumentation_data.h
Normal file
35
common_video/frame_instrumentation_data.h
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2024 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 COMMON_VIDEO_FRAME_INSTRUMENTATION_DATA_H_
|
||||||
|
#define COMMON_VIDEO_FRAME_INSTRUMENTATION_DATA_H_
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
namespace webrtc {
|
||||||
|
|
||||||
|
// TODO: b/358039777 - Error handling: negative values etc.
|
||||||
|
struct FrameInstrumentationSyncData {
|
||||||
|
int sequence_index;
|
||||||
|
bool is_key_frame;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct FrameInstrumentationData {
|
||||||
|
int sequence_index;
|
||||||
|
bool is_key_frame;
|
||||||
|
double std_dev;
|
||||||
|
int luma_error_threshold;
|
||||||
|
int chroma_error_threshold;
|
||||||
|
std::vector<double> sample_values;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace webrtc
|
||||||
|
|
||||||
|
#endif // COMMON_VIDEO_FRAME_INSTRUMENTATION_DATA_H_
|
||||||
@ -21,6 +21,7 @@ rtc_library("frame_instrumentation_generator") {
|
|||||||
"../../api/video:video_frame",
|
"../../api/video:video_frame",
|
||||||
"../../api/video:video_frame_type",
|
"../../api/video:video_frame_type",
|
||||||
"../../api/video_codecs:video_codecs_api",
|
"../../api/video_codecs:video_codecs_api",
|
||||||
|
"../../common_video:frame_instrumentation_data",
|
||||||
"../../modules:module_api_public",
|
"../../modules:module_api_public",
|
||||||
"../../modules/video_coding:video_coding_utility",
|
"../../modules/video_coding:video_coding_utility",
|
||||||
"../../rtc_base:logging",
|
"../../rtc_base:logging",
|
||||||
@ -73,6 +74,7 @@ if (rtc_include_tests) {
|
|||||||
"../../api/video:encoded_image",
|
"../../api/video:encoded_image",
|
||||||
"../../api/video:video_frame",
|
"../../api/video:video_frame",
|
||||||
"../../api/video:video_frame_type",
|
"../../api/video:video_frame_type",
|
||||||
|
"../../common_video:frame_instrumentation_data",
|
||||||
"../../test:test_support",
|
"../../test:test_support",
|
||||||
"//third_party/abseil-cpp/absl/types:variant",
|
"//third_party/abseil-cpp/absl/types:variant",
|
||||||
]
|
]
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
#include "api/video/video_frame_buffer.h"
|
#include "api/video/video_frame_buffer.h"
|
||||||
#include "api/video/video_frame_type.h"
|
#include "api/video/video_frame_type.h"
|
||||||
#include "api/video_codecs/video_codec.h"
|
#include "api/video_codecs/video_codec.h"
|
||||||
|
#include "common_video/frame_instrumentation_data.h"
|
||||||
#include "modules/include/module_common_types_public.h"
|
#include "modules/include/module_common_types_public.h"
|
||||||
#include "modules/video_coding/utility/qp_parser.h"
|
#include "modules/video_coding/utility/qp_parser.h"
|
||||||
#include "rtc_base/logging.h"
|
#include "rtc_base/logging.h"
|
||||||
|
|||||||
@ -15,31 +15,16 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include "absl/types/variant.h"
|
#include "absl/types/variant.h"
|
||||||
#include "api/video/encoded_image.h"
|
#include "api/video/encoded_image.h"
|
||||||
#include "api/video/video_codec_type.h"
|
#include "api/video/video_codec_type.h"
|
||||||
#include "api/video/video_frame.h"
|
#include "api/video/video_frame.h"
|
||||||
|
#include "common_video/frame_instrumentation_data.h"
|
||||||
#include "video/corruption_detection/halton_frame_sampler.h"
|
#include "video/corruption_detection/halton_frame_sampler.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
// TODO: b/358039777 - Error handling: negative values etc.
|
|
||||||
struct FrameInstrumentationSyncData {
|
|
||||||
int sequence_index;
|
|
||||||
bool is_key_frame;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct FrameInstrumentationData {
|
|
||||||
int sequence_index;
|
|
||||||
bool is_key_frame;
|
|
||||||
double std_dev;
|
|
||||||
int luma_error_threshold;
|
|
||||||
int chroma_error_threshold;
|
|
||||||
std::vector<double> sample_values;
|
|
||||||
};
|
|
||||||
|
|
||||||
class FrameInstrumentationGenerator {
|
class FrameInstrumentationGenerator {
|
||||||
public:
|
public:
|
||||||
FrameInstrumentationGenerator() = delete;
|
FrameInstrumentationGenerator() = delete;
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
#include "api/video/video_codec_type.h"
|
#include "api/video/video_codec_type.h"
|
||||||
#include "api/video/video_frame.h"
|
#include "api/video/video_frame.h"
|
||||||
#include "api/video/video_frame_type.h"
|
#include "api/video/video_frame_type.h"
|
||||||
|
#include "common_video/frame_instrumentation_data.h"
|
||||||
#include "test/gtest.h"
|
#include "test/gtest.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user