Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65590cef authored by Wonsik Kim's avatar Wonsik Kim Committed by Automerger Merge Worker
Browse files

Merge "components: fix default allocators list" into rvc-dev am: a3e42f87 am: 9de8655f

Change-Id: I1b8bcb35af917f0b4ecbda29178aea2df9288944
parents 7d26bb71 9de8655f
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -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: