Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |