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

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

Issue 2693653003: Merge M57: "Make setOutputSurface, encrypted capabilities. Blacklist hi6210sft." (Closed)
Patch Set: Created 3 years, 10 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 | « media/filters/gpu_video_decoder.cc ('k') | media/video/video_decode_accelerator.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 (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 "media/gpu/android_video_decode_accelerator.h" 5 #include "media/gpu/android_video_decode_accelerator.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 SupportedProfile profile; 1401 SupportedProfile profile;
1402 profile.profile = supported_profile; 1402 profile.profile = supported_profile;
1403 profile.min_resolution.SetSize(0, 0); 1403 profile.min_resolution.SetSize(0, 0);
1404 // Advertise support for 4k and let the MediaCodec fail when decoding if it 1404 // Advertise support for 4k and let the MediaCodec fail when decoding if it
1405 // doesn't support the resolution. It's assumed that consumers won't have 1405 // doesn't support the resolution. It's assumed that consumers won't have
1406 // software fallback for H264 on Android anyway. 1406 // software fallback for H264 on Android anyway.
1407 profile.max_resolution.SetSize(3840, 2160); 1407 profile.max_resolution.SetSize(3840, 2160);
1408 profiles.push_back(profile); 1408 profiles.push_back(profile);
1409 } 1409 }
1410 1410
1411 capabilities.flags = 1411 capabilities.flags = Capabilities::SUPPORTS_DEFERRED_INITIALIZATION |
1412 VideoDecodeAccelerator::Capabilities::SUPPORTS_DEFERRED_INITIALIZATION; 1412 Capabilities::NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE |
1413 capabilities.flags |= 1413 Capabilities::SUPPORTS_ENCRYPTED_STREAMS;
1414 VideoDecodeAccelerator::Capabilities::NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE;
1415 1414
1416 // If we're using threaded texture mailboxes the COPY_REQUIRED flag must be 1415 // If we're using threaded texture mailboxes the COPY_REQUIRED flag must be
1417 // set on the video frames (http://crbug.com/582170), and SurfaceView output 1416 // set on the video frames (http://crbug.com/582170), and SurfaceView output
1418 // is disabled (http://crbug.com/582170). 1417 // is disabled (http://crbug.com/582170).
1419 if (gpu_preferences.enable_threaded_texture_mailboxes) { 1418 if (gpu_preferences.enable_threaded_texture_mailboxes) {
1420 capabilities.flags |= 1419 capabilities.flags |= Capabilities::REQUIRES_TEXTURE_COPY;
1421 VideoDecodeAccelerator::Capabilities::REQUIRES_TEXTURE_COPY;
1422 } else if (MediaCodecUtil::IsSurfaceViewOutputSupported()) { 1420 } else if (MediaCodecUtil::IsSurfaceViewOutputSupported()) {
1423 capabilities.flags |= 1421 capabilities.flags |= Capabilities::SUPPORTS_EXTERNAL_OUTPUT_SURFACE;
1424 VideoDecodeAccelerator::Capabilities::SUPPORTS_EXTERNAL_OUTPUT_SURFACE; 1422 if (MediaCodecUtil::IsSetOutputSurfaceSupported())
1423 capabilities.flags |= Capabilities::SUPPORTS_SET_EXTERNAL_OUTPUT_SURFACE;
1425 } 1424 }
1426 1425
1427 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) 1426 #if BUILDFLAG(ENABLE_HEVC_DEMUXING)
1428 for (const auto& supported_profile : kSupportedHevcProfiles) { 1427 for (const auto& supported_profile : kSupportedHevcProfiles) {
1429 SupportedProfile profile; 1428 SupportedProfile profile;
1430 profile.profile = supported_profile; 1429 profile.profile = supported_profile;
1431 profile.min_resolution.SetSize(0, 0); 1430 profile.min_resolution.SetSize(0, 0);
1432 profile.max_resolution.SetSize(3840, 2160); 1431 profile.max_resolution.SetSize(3840, 2160);
1433 profiles.push_back(profile); 1432 profiles.push_back(profile);
1434 } 1433 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1507 if (!media_codec_) 1506 if (!media_codec_)
1508 return; 1507 return;
1509 1508
1510 picture_buffer_manager_.CodecChanged(nullptr); 1509 picture_buffer_manager_.CodecChanged(nullptr);
1511 AVDACodecAllocator::Instance()->ReleaseMediaCodec( 1510 AVDACodecAllocator::Instance()->ReleaseMediaCodec(
1512 std::move(media_codec_), codec_config_->task_type, config_.surface_id); 1511 std::move(media_codec_), codec_config_->task_type, config_.surface_id);
1513 last_release_task_type_ = codec_config_->task_type; 1512 last_release_task_type_ = codec_config_->task_type;
1514 } 1513 }
1515 1514
1516 } // namespace media 1515 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/gpu_video_decoder.cc ('k') | media/video/video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698