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

Side by Side Diff: content/common/gpu/media/v4l2_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: address patch set 13 review comments 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <dlfcn.h> 5 #include <dlfcn.h>
6 #include <errno.h> 6 #include <errno.h>
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <linux/videodev2.h> 8 #include <linux/videodev2.h>
9 #include <poll.h> 9 #include <poll.h>
10 #include <sys/eventfd.h> 10 #include <sys/eventfd.h>
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 199
200 DestroyInputBuffers(); 200 DestroyInputBuffers();
201 DestroyOutputBuffers(); 201 DestroyOutputBuffers();
202 202
203 // These maps have members that should be manually destroyed, e.g. file 203 // These maps have members that should be manually destroyed, e.g. file
204 // descriptors, mmap() segments, etc. 204 // descriptors, mmap() segments, etc.
205 DCHECK(input_buffer_map_.empty()); 205 DCHECK(input_buffer_map_.empty());
206 DCHECK(output_buffer_map_.empty()); 206 DCHECK(output_buffer_map_.empty());
207 } 207 }
208 208
209 // static
210 std::vector<media::VideoDecodeAccelerator::SupportedProfile>
211 V4L2VideoDecodeAccelerator::GetSupportedProfiles() {
212 return V4L2Device::GetSupportedDecodeProfiles();
213 }
214
209 bool V4L2VideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile, 215 bool V4L2VideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
210 Client* client) { 216 Client* client) {
211 DVLOG(3) << "Initialize()"; 217 DVLOG(3) << "Initialize()";
212 DCHECK(child_message_loop_proxy_->BelongsToCurrentThread()); 218 DCHECK(child_message_loop_proxy_->BelongsToCurrentThread());
213 DCHECK_EQ(decoder_state_, kUninitialized); 219 DCHECK_EQ(decoder_state_, kUninitialized);
214 220
215 client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client)); 221 client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client));
216 client_ = client_ptr_factory_->GetWeakPtr(); 222 client_ = client_ptr_factory_->GetWeakPtr();
217 223
218 switch (profile) { 224 switch (profile) {
(...skipping 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after
2012 gfx::Size new_coded_size(base::checked_cast<int>(format.fmt.pix_mp.width), 2018 gfx::Size new_coded_size(base::checked_cast<int>(format.fmt.pix_mp.width),
2013 base::checked_cast<int>(format.fmt.pix_mp.height)); 2019 base::checked_cast<int>(format.fmt.pix_mp.height));
2014 if (coded_size_ != new_coded_size) { 2020 if (coded_size_ != new_coded_size) {
2015 DVLOG(3) << "IsResolutionChangeNecessary(): Resolution change detected"; 2021 DVLOG(3) << "IsResolutionChangeNecessary(): Resolution change detected";
2016 return true; 2022 return true;
2017 } 2023 }
2018 return false; 2024 return false;
2019 } 2025 }
2020 2026
2021 } // namespace content 2027 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698