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

Unified Diff: webrtc/test/frame_generator.cc

Issue 2444383009: Delete deprecated method VideoFrame::CreateFrame. (Closed)
Patch Set: Created 4 years, 2 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/common_video/video_frame.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/frame_generator.cc
diff --git a/webrtc/test/frame_generator.cc b/webrtc/test/frame_generator.cc
index 302eafc0a48ea6c2aa43b0147f5f815ac0bb27c1..2ae739a01fa2dee99f14869cf0d3644fdaff4cae 100644
--- a/webrtc/test/frame_generator.cc
+++ b/webrtc/test/frame_generator.cc
@@ -16,6 +16,7 @@
#include <memory>
#include "webrtc/base/checks.h"
+#include "webrtc/base/keep_ref_until_done.h"
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
#include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/test/frame_utils.h"
@@ -216,15 +217,16 @@ class ScrollingImageFrameGenerator : public FrameGenerator {
(pixels_scrolled_y / 2)) +
(pixels_scrolled_x / 2);
- current_frame_.CreateFrame(
- &current_source_frame_->video_frame_buffer()->DataY()[offset_y],
- &current_source_frame_->video_frame_buffer()->DataU()[offset_u],
- &current_source_frame_->video_frame_buffer()->DataV()[offset_v],
- target_width_, target_height_,
- current_source_frame_->video_frame_buffer()->StrideY(),
- current_source_frame_->video_frame_buffer()->StrideU(),
- current_source_frame_->video_frame_buffer()->StrideV(),
- kVideoRotation_0);
+ rtc::scoped_refptr<VideoFrameBuffer> frame_buffer(
+ current_source_frame_->video_frame_buffer());
+ current_frame_ = webrtc::VideoFrame(
+ new rtc::RefCountedObject<webrtc::WrappedI420Buffer>(
+ target_width_, target_height_,
+ &frame_buffer->DataY()[offset_y], frame_buffer->StrideY(),
+ &frame_buffer->DataU()[offset_u], frame_buffer->StrideU(),
+ &frame_buffer->DataV()[offset_v], frame_buffer->StrideV(),
+ KeepRefUntilDone(frame_buffer)),
+ kVideoRotation_0, 0);
}
Clock* const clock_;
« no previous file with comments | « webrtc/common_video/video_frame.cc ('k') | webrtc/video/video_send_stream_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698