Merge "components: fix default allocators list" into rvc-dev

gugelfrei
Wonsik Kim 4 years ago committed by Android (Google) Code Review
commit a3e42f87b6

@ -21,6 +21,7 @@
// use MediaDefs here vs. MediaCodecConstants as this is not MediaCodec specific/dependent
#include <media/stagefright/foundation/MediaDefs.h>
#include <C2PlatformSupport.h>
#include <SimpleC2Interface.h>
namespace android {
@ -85,22 +86,24 @@ SimpleInterface<void>::BaseParams::BaseParams(
C2Allocator::id_t rawAllocator = C2AllocatorStore::DEFAULT_LINEAR;
C2BlockPool::local_id_t rawPoolId = C2BlockPool::BASIC_LINEAR;
C2BufferData::type_t codedBufferType = C2BufferData::LINEAR;
C2Allocator::id_t codedAllocator = C2AllocatorStore::DEFAULT_LINEAR;
int poolMask = GetCodec2PoolMask();
C2Allocator::id_t preferredLinearId = GetPreferredLinearAllocatorId(poolMask);
C2Allocator::id_t codedAllocator = preferredLinearId;
C2BlockPool::local_id_t codedPoolId = C2BlockPool::BASIC_LINEAR;
switch (domain) {
case C2Component::DOMAIN_IMAGE:
case C2Component::DOMAIN_IMAGE: [[fallthrough]];
case C2Component::DOMAIN_VIDEO:
// TODO: should we define raw image? The only difference is timestamp handling
rawBufferType = C2BufferData::GRAPHIC;
rawMediaType = MEDIA_MIMETYPE_VIDEO_RAW;
rawAllocator = C2AllocatorStore::DEFAULT_GRAPHIC;
rawAllocator = C2PlatformAllocatorStore::GRALLOC;
rawPoolId = C2BlockPool::BASIC_GRAPHIC;
break;
case C2Component::DOMAIN_AUDIO:
rawBufferType = C2BufferData::LINEAR;
rawMediaType = MEDIA_MIMETYPE_AUDIO_RAW;
rawAllocator = C2AllocatorStore::DEFAULT_LINEAR;
rawAllocator = preferredLinearId;
rawPoolId = C2BlockPool::BASIC_LINEAR;
break;
default:

Loading…
Cancel
Save