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

Unified Diff: webrtc/media/engine/webrtcvideoframe_unittest.cc

Issue 2049023002: Revert of New static method I420Buffer::SetToBlack. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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/media/engine/webrtcvideoframe.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoframe_unittest.cc
diff --git a/webrtc/media/engine/webrtcvideoframe_unittest.cc b/webrtc/media/engine/webrtcvideoframe_unittest.cc
index 6d1d8109346df3c5ee9575b5bff303a4f601ac92..3f924a441a1feb8dff6ede9e1a751fdf10d9dce5 100644
--- a/webrtc/media/engine/webrtcvideoframe_unittest.cc
+++ b/webrtc/media/engine/webrtcvideoframe_unittest.cc
@@ -20,24 +20,15 @@
class WebRtcVideoTestFrame : public cricket::WebRtcVideoFrame {
public:
- WebRtcVideoTestFrame() {}
- WebRtcVideoTestFrame(
- const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer,
- int64_t time_stamp_ns,
- webrtc::VideoRotation rotation)
- : WebRtcVideoFrame(buffer, time_stamp_ns, rotation) {}
-
// The ApplyRotationToFrame test needs this as a public method.
using cricket::WebRtcVideoFrame::set_rotation;
virtual VideoFrame* CreateEmptyFrame(int w,
int h,
int64_t time_stamp) const override {
- rtc::scoped_refptr<webrtc::I420Buffer> buffer(
- new rtc::RefCountedObject<webrtc::I420Buffer>(w, h));
- buffer->SetToBlack();
- return new WebRtcVideoTestFrame(
- buffer, time_stamp, webrtc::kVideoRotation_0);
+ WebRtcVideoTestFrame* frame = new WebRtcVideoTestFrame();
+ frame->InitToBlack(w, h, time_stamp);
+ return frame;
}
};
@@ -154,6 +145,7 @@
// TODO(juberti): WebRtcVideoFrame is not currently refcounted.
// TEST_WEBRTCVIDEOFRAME(ConstructCopy)
// TEST_WEBRTCVIDEOFRAME(ConstructCopyIsRef)
+TEST_WEBRTCVIDEOFRAME(ConstructBlack)
// TODO(fbarchard): Implement Jpeg
// TEST_WEBRTCVIDEOFRAME(ConstructMjpgI420)
TEST_WEBRTCVIDEOFRAME(ConstructMjpgI422)
« no previous file with comments | « webrtc/media/engine/webrtcvideoframe.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698