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

Unified Diff: webrtc/video/video_send_stream_tests.cc

Issue 1891733002: Change pre_encode_callback to get a const frame. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Do per-frame delay by calling SleepMs. Created 4 years, 8 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/video/end_to_end_tests.cc ('k') | webrtc/video/vie_encoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/video_send_stream_tests.cc
diff --git a/webrtc/video/video_send_stream_tests.cc b/webrtc/video/video_send_stream_tests.cc
index 53f72de502563088a64f84593ec73de5e003bce4..4926fe879b17688a96ab35e1ba65a749cc3290a2 100644
--- a/webrtc/video/video_send_stream_tests.cc
+++ b/webrtc/video/video_send_stream_tests.cc
@@ -811,7 +811,8 @@ TEST_F(VideoSendStreamTest, FragmentsVp8AccordingToMaxPacketSizeWithFec) {
TEST_F(VideoSendStreamTest, SuspendBelowMinBitrate) {
static const int kSuspendTimeFrames = 60; // Suspend for 2 seconds @ 30 fps.
- class RembObserver : public test::SendTest, public I420FrameCallback {
+ class RembObserver : public test::SendTest,
+ public rtc::VideoSinkInterface<VideoFrame> {
public:
RembObserver()
: SendTest(kDefaultTimeoutMs),
@@ -862,8 +863,8 @@ TEST_F(VideoSendStreamTest, SuspendBelowMinBitrate) {
return SEND_PACKET;
}
- // This method implements the I420FrameCallback.
- void FrameCallback(VideoFrame* video_frame) override {
+ // This method implements the rtc::VideoSinkInterface
+ void OnFrame(const VideoFrame& video_frame) override {
rtc::CritScope lock(&crit_);
if (test_state_ == kDuringSuspend &&
++suspended_frame_count_ > kSuspendTimeFrames) {
@@ -1172,12 +1173,12 @@ TEST_F(VideoSendStreamTest, CanReconfigureToUseStartBitrateAbovePreviousMax) {
}
TEST_F(VideoSendStreamTest, CapturesTextureAndVideoFrames) {
- class FrameObserver : public I420FrameCallback {
+ class FrameObserver : public rtc::VideoSinkInterface<VideoFrame> {
public:
FrameObserver() : output_frame_event_(false, false) {}
- void FrameCallback(VideoFrame* video_frame) override {
- output_frames_.push_back(*video_frame);
+ void OnFrame(const VideoFrame& video_frame) override {
+ output_frames_.push_back(video_frame);
output_frame_event_.Set();
}
« no previous file with comments | « webrtc/video/end_to_end_tests.cc ('k') | webrtc/video/vie_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698