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

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

Issue 795633005: Add VDA supported profile to GPUInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to GetSupportedProfile Created 5 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 unified diff | Download patch
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/logging.h" 6 #include "base/logging.h"
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 weak_this_factory_(this) { 91 weak_this_factory_(this) {
92 weak_this_ = weak_this_factory_.GetWeakPtr(); 92 weak_this_ = weak_this_factory_.GetWeakPtr();
93 va_surface_release_cb_ = media::BindToCurrentLoop( 93 va_surface_release_cb_ = media::BindToCurrentLoop(
94 base::Bind(&VaapiVideoDecodeAccelerator::RecycleVASurfaceID, weak_this_)); 94 base::Bind(&VaapiVideoDecodeAccelerator::RecycleVASurfaceID, weak_this_));
95 } 95 }
96 96
97 VaapiVideoDecodeAccelerator::~VaapiVideoDecodeAccelerator() { 97 VaapiVideoDecodeAccelerator::~VaapiVideoDecodeAccelerator() {
98 DCHECK_EQ(message_loop_, base::MessageLoop::current()); 98 DCHECK_EQ(message_loop_, base::MessageLoop::current());
99 } 99 }
100 100
101 // static
102 std::vector<media::VideoDecodeAccelerator::SupportedProfile>
103 VaapiVideoDecodeAccelerator::GetSupportedProfiles() {
104 return VaapiWrapper::GetSupportedDecodeProfiles();
105 }
106
101 bool VaapiVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile, 107 bool VaapiVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
102 Client* client) { 108 Client* client) {
103 DCHECK_EQ(message_loop_, base::MessageLoop::current()); 109 DCHECK_EQ(message_loop_, base::MessageLoop::current());
104 110
105 client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client)); 111 client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client));
106 client_ = client_ptr_factory_->GetWeakPtr(); 112 client_ = client_ptr_factory_->GetWeakPtr();
107 113
108 base::AutoLock auto_lock(lock_); 114 base::AutoLock auto_lock(lock_);
109 DCHECK_EQ(state_, kUninitialized); 115 DCHECK_EQ(state_, kUninitialized);
110 DVLOG(2) << "Initializing VAVDA, profile: " << profile; 116 DVLOG(2) << "Initializing VAVDA, profile: " << profile;
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 DCHECK_EQ(message_loop_, base::MessageLoop::current()); 748 DCHECK_EQ(message_loop_, base::MessageLoop::current());
743 Cleanup(); 749 Cleanup();
744 delete this; 750 delete this;
745 } 751 }
746 752
747 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { 753 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() {
748 return false; 754 return false;
749 } 755 }
750 756
751 } // namespace content 757 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698