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

Unified Diff: media/cast/sender/h264_vt_encoder_unittest.cc

Issue 906403006: [Cast] Size-Adaptable platform video encoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed hubbe's comments. Created 5 years, 10 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 | « media/cast/sender/h264_vt_encoder.cc ('k') | media/cast/sender/size_adaptable_video_encoder_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/h264_vt_encoder_unittest.cc
diff --git a/media/cast/sender/h264_vt_encoder_unittest.cc b/media/cast/sender/h264_vt_encoder_unittest.cc
index 78012eb70747e3cb1c368ba5778c77e9ce4d82df..04f3d629da95b23a9d9f8786347b5eb691ddacfd 100644
--- a/media/cast/sender/h264_vt_encoder_unittest.cc
+++ b/media/cast/sender/h264_vt_encoder_unittest.cc
@@ -176,7 +176,9 @@ class EndToEndFrameChecker
};
void CreateFrameAndMemsetPlane(VideoFrameFactory* const video_frame_factory) {
- auto video_frame = video_frame_factory->CreateFrame(base::TimeDelta());
+ const scoped_refptr<media::VideoFrame> video_frame =
+ video_frame_factory->MaybeCreateFrame(
+ gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta());
ASSERT_TRUE(video_frame.get());
auto cv_pixel_buffer = video_frame->cv_pixel_buffer();
ASSERT_TRUE(cv_pixel_buffer);
@@ -207,6 +209,7 @@ class H264VideoToolboxEncoderTest : public ::testing::Test {
cast_environment_,
video_sender_config_,
gfx::Size(kVideoWidth, kVideoHeight),
+ 0u,
base::Bind(&SaveOperationalStatus, &operational_status_)));
message_loop_.RunUntilIdle();
EXPECT_EQ(STATUS_INITIALIZED, operational_status_);
@@ -304,6 +307,8 @@ TEST_F(H264VideoToolboxEncoderTest, CheckVideoFrameFactory) {
auto video_frame_factory = encoder_->CreateVideoFrameFactory();
ASSERT_TRUE(video_frame_factory.get());
CreateFrameAndMemsetPlane(video_frame_factory.get());
+ // TODO(jfroy): Need to test that the encoder can encode VideoFrames provided
+ // by the VideoFrameFactory.
encoder_.reset();
message_loop_.RunUntilIdle();
CreateFrameAndMemsetPlane(video_frame_factory.get());
« no previous file with comments | « media/cast/sender/h264_vt_encoder.cc ('k') | media/cast/sender/size_adaptable_video_encoder_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698