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

Unified Diff: content/common/gpu/media/video_encode_accelerator_unittest.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: 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 7526fdad34933bf7bb55eb951ca4cad6f83edca1..2b3f1d6dd6d465aaa27ab1c6052aaf8d24dc071d 100644
--- a/content/common/gpu/media/video_encode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_encode_accelerator_unittest.cc
@@ -249,7 +249,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;
@@ -393,15 +392,21 @@ void VEAClient::CreateEncoder() {
CHECK(!has_encoder());
encoder_.reset(new ExynosVideoEncodeAccelerator());
-
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() {
@@ -411,12 +416,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) {
« no previous file with comments | « content/common/gpu/media/video_decode_accelerator_unittest.cc ('k') | content/renderer/media/pepper_platform_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698