From d381eede92d1f417385bda908841c9868d9d0ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Wed, 2 Sep 2020 15:34:40 +0200 Subject: [PATCH] Rename PlayoutDelay --> VideoPlayoutDelay, move to api/video/video_timing.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can then finally delete the top-level common_types.h, and the corresponding build target webrtc_common. Bug: webrtc:7660 Change-Id: I1c1096541477586d90774c7a3405b9d36edec14a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/182800 Commit-Queue: Niels Moller Reviewed-by: Sebastian Jansson Reviewed-by: Erik Språng Reviewed-by: Karl Wiberg Cr-Commit-Position: refs/heads/master@{#32044} --- .gn | 1 - BUILD.gn | 10 ----- api/BUILD.gn | 1 - api/rtp_headers.h | 3 +- api/video/BUILD.gn | 1 - api/video/encoded_image.h | 3 +- api/video/video_timing.h | 24 ++++++++++ common_types.h | 44 ------------------- .../congestion_controller/goog_cc/BUILD.gn | 1 - modules/rtp_rtcp/BUILD.gn | 1 - .../rtp_rtcp/source/rtp_header_extensions.cc | 4 +- .../rtp_rtcp/source/rtp_header_extensions.h | 8 ++-- .../rtp_rtcp/source/rtp_packet_unittest.cc | 4 +- modules/rtp_rtcp/source/rtp_sender_video.cc | 4 +- modules/rtp_rtcp/source/rtp_sender_video.h | 2 +- .../source/rtp_sender_video_unittest.cc | 6 +-- modules/rtp_rtcp/source/rtp_video_header.h | 3 +- modules/video_coding/encoded_frame.h | 2 +- .../video_coding/frame_buffer2_unittest.cc | 2 +- test/fuzzers/rtp_packet_fuzzer.cc | 2 +- video/rtp_video_stream_receiver2_unittest.cc | 6 +-- video/rtp_video_stream_receiver_unittest.cc | 6 +-- video/video_receive_stream.cc | 2 +- video/video_receive_stream2.cc | 2 +- video/video_receive_stream2_unittest.cc | 6 +-- video/video_receive_stream_unittest.cc | 6 +-- 26 files changed, 58 insertions(+), 96 deletions(-) delete mode 100644 common_types.h diff --git a/.gn b/.gn index 807c0a1685..a2e2a90425 100644 --- a/.gn +++ b/.gn @@ -21,7 +21,6 @@ secondary_source = "//build/secondary/" # their includes checked for proper dependencies when you run either # "gn check" or "gn gen --check". check_targets = [ - ":webrtc_common", "//api/*", "//audio/*", "//backup/*", diff --git a/BUILD.gn b/BUILD.gn index 75141df66d..d6a19e67c9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -440,7 +440,6 @@ if (!build_with_chromium) { defines = [] deps = [ - ":webrtc_common", "api:create_peerconnection_factory", "api:libjingle_peerconnection_api", "api:rtc_error", @@ -515,15 +514,6 @@ if (!build_with_chromium) { } } -rtc_source_set("webrtc_common") { - # Client code SHOULD NOT USE THIS TARGET, but for now it needs to be public - # because there exists client code that uses it. - # TODO(bugs.webrtc.org/9808): Move to private visibility as soon as that - # client code gets updated. - visibility = [ "*" ] - sources = [ "common_types.h" ] -} - if (use_libfuzzer || use_afl) { # This target is only here for gn to discover fuzzer build targets under # webrtc/test/fuzzers/. diff --git a/api/BUILD.gn b/api/BUILD.gn index 50a9c5a242..c257a7d6e0 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -68,7 +68,6 @@ rtc_library("rtp_headers") { ] deps = [ ":array_view", - "..:webrtc_common", "units:timestamp", "video:video_rtp_headers", ] diff --git a/api/rtp_headers.h b/api/rtp_headers.h index 454149ca6e..b9a97c885d 100644 --- a/api/rtp_headers.h +++ b/api/rtp_headers.h @@ -23,7 +23,6 @@ #include "api/video/video_content_type.h" #include "api/video/video_rotation.h" #include "api/video/video_timing.h" -#include "common_types.h" // NOLINT (build/include) namespace webrtc { @@ -142,7 +141,7 @@ struct RTPHeaderExtension { bool has_video_timing; VideoSendTiming video_timing; - PlayoutDelay playout_delay = {-1, -1}; + VideoPlayoutDelay playout_delay; // For identification of a stream when ssrc is not signaled. See // https://tools.ietf.org/html/draft-ietf-avtext-rid-09 diff --git a/api/video/BUILD.gn b/api/video/BUILD.gn index e864e036f4..b85c2b6232 100644 --- a/api/video/BUILD.gn +++ b/api/video/BUILD.gn @@ -135,7 +135,6 @@ rtc_library("encoded_image") { "..:refcountedbase", "..:rtp_packet_info", "..:scoped_refptr", - "../..:webrtc_common", "../../rtc_base:checks", "../../rtc_base:deprecation", "../../rtc_base:rtc_base_approved", diff --git a/api/video/encoded_image.h b/api/video/encoded_image.h index 35c2584dfa..cb0f2ebc45 100644 --- a/api/video/encoded_image.h +++ b/api/video/encoded_image.h @@ -25,7 +25,6 @@ #include "api/video/video_frame_type.h" #include "api/video/video_rotation.h" #include "api/video/video_timing.h" -#include "common_types.h" // NOLINT(build/include_directory) #include "rtc_base/checks.h" #include "rtc_base/deprecation.h" #include "rtc_base/ref_count.h" @@ -183,7 +182,7 @@ class RTC_EXPORT EncodedImage { // When an application indicates non-zero values here, it is taken as an // indication that all future frames will be constrained with those limits // until the application indicates a change again. - PlayoutDelay playout_delay_ = {-1, -1}; + VideoPlayoutDelay playout_delay_; struct Timing { uint8_t flags = VideoSendTiming::kInvalid; diff --git a/api/video/video_timing.h b/api/video/video_timing.h index 4cc75dd0b0..fbd92254a0 100644 --- a/api/video/video_timing.h +++ b/api/video/video_timing.h @@ -100,6 +100,30 @@ struct TimingFrameInfo { uint8_t flags; // Flags indicating validity and/or why tracing was triggered. }; +// Minimum and maximum playout delay values from capture to render. +// These are best effort values. +// +// A value < 0 indicates no change from previous valid value. +// +// min = max = 0 indicates that the receiver should try and render +// frame as soon as possible. +// +// min = x, max = y indicates that the receiver is free to adapt +// in the range (x, y) based on network jitter. +struct VideoPlayoutDelay { + VideoPlayoutDelay() = default; + VideoPlayoutDelay(int min_ms, int max_ms) : min_ms(min_ms), max_ms(max_ms) {} + int min_ms = -1; + int max_ms = -1; + + bool operator==(const VideoPlayoutDelay& rhs) const { + return min_ms == rhs.min_ms && max_ms == rhs.max_ms; + } +}; + +// TODO(bugs.webrtc.org/7660): Old name, delete after downstream use is updated. +using PlayoutDelay = VideoPlayoutDelay; + } // namespace webrtc #endif // API_VIDEO_VIDEO_TIMING_H_ diff --git a/common_types.h b/common_types.h deleted file mode 100644 index 9221cde5a1..0000000000 --- a/common_types.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2012 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_TYPES_H_ -#define COMMON_TYPES_H_ - -namespace webrtc { - -// Minimum and maximum playout delay values from capture to render. -// These are best effort values. -// -// A value < 0 indicates no change from previous valid value. -// -// min = max = 0 indicates that the receiver should try and render -// frame as soon as possible. -// -// min = x, max = y indicates that the receiver is free to adapt -// in the range (x, y) based on network jitter. -// -// Note: Given that this gets embedded in a union, it is up-to the owner to -// initialize these values. -struct PlayoutDelay { - PlayoutDelay(int min_ms, int max_ms) : min_ms(min_ms), max_ms(max_ms) {} - int min_ms; - int max_ms; - - static PlayoutDelay Noop() { return PlayoutDelay(-1, -1); } - - bool IsNoop() const { return min_ms == -1 && max_ms == -1; } - bool operator==(const PlayoutDelay& rhs) const { - return min_ms == rhs.min_ms && max_ms == rhs.max_ms; - } -}; - -} // namespace webrtc - -#endif // COMMON_TYPES_H_ diff --git a/modules/congestion_controller/goog_cc/BUILD.gn b/modules/congestion_controller/goog_cc/BUILD.gn index 52daad2bce..9bee7b298f 100644 --- a/modules/congestion_controller/goog_cc/BUILD.gn +++ b/modules/congestion_controller/goog_cc/BUILD.gn @@ -31,7 +31,6 @@ rtc_library("goog_cc") { ":probe_controller", ":pushback_controller", "../..:module_api", - "../../..:webrtc_common", "../../../api:network_state_predictor_api", "../../../api/rtc_event_log", "../../../api/transport:field_trial_based_config", diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn index d137665214..4525d49a69 100644 --- a/modules/rtp_rtcp/BUILD.gn +++ b/modules/rtp_rtcp/BUILD.gn @@ -354,7 +354,6 @@ rtc_library("rtp_video_header") { "source/rtp_video_header.h", ] deps = [ - "../../:webrtc_common", "../../api/transport/rtp:dependency_descriptor", "../../api/video:video_frame", "../../api/video:video_frame_type", diff --git a/modules/rtp_rtcp/source/rtp_header_extensions.cc b/modules/rtp_rtcp/source/rtp_header_extensions.cc index 527874d785..b540e4b22e 100644 --- a/modules/rtp_rtcp/source/rtp_header_extensions.cc +++ b/modules/rtp_rtcp/source/rtp_header_extensions.cc @@ -371,7 +371,7 @@ constexpr uint8_t PlayoutDelayLimits::kValueSizeBytes; constexpr const char PlayoutDelayLimits::kUri[]; bool PlayoutDelayLimits::Parse(rtc::ArrayView data, - PlayoutDelay* playout_delay) { + VideoPlayoutDelay* playout_delay) { RTC_DCHECK(playout_delay); if (data.size() != 3) return false; @@ -386,7 +386,7 @@ bool PlayoutDelayLimits::Parse(rtc::ArrayView data, } bool PlayoutDelayLimits::Write(rtc::ArrayView data, - const PlayoutDelay& playout_delay) { + const VideoPlayoutDelay& playout_delay) { RTC_DCHECK_EQ(data.size(), 3); RTC_DCHECK_LE(0, playout_delay.min_ms); RTC_DCHECK_LE(playout_delay.min_ms, playout_delay.max_ms); diff --git a/modules/rtp_rtcp/source/rtp_header_extensions.h b/modules/rtp_rtcp/source/rtp_header_extensions.h index 8a81280f7b..1352611fb1 100644 --- a/modules/rtp_rtcp/source/rtp_header_extensions.h +++ b/modules/rtp_rtcp/source/rtp_header_extensions.h @@ -148,7 +148,7 @@ class VideoOrientation { class PlayoutDelayLimits { public: - using value_type = PlayoutDelay; + using value_type = VideoPlayoutDelay; static constexpr RTPExtensionType kId = kRtpExtensionPlayoutDelay; static constexpr uint8_t kValueSizeBytes = 3; static constexpr const char kUri[] = @@ -162,10 +162,10 @@ class PlayoutDelayLimits { static constexpr int kMaxMs = 0xfff * kGranularityMs; // 40950. static bool Parse(rtc::ArrayView data, - PlayoutDelay* playout_delay); - static size_t ValueSize(const PlayoutDelay&) { return kValueSizeBytes; } + VideoPlayoutDelay* playout_delay); + static size_t ValueSize(const VideoPlayoutDelay&) { return kValueSizeBytes; } static bool Write(rtc::ArrayView data, - const PlayoutDelay& playout_delay); + const VideoPlayoutDelay& playout_delay); }; class VideoContentTypeExtension { diff --git a/modules/rtp_rtcp/source/rtp_packet_unittest.cc b/modules/rtp_rtcp/source/rtp_packet_unittest.cc index 74736a2ab7..f7f21af41d 100644 --- a/modules/rtp_rtcp/source/rtp_packet_unittest.cc +++ b/modules/rtp_rtcp/source/rtp_packet_unittest.cc @@ -249,7 +249,7 @@ TEST(RtpPacketTest, CreateWithTwoByteHeaderExtensionFirst) { packet.SetTimestamp(kTimestamp); packet.SetSsrc(kSsrc); // Set extension that requires two-byte header. - PlayoutDelay playoutDelay = {30, 340}; + VideoPlayoutDelay playoutDelay = {30, 340}; ASSERT_TRUE(packet.SetExtension(playoutDelay)); packet.SetExtension(kTimeOffset); packet.SetExtension(kVoiceActive, kAudioLevel); @@ -273,7 +273,7 @@ TEST(RtpPacketTest, CreateWithTwoByteHeaderExtensionLast) { EXPECT_THAT(kPacketWithTOAndAL, ElementsAreArray(packet.data(), packet.size())); // Set extension that requires two-byte header. - PlayoutDelay playoutDelay = {30, 340}; + VideoPlayoutDelay playoutDelay = {30, 340}; ASSERT_TRUE(packet.SetExtension(playoutDelay)); EXPECT_THAT(kPacketWithTwoByteExtensionIdLast, ElementsAreArray(packet.data(), packet.size())); diff --git a/modules/rtp_rtcp/source/rtp_sender_video.cc b/modules/rtp_rtcp/source/rtp_sender_video.cc index 31002aa0df..b42986a3d6 100644 --- a/modules/rtp_rtcp/source/rtp_sender_video.cc +++ b/modules/rtp_rtcp/source/rtp_sender_video.cc @@ -111,7 +111,7 @@ const char* FrameTypeToString(VideoFrameType frame_type) { } #endif -bool IsNoopDelay(const PlayoutDelay& delay) { +bool IsNoopDelay(const VideoPlayoutDelay& delay) { return delay.min_ms == -1 && delay.max_ms == -1; } @@ -794,7 +794,7 @@ void RTPSenderVideo::MaybeUpdateCurrentPlayoutDelay( return; } - PlayoutDelay requested_delay = header.playout_delay; + VideoPlayoutDelay requested_delay = header.playout_delay; if (requested_delay.min_ms > PlayoutDelayLimits::kMaxMs || requested_delay.max_ms > PlayoutDelayLimits::kMaxMs) { diff --git a/modules/rtp_rtcp/source/rtp_sender_video.h b/modules/rtp_rtcp/source/rtp_sender_video.h index 4addb094dd..c621a8ea23 100644 --- a/modules/rtp_rtcp/source/rtp_sender_video.h +++ b/modules/rtp_rtcp/source/rtp_sender_video.h @@ -185,7 +185,7 @@ class RTPSenderVideo { RTC_GUARDED_BY(send_checker_); // Current target playout delay. - PlayoutDelay current_playout_delay_ RTC_GUARDED_BY(send_checker_); + VideoPlayoutDelay current_playout_delay_ RTC_GUARDED_BY(send_checker_); // Flag indicating if we need to propagate |current_playout_delay_| in order // to guarantee it gets delivered. bool playout_delay_pending_; diff --git a/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc index b114cd271d..b9e7fcbe0c 100644 --- a/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc +++ b/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc @@ -898,7 +898,7 @@ TEST_P(RtpSenderVideoTest, PopulatesPlayoutDelay) { uint8_t kFrame[kPacketSize]; rtp_module_->RegisterRtpHeaderExtension(PlayoutDelayLimits::kUri, kPlayoutDelayExtensionId); - const PlayoutDelay kExpectedDelay = {10, 20}; + const VideoPlayoutDelay kExpectedDelay = {10, 20}; // Send initial key-frame without playout delay. RTPVideoHeader hdr; @@ -918,14 +918,14 @@ TEST_P(RtpSenderVideoTest, PopulatesPlayoutDelay) { vp8_header.temporalIdx = 1; rtp_sender_video_->SendVideo(kPayload, kType, kTimestamp, 0, kFrame, hdr, kDefaultExpectedRetransmissionTimeMs); - PlayoutDelay received_delay = PlayoutDelay::Noop(); + VideoPlayoutDelay received_delay = VideoPlayoutDelay(); ASSERT_TRUE(transport_.last_sent_packet().GetExtension( &received_delay)); EXPECT_EQ(received_delay, kExpectedDelay); // Set playout delay on a non-discardable frame, the extension should still // be populated since dilvery wasn't guaranteed on the last one. - hdr.playout_delay = PlayoutDelay::Noop(); // Inidcates "no change". + hdr.playout_delay = VideoPlayoutDelay(); // Indicates "no change". vp8_header.temporalIdx = 0; rtp_sender_video_->SendVideo(kPayload, kType, kTimestamp, 0, kFrame, hdr, kDefaultExpectedRetransmissionTimeMs); diff --git a/modules/rtp_rtcp/source/rtp_video_header.h b/modules/rtp_rtcp/source/rtp_video_header.h index a9c144033d..ca3415587d 100644 --- a/modules/rtp_rtcp/source/rtp_video_header.h +++ b/modules/rtp_rtcp/source/rtp_video_header.h @@ -23,7 +23,6 @@ #include "api/video/video_frame_type.h" #include "api/video/video_rotation.h" #include "api/video/video_timing.h" -#include "common_types.h" // NOLINT(build/include_directory) #include "modules/video_coding/codecs/h264/include/h264_globals.h" #include "modules/video_coding/codecs/vp8/include/vp8_globals.h" #include "modules/video_coding/codecs/vp9/include/vp9_globals.h" @@ -74,7 +73,7 @@ struct RTPVideoHeader { uint8_t simulcastIdx = 0; VideoCodecType codec = VideoCodecType::kVideoCodecGeneric; - PlayoutDelay playout_delay = {-1, -1}; + VideoPlayoutDelay playout_delay; VideoSendTiming video_timing; absl::optional color_space; RTPVideoTypeHeader video_type_header; diff --git a/modules/video_coding/encoded_frame.h b/modules/video_coding/encoded_frame.h index 261aae77aa..3e2994072c 100644 --- a/modules/video_coding/encoded_frame.h +++ b/modules/video_coding/encoded_frame.h @@ -34,7 +34,7 @@ class RTC_EXPORT VCMEncodedFrame : protected EncodedImage { _renderTimeMs = renderTimeMs; } - void SetPlayoutDelay(PlayoutDelay playout_delay) { + void SetPlayoutDelay(VideoPlayoutDelay playout_delay) { playout_delay_ = playout_delay; } diff --git a/modules/video_coding/frame_buffer2_unittest.cc b/modules/video_coding/frame_buffer2_unittest.cc index 2de3f3362b..c05fe089c5 100644 --- a/modules/video_coding/frame_buffer2_unittest.cc +++ b/modules/video_coding/frame_buffer2_unittest.cc @@ -280,7 +280,7 @@ TEST_F(TestFrameBuffer2, ZeroPlayoutDelay) { VCMTiming timing(time_controller_.GetClock()); buffer_.reset( new FrameBuffer(time_controller_.GetClock(), &timing, &stats_callback_)); - const PlayoutDelay kPlayoutDelayMs = {0, 0}; + const VideoPlayoutDelay kPlayoutDelayMs = {0, 0}; std::unique_ptr test_frame(new FrameObjectFake()); test_frame->id.picture_id = 0; test_frame->SetPlayoutDelay(kPlayoutDelayMs); diff --git a/test/fuzzers/rtp_packet_fuzzer.cc b/test/fuzzers/rtp_packet_fuzzer.cc index a22c643a44..96baa03612 100644 --- a/test/fuzzers/rtp_packet_fuzzer.cc +++ b/test/fuzzers/rtp_packet_fuzzer.cc @@ -100,7 +100,7 @@ void FuzzOneInput(const uint8_t* data, size_t size) { break; } case kRtpExtensionPlayoutDelay: { - PlayoutDelay playout = PlayoutDelay::Noop(); + VideoPlayoutDelay playout; packet.GetExtension(&playout); break; } diff --git a/video/rtp_video_stream_receiver2_unittest.cc b/video/rtp_video_stream_receiver2_unittest.cc index acb999a806..68aafa5915 100644 --- a/video/rtp_video_stream_receiver2_unittest.cc +++ b/video/rtp_video_stream_receiver2_unittest.cc @@ -1159,11 +1159,11 @@ TEST_F(RtpVideoStreamReceiver2Test, TransformFrame) { } // Test default behavior and when playout delay is overridden by field trial. -const PlayoutDelay kTransmittedPlayoutDelay = {100, 200}; -const PlayoutDelay kForcedPlayoutDelay = {70, 90}; +const VideoPlayoutDelay kTransmittedPlayoutDelay = {100, 200}; +const VideoPlayoutDelay kForcedPlayoutDelay = {70, 90}; struct PlayoutDelayOptions { std::string field_trial; - PlayoutDelay expected_delay; + VideoPlayoutDelay expected_delay; }; const PlayoutDelayOptions kDefaultBehavior = { /*field_trial=*/"", /*expected_delay=*/kTransmittedPlayoutDelay}; diff --git a/video/rtp_video_stream_receiver_unittest.cc b/video/rtp_video_stream_receiver_unittest.cc index 8821f28848..d7c1938438 100644 --- a/video/rtp_video_stream_receiver_unittest.cc +++ b/video/rtp_video_stream_receiver_unittest.cc @@ -1217,11 +1217,11 @@ TEST_F(RtpVideoStreamReceiverTest, TransformFrame) { } // Test default behavior and when playout delay is overridden by field trial. -const PlayoutDelay kTransmittedPlayoutDelay = {100, 200}; -const PlayoutDelay kForcedPlayoutDelay = {70, 90}; +const VideoPlayoutDelay kTransmittedPlayoutDelay = {100, 200}; +const VideoPlayoutDelay kForcedPlayoutDelay = {70, 90}; struct PlayoutDelayOptions { std::string field_trial; - PlayoutDelay expected_delay; + VideoPlayoutDelay expected_delay; }; const PlayoutDelayOptions kDefaultBehavior = { /*field_trial=*/"", /*expected_delay=*/kTransmittedPlayoutDelay}; diff --git a/video/video_receive_stream.cc b/video/video_receive_stream.cc index 125fcb5421..1158c41623 100644 --- a/video/video_receive_stream.cc +++ b/video/video_receive_stream.cc @@ -562,7 +562,7 @@ void VideoReceiveStream::OnCompleteFrame( } last_complete_frame_time_ms_ = time_now_ms; - const PlayoutDelay& playout_delay = frame->EncodedImage().playout_delay_; + const VideoPlayoutDelay& playout_delay = frame->EncodedImage().playout_delay_; if (playout_delay.min_ms >= 0) { MutexLock lock(&playout_delay_lock_); frame_minimum_playout_delay_ms_ = playout_delay.min_ms; diff --git a/video/video_receive_stream2.cc b/video/video_receive_stream2.cc index 7a848cfdff..7fcb42b17b 100644 --- a/video/video_receive_stream2.cc +++ b/video/video_receive_stream2.cc @@ -555,7 +555,7 @@ void VideoReceiveStream2::OnCompleteFrame( } last_complete_frame_time_ms_ = time_now_ms; - const PlayoutDelay& playout_delay = frame->EncodedImage().playout_delay_; + const VideoPlayoutDelay& playout_delay = frame->EncodedImage().playout_delay_; if (playout_delay.min_ms >= 0) { frame_minimum_playout_delay_ms_ = playout_delay.min_ms; UpdatePlayoutDelays(); diff --git a/video/video_receive_stream2_unittest.cc b/video/video_receive_stream2_unittest.cc index c153cbbf22..435975062c 100644 --- a/video/video_receive_stream2_unittest.cc +++ b/video/video_receive_stream2_unittest.cc @@ -170,7 +170,7 @@ TEST_F(VideoReceiveStream2Test, CreateFrameFromH264FmtpSpropAndIdr) { } TEST_F(VideoReceiveStream2Test, PlayoutDelay) { - const PlayoutDelay kPlayoutDelayMs = {123, 321}; + const VideoPlayoutDelay kPlayoutDelayMs = {123, 321}; std::unique_ptr test_frame(new FrameObjectFake()); test_frame->id.picture_id = 0; test_frame->SetPlayoutDelay(kPlayoutDelayMs); @@ -200,7 +200,7 @@ TEST_F(VideoReceiveStream2Test, PlayoutDelay) { TEST_F(VideoReceiveStream2Test, PlayoutDelayPreservesDefaultMaxValue) { const int default_max_playout_latency = timing_->max_playout_delay(); - const PlayoutDelay kPlayoutDelayMs = {123, -1}; + const VideoPlayoutDelay kPlayoutDelayMs = {123, -1}; std::unique_ptr test_frame(new FrameObjectFake()); test_frame->id.picture_id = 0; @@ -216,7 +216,7 @@ TEST_F(VideoReceiveStream2Test, PlayoutDelayPreservesDefaultMaxValue) { TEST_F(VideoReceiveStream2Test, PlayoutDelayPreservesDefaultMinValue) { const int default_min_playout_latency = timing_->min_playout_delay(); - const PlayoutDelay kPlayoutDelayMs = {-1, 321}; + const VideoPlayoutDelay kPlayoutDelayMs = {-1, 321}; std::unique_ptr test_frame(new FrameObjectFake()); test_frame->id.picture_id = 0; diff --git a/video/video_receive_stream_unittest.cc b/video/video_receive_stream_unittest.cc index b1e1c55695..503c96c093 100644 --- a/video/video_receive_stream_unittest.cc +++ b/video/video_receive_stream_unittest.cc @@ -167,7 +167,7 @@ TEST_F(VideoReceiveStreamTest, CreateFrameFromH264FmtpSpropAndIdr) { } TEST_F(VideoReceiveStreamTest, PlayoutDelay) { - const PlayoutDelay kPlayoutDelayMs = {123, 321}; + const VideoPlayoutDelay kPlayoutDelayMs = {123, 321}; std::unique_ptr test_frame(new FrameObjectFake()); test_frame->id.picture_id = 0; test_frame->SetPlayoutDelay(kPlayoutDelayMs); @@ -197,7 +197,7 @@ TEST_F(VideoReceiveStreamTest, PlayoutDelay) { TEST_F(VideoReceiveStreamTest, PlayoutDelayPreservesDefaultMaxValue) { const int default_max_playout_latency = timing_->max_playout_delay(); - const PlayoutDelay kPlayoutDelayMs = {123, -1}; + const VideoPlayoutDelay kPlayoutDelayMs = {123, -1}; std::unique_ptr test_frame(new FrameObjectFake()); test_frame->id.picture_id = 0; @@ -213,7 +213,7 @@ TEST_F(VideoReceiveStreamTest, PlayoutDelayPreservesDefaultMaxValue) { TEST_F(VideoReceiveStreamTest, PlayoutDelayPreservesDefaultMinValue) { const int default_min_playout_latency = timing_->min_playout_delay(); - const PlayoutDelay kPlayoutDelayMs = {-1, 321}; + const VideoPlayoutDelay kPlayoutDelayMs = {-1, 321}; std::unique_ptr test_frame(new FrameObjectFake()); test_frame->id.picture_id = 0;