Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Unified Diff: webrtc/modules/video_coding/video_receiver_unittest.cc

Issue 2744013002: Updates to VCMDecodedFrameCallback, VideoReceiver and a few related classes/tests. (Closed)
Patch Set: Update DCHECKs Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/modules/video_coding/video_receiver.cc ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/video_receiver_unittest.cc
diff --git a/webrtc/modules/video_coding/video_receiver_unittest.cc b/webrtc/modules/video_coding/video_receiver_unittest.cc
index 9cac45b86b380330072f22f1811e4c9f4b65ee16..3e4d3244c6d11d39da2814b92978613ba5e44e43 100644
--- a/webrtc/modules/video_coding/video_receiver_unittest.cc
+++ b/webrtc/modules/video_coding/video_receiver_unittest.cc
@@ -21,6 +21,7 @@
#include "webrtc/test/gtest.h"
using ::testing::_;
+using ::testing::AnyNumber;
using ::testing::NiceMock;
namespace webrtc {
@@ -45,6 +46,13 @@ class TestVideoReceiver : public ::testing::Test {
VideoCodingModule::Codec(kVideoCodecVP8, &settings_);
settings_.plType = kUnusedPayloadType; // Use the mocked encoder.
EXPECT_EQ(0, receiver_->RegisterReceiveCodec(&settings_, 1, true));
+
+ // Since we call Decode, we need to provide a valid receive callback.
+ // However, for the purposes of these tests, we ignore the callbacks.
+ EXPECT_CALL(receive_callback_, OnIncomingPayloadType(_)).Times(AnyNumber());
+ EXPECT_CALL(receive_callback_, OnDecoderImplementationName(_))
+ .Times(AnyNumber());
+ receiver_->RegisterReceiveCallback(&receive_callback_);
}
void InsertAndVerifyPaddingFrame(const uint8_t* payload,
@@ -79,6 +87,7 @@ class TestVideoReceiver : public ::testing::Test {
NiceMock<MockPacketRequestCallback> packet_request_callback_;
std::unique_ptr<VCMTiming> timing_;
+ MockVCMReceiveCallback receive_callback_;
std::unique_ptr<VideoReceiver> receiver_;
};
« no previous file with comments | « webrtc/modules/video_coding/video_receiver.cc ('k') | webrtc/video/video_receive_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698