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

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

Issue 418193003: Using PROFILE_ANY for vp8 and vp9 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 4 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
« no previous file with comments | « no previous file | content/common/gpu/media/android_video_encode_accelerator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 DCHECK(thread_checker_.CalledOnValidThread()); 82 DCHECK(thread_checker_.CalledOnValidThread());
83 } 83 }
84 84
85 bool AndroidVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile, 85 bool AndroidVideoDecodeAccelerator::Initialize(media::VideoCodecProfile profile,
86 Client* client) { 86 Client* client) {
87 DCHECK(!media_codec_); 87 DCHECK(!media_codec_);
88 DCHECK(thread_checker_.CalledOnValidThread()); 88 DCHECK(thread_checker_.CalledOnValidThread());
89 89
90 client_ = client; 90 client_ = client;
91 91
92 if (profile == media::VP8PROFILE_MAIN) { 92 if (profile == media::VP8PROFILE_ANY) {
93 codec_ = media::kCodecVP8; 93 codec_ = media::kCodecVP8;
94 } else { 94 } else {
95 // TODO(dwkang): enable H264 once b/8125974 is fixed. 95 // TODO(dwkang): enable H264 once b/8125974 is fixed.
96 LOG(ERROR) << "Unsupported profile: " << profile; 96 LOG(ERROR) << "Unsupported profile: " << profile;
97 return false; 97 return false;
98 } 98 }
99 99
100 // Only consider using MediaCodec if it's likely backed by hardware. 100 // Only consider using MediaCodec if it's likely backed by hardware.
101 if (media::VideoCodecBridge::IsKnownUnaccelerated( 101 if (media::VideoCodecBridge::IsKnownUnaccelerated(
102 codec_, media::MEDIA_CODEC_DECODER)) { 102 codec_, media::MEDIA_CODEC_DECODER)) {
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 void AndroidVideoDecodeAccelerator::NotifyResetDone() { 552 void AndroidVideoDecodeAccelerator::NotifyResetDone() {
553 client_->NotifyResetDone(); 553 client_->NotifyResetDone();
554 } 554 }
555 555
556 void AndroidVideoDecodeAccelerator::NotifyError( 556 void AndroidVideoDecodeAccelerator::NotifyError(
557 media::VideoDecodeAccelerator::Error error) { 557 media::VideoDecodeAccelerator::Error error) {
558 client_->NotifyError(error); 558 client_->NotifyError(error);
559 } 559 }
560 560
561 } // namespace content 561 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/media/android_video_encode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698