Delete header file mock_vcm_callbacks.h Move definitions of mock classes to the only user, the unit tests for the deprecated class vcm::VideoReceiver. Bug: webrtc:7408 Change-Id: I05e38ed8ebbe615bb2db0b631ec914773fb0a520 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168182 Reviewed-by: Philip Eliasson <philipel@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30451}
diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn index bca50d5..22bb142 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn
@@ -248,9 +248,7 @@ "codecs/vp9/include/vp9_globals.h", ] - deps = [ - "../../rtc_base:checks", - ] + deps = [ "../../rtc_base:checks" ] } rtc_library("video_coding_utility") { @@ -671,9 +669,7 @@ bundle_data("video_coding_modules_tests_resources_bundle_data") { testonly = true sources = video_coding_modules_tests_resources - outputs = [ - "{{bundle_resources_dir}}/{{source_file_part}}", - ] + outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ] } } } @@ -835,7 +831,6 @@ "h264_sprop_parameter_sets_unittest.cc", "h264_sps_pps_tracker_unittest.cc", "histogram_unittest.cc", - "include/mock/mock_vcm_callbacks.h", "jitter_buffer_unittest.cc", "jitter_estimator_tests.cc", "loss_notification_controller_unittest.cc",
diff --git a/modules/video_coding/include/mock/mock_vcm_callbacks.h b/modules/video_coding/include/mock/mock_vcm_callbacks.h deleted file mode 100644 index 76fc561..0000000 --- a/modules/video_coding/include/mock/mock_vcm_callbacks.h +++ /dev/null
@@ -1,39 +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 MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VCM_CALLBACKS_H_ -#define MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VCM_CALLBACKS_H_ - -#include "modules/video_coding/include/video_coding_defines.h" -#include "test/gmock.h" - -namespace webrtc { - -class MockPacketRequestCallback : public VCMPacketRequestCallback { - public: - MOCK_METHOD2(ResendPackets, - int32_t(const uint16_t* sequenceNumbers, uint16_t length)); -}; - -class MockVCMReceiveCallback : public VCMReceiveCallback { - public: - MockVCMReceiveCallback() {} - virtual ~MockVCMReceiveCallback() {} - - MOCK_METHOD4( - FrameToRender, - int32_t(VideoFrame&, absl::optional<uint8_t>, int32_t, VideoContentType)); - MOCK_METHOD1(OnIncomingPayloadType, void(int)); - MOCK_METHOD1(OnDecoderImplementationName, void(const char*)); -}; - -} // namespace webrtc - -#endif // MODULES_VIDEO_CODING_INCLUDE_MOCK_MOCK_VCM_CALLBACKS_H_
diff --git a/modules/video_coding/video_receiver_unittest.cc b/modules/video_coding/video_receiver_unittest.cc index 7526691..363838b8 100644 --- a/modules/video_coding/video_receiver_unittest.cc +++ b/modules/video_coding/video_receiver_unittest.cc
@@ -9,7 +9,6 @@ */ #include "api/test/mock_video_decoder.h" -#include "modules/video_coding/include/mock/mock_vcm_callbacks.h" #include "modules/video_coding/include/video_coding.h" #include "modules/video_coding/timing.h" #include "modules/video_coding/video_coding_impl.h" @@ -25,6 +24,24 @@ namespace vcm { namespace { +class MockPacketRequestCallback : public VCMPacketRequestCallback { + public: + MOCK_METHOD2(ResendPackets, + int32_t(const uint16_t* sequenceNumbers, uint16_t length)); +}; + +class MockVCMReceiveCallback : public VCMReceiveCallback { + public: + MockVCMReceiveCallback() {} + virtual ~MockVCMReceiveCallback() {} + + MOCK_METHOD4( + FrameToRender, + int32_t(VideoFrame&, absl::optional<uint8_t>, int32_t, VideoContentType)); + MOCK_METHOD1(OnIncomingPayloadType, void(int)); + MOCK_METHOD1(OnDecoderImplementationName, void(const char*)); +}; + class TestVideoReceiver : public ::testing::Test { protected: static const int kUnusedPayloadType = 10;