Files
Bruno Martins 70abb57ff2 compat: Add legacy Codec2 allocator and block pool wrappers
Forward legacy plugin-loader calls using the default deleters and
construct pooled block pools with VER_HIDL, preserving the implicit
this pointer.

Assisted-by: LLM
Change-Id: If76a0edd3bb740501cb157a9fa8f1c93691d1706
2026-10-17 10:28:35 +01:00

23 lines
1.0 KiB
C++

/*
* SPDX-FileCopyrightText: The LineageOS Project
* SPDX-License-Identifier: Apache-2.0
*/
#include <C2BufferPriv.h>
extern "C" void
pooledBlockPoolCurrent(C2PooledBlockPool* self, const std::shared_ptr<C2Allocator>& allocator, C2BlockPool::local_id_t localId, C2PooledBlockPool::BufferPoolVer ver) __asm__(
"_ZN17C2PooledBlockPoolC1ERKNSt3__110shared_ptrI11C2AllocatorEEmNS_13BufferPoolVerE");
extern "C" void pooledBlockPoolLegacy(
C2PooledBlockPool* self, const std::shared_ptr<C2Allocator>& allocator,
C2BlockPool::local_id_t
localId) __asm__("_ZN17C2PooledBlockPoolC1ERKNSt3__110shared_ptrI11C2AllocatorEEm");
// Constructor symbols receive the implicit this pointer before their declared arguments.
extern "C" void pooledBlockPoolLegacy(C2PooledBlockPool* self,
const std::shared_ptr<C2Allocator>& allocator,
C2BlockPool::local_id_t localId) {
pooledBlockPoolCurrent(self, allocator, localId, C2PooledBlockPool::VER_HIDL);
}