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

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

Issue 1796393002: Remove Exynos from MediaCodec blacklist. Limit MediaTek blacklist. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert hunks. Created 4 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
« no previous file with comments | « no previous file | media/base/android/media_codec_util.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_encode_accelerator.h" 5 #include "content/common/gpu/media/android_video_encode_accelerator.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 const struct { 107 const struct {
108 const media::VideoCodec codec; 108 const media::VideoCodec codec;
109 const media::VideoCodecProfile profile; 109 const media::VideoCodecProfile profile;
110 } kSupportedCodecs[] = { 110 } kSupportedCodecs[] = {
111 { media::kCodecVP8, media::VP8PROFILE_ANY }, 111 { media::kCodecVP8, media::VP8PROFILE_ANY },
112 { media::kCodecH264, media::H264PROFILE_BASELINE }, 112 { media::kCodecH264, media::H264PROFILE_BASELINE },
113 { media::kCodecH264, media::H264PROFILE_MAIN } 113 { media::kCodecH264, media::H264PROFILE_MAIN }
114 }; 114 };
115 115
116 for (const auto& supported_codec : kSupportedCodecs) { 116 for (const auto& supported_codec : kSupportedCodecs) {
117 if (supported_codec.codec == media::kCodecVP8 &&
118 !media::MediaCodecUtil::IsVp8EncoderAvailable()) {
119 continue;
120 }
121
117 if (VideoCodecBridge::IsKnownUnaccelerated(supported_codec.codec, 122 if (VideoCodecBridge::IsKnownUnaccelerated(supported_codec.codec,
118 media::MEDIA_CODEC_ENCODER)) { 123 media::MEDIA_CODEC_ENCODER)) {
119 continue; 124 continue;
120 } 125 }
121 126
122 SupportedProfile profile; 127 SupportedProfile profile;
123 profile.profile = supported_codec.profile; 128 profile.profile = supported_codec.profile;
124 // It would be nice if MediaCodec exposes the maximum capabilities of 129 // It would be nice if MediaCodec exposes the maximum capabilities of
125 // the encoder. Hard-code some reasonable defaults as workaround. 130 // the encoder. Hard-code some reasonable defaults as workaround.
126 profile.max_resolution.SetSize(kMaxEncodeFrameWidth, 131 profile.max_resolution.SetSize(kMaxEncodeFrameWidth,
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 base::MessageLoop::current()->PostTask( 437 base::MessageLoop::current()->PostTask(
433 FROM_HERE, 438 FROM_HERE,
434 base::Bind(&VideoEncodeAccelerator::Client::BitstreamBufferReady, 439 base::Bind(&VideoEncodeAccelerator::Client::BitstreamBufferReady,
435 client_ptr_factory_->GetWeakPtr(), 440 client_ptr_factory_->GetWeakPtr(),
436 bitstream_buffer.id(), 441 bitstream_buffer.id(),
437 size, 442 size,
438 key_frame)); 443 key_frame));
439 } 444 }
440 445
441 } // namespace content 446 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/base/android/media_codec_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698