Chromium Code Reviews| Index: content/renderer/media/rtc_video_encoder.cc |
| diff --git a/content/renderer/media/rtc_video_encoder.cc b/content/renderer/media/rtc_video_encoder.cc |
| index b734102e5dbfbc488b2d9b8e474897e045c35737..28ede35f238a4659d33ff4a0c27b2480d4813659 100644 |
| --- a/content/renderer/media/rtc_video_encoder.cc |
| +++ b/content/renderer/media/rtc_video_encoder.cc |
| @@ -75,7 +75,6 @@ class RTCVideoEncoder::Impl |
| void Destroy(); |
| // media::VideoEncodeAccelerator::Client implementation. |
| - virtual void NotifyInitializeDone() OVERRIDE; |
| virtual void RequireBitstreamBuffers(unsigned int input_count, |
| const gfx::Size& input_coded_size, |
| size_t output_buffer_size) OVERRIDE; |
| @@ -187,11 +186,14 @@ void RTCVideoEncoder::Impl::CreateAndInitializeVEA( |
| return; |
| } |
| input_visible_size_ = input_visible_size; |
| - video_encoder_->Initialize(media::VideoFrame::I420, |
| - input_visible_size_, |
| - profile, |
| - bitrate * 1000, |
| - this); |
| + if (!video_encoder_->Initialize(media::VideoFrame::I420, |
| + input_visible_size_, |
| + profile, |
| + bitrate * 1000, |
| + this)) { |
| + NOTIFY_ERROR(media::VideoEncodeAccelerator::kInvalidArgumentError); |
|
Ami GONE FROM CHROMIUM
2014/03/17 03:17:54
choice of error to return here seems vague; why no
sheu
2014/03/18 22:38:35
I think it's more likely that the encoder doesn't
|
| + return; |
| + } |
| } |
| void RTCVideoEncoder::Impl::Enqueue(const webrtc::I420VideoFrame* input_frame, |
| @@ -246,11 +248,6 @@ void RTCVideoEncoder::Impl::Destroy() { |
| video_encoder_.release()->Destroy(); |
| } |
| -void RTCVideoEncoder::Impl::NotifyInitializeDone() { |
| - DVLOG(3) << "Impl::NotifyInitializeDone()"; |
| - DCHECK(thread_checker_.CalledOnValidThread()); |
| -} |
| - |
| void RTCVideoEncoder::Impl::RequireBitstreamBuffers( |
| unsigned int input_count, |
| const gfx::Size& input_coded_size, |