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

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

Issue 2270723002: Reland of Delete the class WebRtcVideoCapturerAdapter::MediaVideoFrameFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use the right WebRtcVideoFrame constructor, with microsec units. Created 4 years, 4 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
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 9603d7109e7d4f7962364e778f4fc2e98f34b3d6..81d812b223d483f8a652dfd13c0a8be9240755de 100644
--- a/content/renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc
+++ b/content/renderer/media/webrtc/webrtc_video_capturer_adapter_unittest.cc
@@ -11,17 +11,18 @@
namespace content {
class WebRtcVideoCapturerAdapterTest
- : public sigslot::has_slots<>,
+ : public rtc::VideoSinkInterface<cricket::VideoFrame>,
public ::testing::Test {
public:
WebRtcVideoCapturerAdapterTest()
: adapter_(false),
output_frame_width_(0),
output_frame_height_(0) {
- adapter_.SignalFrameCaptured.connect(
- this, &WebRtcVideoCapturerAdapterTest::OnFrameCaptured);
+ adapter_.AddOrUpdateSink(this, rtc::VideoSinkWants());
+ }
+ ~WebRtcVideoCapturerAdapterTest() override {
+ adapter_.RemoveSink(this);
}
- ~WebRtcVideoCapturerAdapterTest() override {}
void TestSourceCropFrame(int capture_width,
int capture_height,
@@ -42,11 +43,11 @@ class WebRtcVideoCapturerAdapterTest
EXPECT_EQ(natural_width, output_frame_width_);
EXPECT_EQ(natural_height, output_frame_height_);
}
- protected:
- void OnFrameCaptured(cricket::VideoCapturer* capturer,
- const cricket::CapturedFrame* frame) {
- output_frame_width_ = frame->width;
- output_frame_height_ = frame->height;
+
+ // rtc::VideoSinkInterface
+ void OnFrame(const cricket::VideoFrame& frame) override {
+ output_frame_width_ = frame.width();
+ output_frame_height_ = frame.height();
}
private:

Powered by Google App Engine
This is Rietveld 408576698