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

Unified Diff: media/cast/video_sender/external_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: 7da5b6ec Rebase. 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: media/cast/video_sender/external_video_encoder.cc
diff --git a/media/cast/video_sender/external_video_encoder.cc b/media/cast/video_sender/external_video_encoder.cc
index b051c1b5e042bccccdf65eeb8a37f726cb36eaef..f7ad8040f8f6669ef21e29b9a1a3616ce3686dba 100644
--- a/media/cast/video_sender/external_video_encoder.cc
+++ b/media/cast/video_sender/external_video_encoder.cc
@@ -107,14 +107,18 @@ class LocalVideoEncodeAcceleratorClient
codec_ = video_config.codec;
max_frame_rate_ = video_config.max_frame_rate;
- // Asynchronous initialization call; NotifyInitializeDone or NotifyError
- // will be called once the HW is initialized.
- video_encode_accelerator_->Initialize(
- media::VideoFrame::I420,
- gfx::Size(video_config.width, video_config.height),
- output_profile,
- video_config.start_bitrate,
- this);
+ if (!video_encode_accelerator_->Initialize(
+ media::VideoFrame::I420,
+ gfx::Size(video_config.width, video_config.height),
+ output_profile,
+ video_config.start_bitrate,
+ this)) {
+ NotifyError(VideoEncodeAccelerator::kInvalidArgumentError);
+ return;
+ }
+
+ // Wait until shared memory is allocated to indicate that encoder is
+ // initialized.
}
// Free the HW.
@@ -151,14 +155,6 @@ class LocalVideoEncodeAcceleratorClient
}
protected:
- virtual void NotifyInitializeDone() OVERRIDE {
- DCHECK(encoder_task_runner_);
- DCHECK(encoder_task_runner_->RunsTasksOnCurrentThread());
-
- // Wait until shared memory is allocated to indicate that encoder is
- // initialized.
- }
-
virtual void NotifyError(VideoEncodeAccelerator::Error error) OVERRIDE {
DCHECK(encoder_task_runner_);
DCHECK(encoder_task_runner_->RunsTasksOnCurrentThread());
« no previous file with comments | « media/cast/test/fake_video_encode_accelerator.cc ('k') | media/cast/video_sender/external_video_encoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698