diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2018-08-17 03:04:25 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2018-08-17 03:04:25 +0000 |
commit | 79510b3a93d2544972fd8fadf2e9763f8c501180 (patch) | |
tree | c522fc8fd077e0eaab62a665109b0da2a338a452 | |
parent | e0430426ff106ffb9a56b521d5924dd190955ded (diff) | |
parent | b4ef939d046d805c7c270466213ee7c3319fee96 (diff) | |
download | v4l2_codec2-79510b3a93d2544972fd8fadf2e9763f8c501180.tar.gz |
Snap for 4959688 from b4ef939d046d805c7c270466213ee7c3319fee96 to pi-qpr1-releaseandroid-9.0.0_r16pie-qpr1-s1-release
Change-Id: I326102df08d287d86f6c4ff39bf72565422fccf7
-rw-r--r-- | C2VDAComponent.cpp | 13 | ||||
-rw-r--r-- | include/C2VDAComponent.h | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/C2VDAComponent.cpp b/C2VDAComponent.cpp index 65656e3..1f30f7d 100644 --- a/C2VDAComponent.cpp +++ b/C2VDAComponent.cpp @@ -147,10 +147,11 @@ C2VDAComponent::IntfImpl::IntfImpl(C2String name, const std::shared_ptr<C2Reflec bool secureMode = name.find(".secure") != std::string::npos; C2Allocator::id_t inputAllocators[] = {secureMode ? C2VDAAllocatorStore::SECURE_LINEAR : C2PlatformAllocatorStore::ION}; - C2Allocator::id_t outputAllocators[] = {secureMode ? C2VDAAllocatorStore::SECURE_GRAPHIC - : C2VDAAllocatorStore::V4L2_BUFFERQUEUE}; - // TODO: change as below after ag/4660016 is landed. - // C2Allocator::id_t outputAllocators[] = {C2VDAAllocatorStore::V4L2_BUFFERPOOL}; + + C2Allocator::id_t outputAllocators[] = {C2VDAAllocatorStore::V4L2_BUFFERPOOL}; + + C2Allocator::id_t surfaceAllocator = secureMode ? C2VDAAllocatorStore::SECURE_GRAPHIC + : C2VDAAllocatorStore::V4L2_BUFFERQUEUE; addParameter( DefineParam(mInputAllocatorIds, C2_PARAMKEY_INPUT_ALLOCATORS) @@ -162,6 +163,10 @@ C2VDAComponent::IntfImpl::IntfImpl(C2String name, const std::shared_ptr<C2Reflec .withConstValue(C2PortAllocatorsTuning::output::AllocShared(outputAllocators)) .build()); + addParameter(DefineParam(mOutputSurfaceAllocatorId, C2_PARAMKEY_OUTPUT_SURFACE_ALLOCATOR) + .withConstValue(new C2PortSurfaceAllocatorTuning::output(surfaceAllocator)) + .build()); + C2BlockPool::local_id_t outputBlockPools[] = {kDefaultOutputBlockPool}; addParameter( diff --git a/include/C2VDAComponent.h b/include/C2VDAComponent.h index cfd828d..254b9b0 100644 --- a/include/C2VDAComponent.h +++ b/include/C2VDAComponent.h @@ -63,6 +63,8 @@ public: std::shared_ptr<C2PortAllocatorsTuning::input> mInputAllocatorIds; // The suggested usage of output buffer allocator ID. std::shared_ptr<C2PortAllocatorsTuning::output> mOutputAllocatorIds; + // The suggested usage of output buffer allocator ID with surface. + std::shared_ptr<C2PortSurfaceAllocatorTuning::output> mOutputSurfaceAllocatorId; // Compnent uses this ID to fetch corresponding output block pool from platform. std::shared_ptr<C2PortBlockPoolsTuning::output> mOutputBlockPoolIds; |