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

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

Issue 2677983004: 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 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 SupportedProfile profile; 1488 SupportedProfile profile;
1489 profile.profile = supported_profile; 1489 profile.profile = supported_profile;
1490 profile.min_resolution.SetSize(0, 0); 1490 profile.min_resolution.SetSize(0, 0);
1491 // Advertise support for 4k and let the MediaCodec fail when decoding if it 1491 // Advertise support for 4k and let the MediaCodec fail when decoding if it
1492 // doesn't support the resolution. It's assumed that consumers won't have 1492 // doesn't support the resolution. It's assumed that consumers won't have
1493 // software fallback for H264 on Android anyway. 1493 // software fallback for H264 on Android anyway.
1494 profile.max_resolution.SetSize(3840, 2160); 1494 profile.max_resolution.SetSize(3840, 2160);
1495 profiles.push_back(profile); 1495 profiles.push_back(profile);
1496 } 1496 }
1497 1497
1498 capabilities.flags = 1498 capabilities.flags = Capabilities::SUPPORTS_DEFERRED_INITIALIZATION |
1499 VideoDecodeAccelerator::Capabilities::SUPPORTS_DEFERRED_INITIALIZATION; 1499 Capabilities::NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE |
1500 capabilities.flags |= 1500 Capabilities::SUPPORTS_ENCRYPTED_STREAMS;
1501 VideoDecodeAccelerator::Capabilities::NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE;
1502 1501
1503 // If we're using threaded texture mailboxes the COPY_REQUIRED flag must be 1502 // If we're using threaded texture mailboxes the COPY_REQUIRED flag must be
1504 // set on the video frames (http://crbug.com/582170), and SurfaceView output 1503 // set on the video frames (http://crbug.com/582170), and SurfaceView output
1505 // is disabled (http://crbug.com/582170). 1504 // is disabled (http://crbug.com/582170).
1506 if (gpu_preferences.enable_threaded_texture_mailboxes) { 1505 if (gpu_preferences.enable_threaded_texture_mailboxes) {
1507 capabilities.flags |= 1506 capabilities.flags |= Capabilities::REQUIRES_TEXTURE_COPY;
1508 VideoDecodeAccelerator::Capabilities::REQUIRES_TEXTURE_COPY;
1509 } else if (MediaCodecUtil::IsSurfaceViewOutputSupported()) { 1507 } else if (MediaCodecUtil::IsSurfaceViewOutputSupported()) {
1510 capabilities.flags |= 1508 capabilities.flags |= Capabilities::SUPPORTS_EXTERNAL_OUTPUT_SURFACE;
1511 VideoDecodeAccelerator::Capabilities::SUPPORTS_EXTERNAL_OUTPUT_SURFACE; 1509 if (MediaCodecUtil::IsSetOutputSurfaceSupported())
1510 capabilities.flags |= Capabilities::SUPPORTS_SET_EXTERNAL_OUTPUT_SURFACE;
1512 } 1511 }
1513 1512
1514 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) 1513 #if BUILDFLAG(ENABLE_HEVC_DEMUXING)
1515 for (const auto& supported_profile : kSupportedHevcProfiles) { 1514 for (const auto& supported_profile : kSupportedHevcProfiles) {
1516 SupportedProfile profile; 1515 SupportedProfile profile;
1517 profile.profile = supported_profile; 1516 profile.profile = supported_profile;
1518 profile.min_resolution.SetSize(0, 0); 1517 profile.min_resolution.SetSize(0, 0);
1519 profile.max_resolution.SetSize(3840, 2160); 1518 profile.max_resolution.SetSize(3840, 2160);
1520 profiles.push_back(profile); 1519 profiles.push_back(profile);
1521 } 1520 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 if (!media_codec_) 1593 if (!media_codec_)
1595 return; 1594 return;
1596 1595
1597 picture_buffer_manager_.CodecChanged(nullptr); 1596 picture_buffer_manager_.CodecChanged(nullptr);
1598 AVDACodecAllocator::Instance()->ReleaseMediaCodec( 1597 AVDACodecAllocator::Instance()->ReleaseMediaCodec(
1599 std::move(media_codec_), codec_config_->task_type, config_.surface_id); 1598 std::move(media_codec_), codec_config_->task_type, config_.surface_id);
1600 last_release_task_type_ = codec_config_->task_type; 1599 last_release_task_type_ = codec_config_->task_type;
1601 } 1600 }
1602 1601
1603 } // namespace media 1602 } // 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