Move UniqueTimestampCounter to video/

This helper class currently lives in `modules/video_coding`,
but it's only users are in `video/`. Thus, it makes sense to
move the class to `video/`.

Bug: webrtc:14116
Change-Id: I0d3f8961bc8f5fe80f3100dbbd309b206020e6d5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262963
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36973}
This commit is contained in:
Rasmus Brandt 2022-05-23 09:53:32 +02:00 committed by WebRTC LUCI CQ
parent fbfe6f08a4
commit fbf66ddddf
7 changed files with 19 additions and 11 deletions

View File

@ -268,8 +268,6 @@ rtc_library("video_coding") {
"rtp_vp9_ref_finder.h", "rtp_vp9_ref_finder.h",
"timestamp_map.cc", "timestamp_map.cc",
"timestamp_map.h", "timestamp_map.h",
"unique_timestamp_counter.cc",
"unique_timestamp_counter.h",
"video_codec_initializer.cc", "video_codec_initializer.cc",
"video_receiver2.cc", "video_receiver2.cc",
"video_receiver2.h", "video_receiver2.h",
@ -1176,7 +1174,6 @@ if (rtc_include_tests) {
"test/stream_generator.h", "test/stream_generator.h",
"timestamp_map_unittest.cc", "timestamp_map_unittest.cc",
"timing_unittest.cc", "timing_unittest.cc",
"unique_timestamp_counter_unittest.cc",
"utility/bandwidth_quality_scaler_unittest.cc", "utility/bandwidth_quality_scaler_unittest.cc",
"utility/decoded_frames_history_unittest.cc", "utility/decoded_frames_history_unittest.cc",
"utility/frame_dropper_unittest.cc", "utility/frame_dropper_unittest.cc",

View File

@ -57,6 +57,7 @@ rtc_library("video") {
":frame_cadence_adapter", ":frame_cadence_adapter",
":frame_decode_scheduler", ":frame_decode_scheduler",
":frame_dumping_decoder", ":frame_dumping_decoder",
":unique_timestamp_counter",
":video_receive_stream_timeout_tracker", ":video_receive_stream_timeout_tracker",
":video_stream_encoder_impl", ":video_stream_encoder_impl",
"../api:array_view", "../api:array_view",
@ -179,6 +180,7 @@ rtc_source_set("video_legacy") {
] ]
deps = [ deps = [
":frame_dumping_decoder", ":frame_dumping_decoder",
":unique_timestamp_counter",
":video", ":video",
"../api:array_view", "../api:array_view",
"../api:field_trials_view", "../api:field_trials_view",
@ -527,6 +529,13 @@ rtc_library("video_stream_encoder_impl") {
] ]
} }
rtc_library("unique_timestamp_counter") {
sources = [
"unique_timestamp_counter.cc",
"unique_timestamp_counter.h",
]
}
if (rtc_include_tests) { if (rtc_include_tests) {
rtc_library("video_mocks") { rtc_library("video_mocks") {
testonly = true testonly = true
@ -828,6 +837,7 @@ if (rtc_include_tests) {
"stats_counter_unittest.cc", "stats_counter_unittest.cc",
"stream_synchronization_unittest.cc", "stream_synchronization_unittest.cc",
"task_queue_frame_decode_scheduler_unittest.cc", "task_queue_frame_decode_scheduler_unittest.cc",
"unique_timestamp_counter_unittest.cc",
"video_receive_stream2_unittest.cc", "video_receive_stream2_unittest.cc",
"video_receive_stream_timeout_tracker_unittest.cc", "video_receive_stream_timeout_tracker_unittest.cc",
"video_send_stream_impl_unittest.cc", "video_send_stream_impl_unittest.cc",
@ -843,6 +853,7 @@ if (rtc_include_tests) {
":frame_decode_scheduler", ":frame_decode_scheduler",
":frame_decode_timing", ":frame_decode_timing",
":task_queue_frame_decode_scheduler", ":task_queue_frame_decode_scheduler",
":unique_timestamp_counter",
":video", ":video",
":video_mocks", ":video_mocks",
":video_receive_stream_timeout_tracker", ":video_receive_stream_timeout_tracker",

View File

@ -44,7 +44,6 @@
#include "modules/video_coding/loss_notification_controller.h" #include "modules/video_coding/loss_notification_controller.h"
#include "modules/video_coding/packet_buffer.h" #include "modules/video_coding/packet_buffer.h"
#include "modules/video_coding/rtp_frame_reference_finder.h" #include "modules/video_coding/rtp_frame_reference_finder.h"
#include "modules/video_coding/unique_timestamp_counter.h"
#include "rtc_base/experiments/field_trial_parser.h" #include "rtc_base/experiments/field_trial_parser.h"
#include "rtc_base/numerics/sequence_number_util.h" #include "rtc_base/numerics/sequence_number_util.h"
#include "rtc_base/synchronization/mutex.h" #include "rtc_base/synchronization/mutex.h"
@ -52,6 +51,7 @@
#include "rtc_base/thread_annotations.h" #include "rtc_base/thread_annotations.h"
#include "video/buffered_frame_decryptor.h" #include "video/buffered_frame_decryptor.h"
#include "video/rtp_video_stream_receiver_frame_transformer_delegate.h" #include "video/rtp_video_stream_receiver_frame_transformer_delegate.h"
#include "video/unique_timestamp_counter.h"
namespace webrtc { namespace webrtc {

View File

@ -42,13 +42,13 @@
#include "modules/video_coding/nack_requester.h" #include "modules/video_coding/nack_requester.h"
#include "modules/video_coding/packet_buffer.h" #include "modules/video_coding/packet_buffer.h"
#include "modules/video_coding/rtp_frame_reference_finder.h" #include "modules/video_coding/rtp_frame_reference_finder.h"
#include "modules/video_coding/unique_timestamp_counter.h"
#include "rtc_base/experiments/field_trial_parser.h" #include "rtc_base/experiments/field_trial_parser.h"
#include "rtc_base/numerics/sequence_number_util.h" #include "rtc_base/numerics/sequence_number_util.h"
#include "rtc_base/system/no_unique_address.h" #include "rtc_base/system/no_unique_address.h"
#include "rtc_base/thread_annotations.h" #include "rtc_base/thread_annotations.h"
#include "video/buffered_frame_decryptor.h" #include "video/buffered_frame_decryptor.h"
#include "video/rtp_video_stream_receiver_frame_transformer_delegate.h" #include "video/rtp_video_stream_receiver_frame_transformer_delegate.h"
#include "video/unique_timestamp_counter.h"
namespace webrtc { namespace webrtc {

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "modules/video_coding/unique_timestamp_counter.h" #include "video/unique_timestamp_counter.h"
#include <cstdint> #include <cstdint>
#include <memory> #include <memory>

View File

@ -7,8 +7,8 @@
* in the file PATENTS. All contributing project authors may * in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef MODULES_VIDEO_CODING_UNIQUE_TIMESTAMP_COUNTER_H_ #ifndef VIDEO_UNIQUE_TIMESTAMP_COUNTER_H_
#define MODULES_VIDEO_CODING_UNIQUE_TIMESTAMP_COUNTER_H_ #define VIDEO_UNIQUE_TIMESTAMP_COUNTER_H_
#include <cstdint> #include <cstdint>
#include <memory> #include <memory>
@ -16,7 +16,7 @@
namespace webrtc { namespace webrtc {
// Counts number of uniquly seen frames (aka pictures, aka temporal units) // Counts number of uniquely seen frames (aka pictures, aka temporal units)
// identified by their rtp timestamp. // identified by their rtp timestamp.
class UniqueTimestampCounter { class UniqueTimestampCounter {
public: public:
@ -41,4 +41,4 @@ class UniqueTimestampCounter {
} // namespace webrtc } // namespace webrtc
#endif // MODULES_VIDEO_CODING_UNIQUE_TIMESTAMP_COUNTER_H_ #endif // VIDEO_UNIQUE_TIMESTAMP_COUNTER_H_

View File

@ -7,7 +7,7 @@
* in the file PATENTS. All contributing project authors may * in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "modules/video_coding/unique_timestamp_counter.h" #include "video/unique_timestamp_counter.h"
#include "test/gtest.h" #include "test/gtest.h"