As anyone successfully managed the footprint size that a DeckLink board occupies in the RAM? Eg. If I'm recording PAL signals, I don't need support for 4k, so the extra buffer space is to be avoided.
If you are using the low level API create you own BMDAllocator and use SetVideoOutputFrameMemoryAllocator or SetVideoInputFrameMemoryAllocator ... and you decide how many buffers you will allow to be used
DeckLinkMemoryAllocator::DeckLinkMemoryAllocator(unsigned cacheSize) : mRefCount(1), mFrameCacheSize(cacheSize) // large cache size will keep more memory pinned and may result in out of memory errors { }
HRESULT STDMETHODCALLTYPE DeckLinkMemoryAllocator::ReleaseBuffer (void* buffer) { if (mFrameCache.size() < mFrameCacheSize) { mFrameCache.push_back(buffer); } else { // No room left in cache, so free this buffer VirtualFree(buffer, 0, MEM_RELEASE);
HRESULT STDMETHODCALLTYPE DeckLinkMemoryAllocator::Decommit () { while (! mFrameCache.empty()) { // Cleanup any frames allocated in AllocateBuffer() but not freed in ReleaseBuffer() VirtualFree(mFrameCache.back(), 0, MEM_RELEASE); mFrameCache.pop_back(); } return S_OK; }