Snap for 4959688 from b4ef939d046d805c7c270466213ee7c3319fee96 to pi-qpr1-release
Change-Id: I326102df08d287d86f6c4ff39bf72565422fccf7
diff --git a/C2VDAComponent.cpp b/C2VDAComponent.cpp
index 65656e3..1f30f7d 100644
--- a/C2VDAComponent.cpp
+++ b/C2VDAComponent.cpp
@@ -147,10 +147,11 @@
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 @@
.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 @@
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;