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

Side by Side Diff: content/common/gpu/media/vaapi_video_decode_accelerator.cc

Issue 333253002: Add VaapiVideoEncodeAccelerator for HW-accelerated video encode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/debug/trace_event.h" 6 #include "base/debug/trace_event.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 293
294 if (!make_context_current_.Run()) 294 if (!make_context_current_.Run())
295 return false; 295 return false;
296 296
297 if (!InitializeFBConfig()) { 297 if (!InitializeFBConfig()) {
298 DVLOG(1) << "Could not get a usable FBConfig"; 298 DVLOG(1) << "Could not get a usable FBConfig";
299 return false; 299 return false;
300 } 300 }
301 301
302 vaapi_wrapper_ = VaapiWrapper::Create( 302 vaapi_wrapper_ = VaapiWrapper::Create(
303 profile, x_display_, 303 VaapiWrapper::kDecode,
304 profile,
305 x_display_,
304 base::Bind(&ReportToUMA, content::VaapiH264Decoder::VAAPI_ERROR)); 306 base::Bind(&ReportToUMA, content::VaapiH264Decoder::VAAPI_ERROR));
305 307
306 if (!vaapi_wrapper_.get()) { 308 if (!vaapi_wrapper_.get()) {
307 DVLOG(1) << "Failed initializing VAAPI"; 309 DVLOG(1) << "Failed initializing VAAPI";
308 return false; 310 return false;
309 } 311 }
310 312
311 decoder_.reset( 313 decoder_.reset(
312 new VaapiH264Decoder( 314 new VaapiH264Decoder(
313 vaapi_wrapper_.get(), 315 vaapi_wrapper_.get(),
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 DCHECK_EQ(message_loop_, base::MessageLoop::current()); 916 DCHECK_EQ(message_loop_, base::MessageLoop::current());
915 Cleanup(); 917 Cleanup();
916 delete this; 918 delete this;
917 } 919 }
918 920
919 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { 921 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() {
920 return false; 922 return false;
921 } 923 }
922 924
923 } // namespace content 925 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698