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

Side by Side Diff: media/cast/sender/h264_vt_encoder_unittest.cc

Issue 1490613005: media config: expand is_encrypted to a struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/formats/mp2t/es_parser_adts.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 message_loop_.RunUntilIdle(); 307 message_loop_.RunUntilIdle();
308 308
309 EXPECT_EQ(10, metadata_recorder->count_frames_delivered()); 309 EXPECT_EQ(10, metadata_recorder->count_frames_delivered());
310 } 310 }
311 311
312 #if defined(USE_PROPRIETARY_CODECS) 312 #if defined(USE_PROPRIETARY_CODECS)
313 TEST_F(H264VideoToolboxEncoderTest, CheckFramesAreDecodable) { 313 TEST_F(H264VideoToolboxEncoderTest, CheckFramesAreDecodable) {
314 VideoDecoderConfig config(kCodecH264, H264PROFILE_MAIN, frame_->format(), 314 VideoDecoderConfig config(kCodecH264, H264PROFILE_MAIN, frame_->format(),
315 COLOR_SPACE_UNSPECIFIED, frame_->coded_size(), 315 COLOR_SPACE_UNSPECIFIED, frame_->coded_size(),
316 frame_->visible_rect(), frame_->natural_size(), 316 frame_->visible_rect(), frame_->natural_size(),
317 EmptyExtraData(), false); 317 EmptyExtraData(), Unencrypted());
318 scoped_refptr<EndToEndFrameChecker> checker(new EndToEndFrameChecker(config)); 318 scoped_refptr<EndToEndFrameChecker> checker(new EndToEndFrameChecker(config));
319 319
320 VideoEncoder::FrameEncodedCallback cb = 320 VideoEncoder::FrameEncodedCallback cb =
321 base::Bind(&EndToEndFrameChecker::EncodeDone, checker.get()); 321 base::Bind(&EndToEndFrameChecker::EncodeDone, checker.get());
322 for (uint32_t frame_id = 0; frame_id < 6; ++frame_id) { 322 for (uint32_t frame_id = 0; frame_id < 6; ++frame_id) {
323 checker->PushExpectation(frame_); 323 checker->PushExpectation(frame_);
324 EXPECT_TRUE(encoder_->EncodeVideoFrame(frame_, clock_->NowTicks(), cb)); 324 EXPECT_TRUE(encoder_->EncodeVideoFrame(frame_, clock_->NowTicks(), cb));
325 AdvanceClockAndVideoFrameTimestamp(); 325 AdvanceClockAndVideoFrameTimestamp();
326 } 326 }
327 327
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta())); 411 gfx::Size(kVideoWidth, kVideoHeight), base::TimeDelta()));
412 412
413 // After a power resume event, the factory should produce frames right away 413 // After a power resume event, the factory should produce frames right away
414 // because the encoder re-initializes on its own. 414 // because the encoder re-initializes on its own.
415 power_source_->GenerateResumeEvent(); 415 power_source_->GenerateResumeEvent();
416 CreateFrameAndMemsetPlane(video_frame_factory.get()); 416 CreateFrameAndMemsetPlane(video_frame_factory.get());
417 } 417 }
418 418
419 } // namespace cast 419 } // namespace cast
420 } // namespace media 420 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/formats/mp2t/es_parser_adts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698