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}
diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn
index 3e74ca9..63fa98e 100644
--- a/modules/video_coding/BUILD.gn
+++ b/modules/video_coding/BUILD.gn
@@ -268,8 +268,6 @@
"rtp_vp9_ref_finder.h",
"timestamp_map.cc",
"timestamp_map.h",
- "unique_timestamp_counter.cc",
- "unique_timestamp_counter.h",
"video_codec_initializer.cc",
"video_receiver2.cc",
"video_receiver2.h",
@@ -1176,7 +1174,6 @@
"test/stream_generator.h",
"timestamp_map_unittest.cc",
"timing_unittest.cc",
- "unique_timestamp_counter_unittest.cc",
"utility/bandwidth_quality_scaler_unittest.cc",
"utility/decoded_frames_history_unittest.cc",
"utility/frame_dropper_unittest.cc",
diff --git a/video/BUILD.gn b/video/BUILD.gn
index 5595072..f1adefa 100644
--- a/video/BUILD.gn
+++ b/video/BUILD.gn
@@ -57,6 +57,7 @@
":frame_cadence_adapter",
":frame_decode_scheduler",
":frame_dumping_decoder",
+ ":unique_timestamp_counter",
":video_receive_stream_timeout_tracker",
":video_stream_encoder_impl",
"../api:array_view",
@@ -179,6 +180,7 @@
]
deps = [
":frame_dumping_decoder",
+ ":unique_timestamp_counter",
":video",
"../api:array_view",
"../api:field_trials_view",
@@ -527,6 +529,13 @@
]
}
+rtc_library("unique_timestamp_counter") {
+ sources = [
+ "unique_timestamp_counter.cc",
+ "unique_timestamp_counter.h",
+ ]
+}
+
if (rtc_include_tests) {
rtc_library("video_mocks") {
testonly = true
@@ -828,6 +837,7 @@
"stats_counter_unittest.cc",
"stream_synchronization_unittest.cc",
"task_queue_frame_decode_scheduler_unittest.cc",
+ "unique_timestamp_counter_unittest.cc",
"video_receive_stream2_unittest.cc",
"video_receive_stream_timeout_tracker_unittest.cc",
"video_send_stream_impl_unittest.cc",
@@ -843,6 +853,7 @@
":frame_decode_scheduler",
":frame_decode_timing",
":task_queue_frame_decode_scheduler",
+ ":unique_timestamp_counter",
":video",
":video_mocks",
":video_receive_stream_timeout_tracker",
diff --git a/video/rtp_video_stream_receiver.h b/video/rtp_video_stream_receiver.h
index 3b6d1ca..4578857 100644
--- a/video/rtp_video_stream_receiver.h
+++ b/video/rtp_video_stream_receiver.h
@@ -44,7 +44,6 @@
#include "modules/video_coding/loss_notification_controller.h"
#include "modules/video_coding/packet_buffer.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/numerics/sequence_number_util.h"
#include "rtc_base/synchronization/mutex.h"
@@ -52,6 +51,7 @@
#include "rtc_base/thread_annotations.h"
#include "video/buffered_frame_decryptor.h"
#include "video/rtp_video_stream_receiver_frame_transformer_delegate.h"
+#include "video/unique_timestamp_counter.h"
namespace webrtc {
diff --git a/video/rtp_video_stream_receiver2.h b/video/rtp_video_stream_receiver2.h
index e293873..cb43b2c 100644
--- a/video/rtp_video_stream_receiver2.h
+++ b/video/rtp_video_stream_receiver2.h
@@ -42,13 +42,13 @@
#include "modules/video_coding/nack_requester.h"
#include "modules/video_coding/packet_buffer.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/numerics/sequence_number_util.h"
#include "rtc_base/system/no_unique_address.h"
#include "rtc_base/thread_annotations.h"
#include "video/buffered_frame_decryptor.h"
#include "video/rtp_video_stream_receiver_frame_transformer_delegate.h"
+#include "video/unique_timestamp_counter.h"
namespace webrtc {
diff --git a/modules/video_coding/unique_timestamp_counter.cc b/video/unique_timestamp_counter.cc
similarity index 94%
rename from modules/video_coding/unique_timestamp_counter.cc
rename to video/unique_timestamp_counter.cc
index 8157994..14cc039 100644
--- a/modules/video_coding/unique_timestamp_counter.cc
+++ b/video/unique_timestamp_counter.cc
@@ -8,7 +8,7 @@
* 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 <memory>
diff --git a/modules/video_coding/unique_timestamp_counter.h b/video/unique_timestamp_counter.h
similarity index 83%
rename from modules/video_coding/unique_timestamp_counter.h
rename to video/unique_timestamp_counter.h
index 23540c6..5dfb758bc 100644
--- a/modules/video_coding/unique_timestamp_counter.h
+++ b/video/unique_timestamp_counter.h
@@ -7,8 +7,8 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
-#ifndef MODULES_VIDEO_CODING_UNIQUE_TIMESTAMP_COUNTER_H_
-#define MODULES_VIDEO_CODING_UNIQUE_TIMESTAMP_COUNTER_H_
+#ifndef VIDEO_UNIQUE_TIMESTAMP_COUNTER_H_
+#define VIDEO_UNIQUE_TIMESTAMP_COUNTER_H_
#include <cstdint>
#include <memory>
@@ -16,7 +16,7 @@
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.
class UniqueTimestampCounter {
public:
@@ -41,4 +41,4 @@
} // namespace webrtc
-#endif // MODULES_VIDEO_CODING_UNIQUE_TIMESTAMP_COUNTER_H_
+#endif // VIDEO_UNIQUE_TIMESTAMP_COUNTER_H_
diff --git a/modules/video_coding/unique_timestamp_counter_unittest.cc b/video/unique_timestamp_counter_unittest.cc
similarity index 95%
rename from modules/video_coding/unique_timestamp_counter_unittest.cc
rename to video/unique_timestamp_counter_unittest.cc
index 16cf237..b703e84 100644
--- a/modules/video_coding/unique_timestamp_counter_unittest.cc
+++ b/video/unique_timestamp_counter_unittest.cc
@@ -7,7 +7,7 @@
* in the file PATENTS. All contributing project authors may
* 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"