Loading media/codec2/components/base/SimpleC2Interface.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -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 { Loading Loading @@ -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 Loading
media/codec2/components/base/SimpleC2Interface.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -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 { Loading Loading @@ -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