Chromium Code Reviews| Index: content/common/gpu/media/video_encode_accelerator_unittest.cc |
| diff --git a/content/common/gpu/media/video_encode_accelerator_unittest.cc b/content/common/gpu/media/video_encode_accelerator_unittest.cc |
| index 413d42ca747109d11f4d405d5bd05a1449bdc36d..59a554e38ce9a5962eb13e908eb11d181114fad8 100644 |
| --- a/content/common/gpu/media/video_encode_accelerator_unittest.cc |
| +++ b/content/common/gpu/media/video_encode_accelerator_unittest.cc |
| @@ -248,7 +248,6 @@ class VEAClient : public VideoEncodeAccelerator::Client { |
| void DestroyEncoder(); |
| // VideoDecodeAccelerator::Client implementation. |
| - void NotifyInitializeDone() OVERRIDE; |
| void RequireBitstreamBuffers(unsigned int input_count, |
| const gfx::Size& input_coded_size, |
| size_t output_buffer_size) OVERRIDE; |
| @@ -392,15 +391,26 @@ void VEAClient::CreateEncoder() { |
| CHECK(!has_encoder()); |
| encoder_.reset(new ExynosVideoEncodeAccelerator()); |
| - |
| + if (!encoder_) { |
|
Ami GONE FROM CHROMIUM
2014/03/17 03:17:54
unpossible
sheu
2014/03/18 22:38:35
Ha. I guess.
|
| + DLOG(ERROR) << "CreateEncoder() failed"; |
| + SetState(CS_ERROR); |
| + return; |
| + } |
| SetState(CS_ENCODER_SET); |
| + |
| DVLOG(1) << "Profile: " << test_stream_.requested_profile |
| << ", requested bitrate: " << test_stream_.requested_bitrate; |
| - encoder_->Initialize(kInputFormat, |
| - test_stream_.size, |
| - test_stream_.requested_profile, |
| - test_stream_.requested_bitrate, |
| - this); |
| + if (!encoder_->Initialize(kInputFormat, |
| + test_stream_.size, |
| + test_stream_.requested_profile, |
| + test_stream_.requested_bitrate, |
| + this)) { |
| + DLOG(ERROR) << "VideoEncodeAccelerator::Initialize() failed"; |
| + SetState(CS_ERROR); |
| + return; |
| + } |
| + SetInitialConfiguration(); |
| + SetState(CS_INITIALIZED); |
| } |
| void VEAClient::DestroyEncoder() { |
| @@ -410,12 +420,6 @@ void VEAClient::DestroyEncoder() { |
| encoder_.release()->Destroy(); |
| } |
| -void VEAClient::NotifyInitializeDone() { |
| - DCHECK(thread_checker_.CalledOnValidThread()); |
| - SetInitialConfiguration(); |
| - SetState(CS_INITIALIZED); |
| -} |
| - |
| void VEAClient::RequireBitstreamBuffers(unsigned int input_count, |
| const gfx::Size& input_coded_size, |
| size_t output_size) { |