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

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

Issue 1666653002: media: Remove SetCdmReadyCB and CdmReadyCB (part 1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and fix compile errors Created 4 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 unified diff | Download patch
« no previous file with comments | « media/base/video_renderer.h ('k') | media/filters/android/media_codec_audio_decoder.h » ('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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 DISALLOW_COPY_AND_ASSIGN(MetadataRecorder); 133 DISALLOW_COPY_AND_ASSIGN(MetadataRecorder);
134 }; 134 };
135 135
136 class EndToEndFrameChecker 136 class EndToEndFrameChecker
137 : public base::RefCountedThreadSafe<EndToEndFrameChecker> { 137 : public base::RefCountedThreadSafe<EndToEndFrameChecker> {
138 public: 138 public:
139 explicit EndToEndFrameChecker(const VideoDecoderConfig& config) 139 explicit EndToEndFrameChecker(const VideoDecoderConfig& config)
140 : decoder_(), count_frames_checked_(0) { 140 : decoder_(), count_frames_checked_(0) {
141 bool decoder_init_result; 141 bool decoder_init_result;
142 decoder_.Initialize( 142 decoder_.Initialize(
143 config, false, media::SetCdmReadyCB(), 143 config, false, nullptr,
144 base::Bind(&SaveDecoderInitResult, &decoder_init_result), 144 base::Bind(&SaveDecoderInitResult, &decoder_init_result),
145 base::Bind(&EndToEndFrameChecker::CompareFrameWithExpected, 145 base::Bind(&EndToEndFrameChecker::CompareFrameWithExpected,
146 base::Unretained(this))); 146 base::Unretained(this)));
147 base::MessageLoop::current()->RunUntilIdle(); 147 base::MessageLoop::current()->RunUntilIdle();
148 EXPECT_TRUE(decoder_init_result); 148 EXPECT_TRUE(decoder_init_result);
149 } 149 }
150 150
151 void PushExpectation(const scoped_refptr<VideoFrame>& frame) { 151 void PushExpectation(const scoped_refptr<VideoFrame>& frame) {
152 expectations_.push(frame); 152 expectations_.push(frame);
153 } 153 }
(...skipping 257 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 | « media/base/video_renderer.h ('k') | media/filters/android/media_codec_audio_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698