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

Unified Diff: content/renderer/media/rtc_video_encoder.cc

Issue 185403020: Make VEA client of command buffer; move sync. IPC to VDA/VEA::Initialize() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 85629196 fischman@ comments. Created 6 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 side-by-side diff with in-line comments
Download patch
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 f59e0bfeb5f51afbd87428d462ed8143b75ebcb3..3b3325ab81b36c77855bb4f1f58a7353cecd081d 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;
@@ -192,11 +191,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);
+ return;
+ }
}
void RTCVideoEncoder::Impl::Enqueue(const webrtc::I420VideoFrame* input_frame,
@@ -275,11 +277,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,

Powered by Google App Engine
This is Rietveld 408576698