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

Unified Diff: content/renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc

Issue 2318953006: Revert of Delete the class WebRtcVideoCapturerAdapter::MediaVideoFrameFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 | « content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc
diff --git a/content/renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc b/content/renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc
index 81d812b223d483f8a652dfd13c0a8be9240755de..9603d7109e7d4f7962364e778f4fc2e98f34b3d6 100644
--- a/content/renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc
+++ b/content/renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc
@@ -11,18 +11,17 @@
namespace content {
class WebRtcVideoCapturerAdapterTest
- : public rtc::VideoSinkInterface<cricket::VideoFrame>,
+ : public sigslot::has_slots<>,
public ::testing::Test {
public:
WebRtcVideoCapturerAdapterTest()
: adapter_(false),
output_frame_width_(0),
output_frame_height_(0) {
- adapter_.AddOrUpdateSink(this, rtc::VideoSinkWants());
+ adapter_.SignalFrameCaptured.connect(
+ this, &WebRtcVideoCapturerAdapterTest::OnFrameCaptured);
}
- ~WebRtcVideoCapturerAdapterTest() override {
- adapter_.RemoveSink(this);
- }
+ ~WebRtcVideoCapturerAdapterTest() override {}
void TestSourceCropFrame(int capture_width,
int capture_height,
@@ -43,11 +42,11 @@
EXPECT_EQ(natural_width, output_frame_width_);
EXPECT_EQ(natural_height, output_frame_height_);
}
-
- // rtc::VideoSinkInterface
- void OnFrame(const cricket::VideoFrame& frame) override {
- output_frame_width_ = frame.width();
- output_frame_height_ = frame.height();
+ protected:
+ void OnFrameCaptured(cricket::VideoCapturer* capturer,
+ const cricket::CapturedFrame* frame) {
+ output_frame_width_ = frame->width;
+ output_frame_height_ = frame->height;
}
private:
« no previous file with comments | « content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698