Move FrameCounts and FrameCountObserver to common_video/frame_counts.h
Bug: webrtc:7660 Change-Id: Ic42227508e0e26b5443de0ef0e0722126cbbb8fd Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182501 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32005}
This commit is contained in:
@ -97,6 +97,7 @@ rtc_library("rtp_interfaces") {
|
|||||||
"../api/rtc_event_log",
|
"../api/rtc_event_log",
|
||||||
"../api/transport:bitrate_settings",
|
"../api/transport:bitrate_settings",
|
||||||
"../api/units:timestamp",
|
"../api/units:timestamp",
|
||||||
|
"../common_video:frame_counts",
|
||||||
"../modules/rtp_rtcp:rtp_rtcp_format",
|
"../modules/rtp_rtcp:rtp_rtcp_format",
|
||||||
"../rtc_base:checks",
|
"../rtc_base:checks",
|
||||||
"../rtc_base:rtc_base_approved",
|
"../rtc_base:rtc_base_approved",
|
||||||
@ -316,6 +317,7 @@ rtc_library("video_stream_api") {
|
|||||||
"../api/video:video_stream_encoder",
|
"../api/video:video_stream_encoder",
|
||||||
"../api/video_codecs:video_codecs_api",
|
"../api/video_codecs:video_codecs_api",
|
||||||
"../common_video",
|
"../common_video",
|
||||||
|
"../common_video:frame_counts",
|
||||||
"../modules/rtp_rtcp:rtp_rtcp_format",
|
"../modules/rtp_rtcp:rtp_rtcp_format",
|
||||||
"../rtc_base:checks",
|
"../rtc_base:checks",
|
||||||
"../rtc_base:rtc_base_approved",
|
"../rtc_base:rtc_base_approved",
|
||||||
|
|||||||
@ -17,11 +17,12 @@ include_rules = [
|
|||||||
|
|
||||||
specific_include_rules = {
|
specific_include_rules = {
|
||||||
"video_receive_stream\.h": [
|
"video_receive_stream\.h": [
|
||||||
"+common_video/include",
|
"+common_video/frame_counts.h",
|
||||||
"+media/base",
|
|
||||||
],
|
],
|
||||||
"video_send_stream\.h": [
|
"video_send_stream\.h": [
|
||||||
"+common_video/include",
|
"+common_video",
|
||||||
"+media/base",
|
|
||||||
],
|
],
|
||||||
|
"rtp_transport_controller_send_interface\.h": [
|
||||||
|
"+common_video/frame_counts.h",
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,7 @@
|
|||||||
#include "api/transport/bitrate_settings.h"
|
#include "api/transport/bitrate_settings.h"
|
||||||
#include "api/units/timestamp.h"
|
#include "api/units/timestamp.h"
|
||||||
#include "call/rtp_config.h"
|
#include "call/rtp_config.h"
|
||||||
|
#include "common_video/frame_counts.h"
|
||||||
#include "modules/rtp_rtcp/include/report_block_data.h"
|
#include "modules/rtp_rtcp/include/report_block_data.h"
|
||||||
#include "modules/rtp_rtcp/include/rtcp_statistics.h"
|
#include "modules/rtp_rtcp/include/rtcp_statistics.h"
|
||||||
#include "modules/rtp_rtcp/include/rtp_packet_sender.h"
|
#include "modules/rtp_rtcp/include/rtp_packet_sender.h"
|
||||||
|
|||||||
@ -32,6 +32,7 @@
|
|||||||
#include "api/video/video_timing.h"
|
#include "api/video/video_timing.h"
|
||||||
#include "api/video_codecs/sdp_video_format.h"
|
#include "api/video_codecs/sdp_video_format.h"
|
||||||
#include "call/rtp_config.h"
|
#include "call/rtp_config.h"
|
||||||
|
#include "common_video/frame_counts.h"
|
||||||
#include "modules/rtp_rtcp/include/rtcp_statistics.h"
|
#include "modules/rtp_rtcp/include/rtcp_statistics.h"
|
||||||
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
|
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
|
||||||
|
|
||||||
|
|||||||
@ -31,6 +31,7 @@
|
|||||||
#include "api/video/video_stream_encoder_settings.h"
|
#include "api/video/video_stream_encoder_settings.h"
|
||||||
#include "api/video_codecs/video_encoder_config.h"
|
#include "api/video_codecs/video_encoder_config.h"
|
||||||
#include "call/rtp_config.h"
|
#include "call/rtp_config.h"
|
||||||
|
#include "common_video/frame_counts.h"
|
||||||
#include "common_video/include/quality_limitation_reason.h"
|
#include "common_video/include/quality_limitation_reason.h"
|
||||||
#include "modules/rtp_rtcp/include/report_block_data.h"
|
#include "modules/rtp_rtcp/include/report_block_data.h"
|
||||||
#include "modules/rtp_rtcp/include/rtcp_statistics.h"
|
#include "modules/rtp_rtcp/include/rtcp_statistics.h"
|
||||||
|
|||||||
@ -11,26 +11,8 @@
|
|||||||
#ifndef COMMON_TYPES_H_
|
#ifndef COMMON_TYPES_H_
|
||||||
#define COMMON_TYPES_H_
|
#define COMMON_TYPES_H_
|
||||||
|
|
||||||
#include <stddef.h> // For size_t
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
struct FrameCounts {
|
|
||||||
FrameCounts() : key_frames(0), delta_frames(0) {}
|
|
||||||
int key_frames;
|
|
||||||
int delta_frames;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Callback, used to notify an observer whenever frame counts have been updated.
|
|
||||||
class FrameCountObserver {
|
|
||||||
public:
|
|
||||||
virtual ~FrameCountObserver() {}
|
|
||||||
virtual void FrameCountUpdated(const FrameCounts& frame_counts,
|
|
||||||
uint32_t ssrc) = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Minimum and maximum playout delay values from capture to render.
|
// Minimum and maximum playout delay values from capture to render.
|
||||||
// These are best effort values.
|
// These are best effort values.
|
||||||
//
|
//
|
||||||
|
|||||||
@ -65,6 +65,12 @@ rtc_library("common_video") {
|
|||||||
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rtc_source_set("frame_counts") {
|
||||||
|
visibility = [ "*" ]
|
||||||
|
|
||||||
|
sources = [ "frame_counts.h" ]
|
||||||
|
}
|
||||||
|
|
||||||
if (rtc_include_tests) {
|
if (rtc_include_tests) {
|
||||||
common_video_resources = [ "../resources/foreman_cif.yuv" ]
|
common_video_resources = [ "../resources/foreman_cif.yuv" ]
|
||||||
|
|
||||||
|
|||||||
32
common_video/frame_counts.h
Normal file
32
common_video/frame_counts.h
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2020 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_COUNTS_H_
|
||||||
|
#define COMMON_VIDEO_FRAME_COUNTS_H_
|
||||||
|
|
||||||
|
namespace webrtc {
|
||||||
|
|
||||||
|
struct FrameCounts {
|
||||||
|
FrameCounts() : key_frames(0), delta_frames(0) {}
|
||||||
|
int key_frames;
|
||||||
|
int delta_frames;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Callback, used to notify an observer whenever frame counts have been updated.
|
||||||
|
class FrameCountObserver {
|
||||||
|
public:
|
||||||
|
virtual ~FrameCountObserver() {}
|
||||||
|
virtual void FrameCountUpdated(const FrameCounts& frame_counts,
|
||||||
|
uint32_t ssrc) = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace webrtc
|
||||||
|
|
||||||
|
#endif // COMMON_VIDEO_FRAME_COUNTS_H_
|
||||||
Reference in New Issue
Block a user