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

Side by Side Diff: content/common/gpu/media/android_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: dispatch GetSupportedResolution to each vda Created 5 years, 12 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "content/common/gpu/media/android_video_decode_accelerator.h" 5 #include "content/common/gpu/media/android_video_decode_accelerator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 state_(NO_ERROR), 75 state_(NO_ERROR),
76 surface_texture_id_(0), 76 surface_texture_id_(0),
77 picturebuffers_requested_(false), 77 picturebuffers_requested_(false),
78 gl_decoder_(decoder), 78 gl_decoder_(decoder),
79 weak_this_factory_(this) {} 79 weak_this_factory_(this) {}
80 80
81 AndroidVideoDecodeAccelerator::~AndroidVideoDecodeAccelerator() { 81 AndroidVideoDecodeAccelerator::~AndroidVideoDecodeAccelerator() {
82 DCHECK(thread_checker_.CalledOnValidThread()); 82 DCHECK(thread_checker_.CalledOnValidThread());
83 } 83 }
84 84
85 // static
86 media::VideoDecodeAccelerator::SupportedResolution
87 AndroidVideoDecodeAccelerator::GetSupportedResolution() {
88 media::VideoDecodeAccelerator::SupportedResolution resolution;
89 resolution.min.SetSize(16, 16);
90 resolution.max.SetSize(1920, 1088);
wuchengli 2014/12/26 09:37:07 Better to ask someone from chrome media team or An
henryhsu 2014/12/26 10:25:18 Add qinmin@chromium.org as reviewer
91 return resolution;
92 }
93
85 bool AndroidVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile, 94 bool AndroidVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
86 Client* client) { 95 Client* client) {
87 DCHECK(!media_codec_); 96 DCHECK(!media_codec_);
88 DCHECK(thread_checker_.CalledOnValidThread()); 97 DCHECK(thread_checker_.CalledOnValidThread());
89 98
90 client_ = client; 99 client_ = client;
91 100
92 if (profile == media::VP8PROFILE_ANY) { 101 if (profile == media::VP8PROFILE_ANY) {
93 codec_ = media::kCodecVP8; 102 codec_ = media::kCodecVP8;
94 } else { 103 } else {
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 void AndroidVideoDecodeAccelerator::NotifyResetDone() { 559 void AndroidVideoDecodeAccelerator::NotifyResetDone() {
551 client_->NotifyResetDone(); 560 client_->NotifyResetDone();
552 } 561 }
553 562
554 void AndroidVideoDecodeAccelerator::NotifyError( 563 void AndroidVideoDecodeAccelerator::NotifyError(
555 media::VideoDecodeAccelerator::Error error) { 564 media::VideoDecodeAccelerator::Error error) {
556 client_->NotifyError(error); 565 client_->NotifyError(error);
557 } 566 }
558 567
559 } // namespace content 568 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698