INNER CODE UNIT · C++
backgroundMask
royshil/obs-backgroundremoval · src/background-filter.cpp:515
backgroundMask = 255 - outputImage;
}
}
void background_filter_video_tick(void *data, float seconds)
{
UNUSED_PARAMETER(seconds);
// Cast to shared_ptr pointer and create a local shared_ptr
auto *ptr = static_cast<std::shared_ptr<background_removal_filter> *>(data);
if (!ptr) {
return;
}
// Create a local shared_ptr
// This guarantees the object stays alive for the duration of this function scope
// even if filter_destroy is called on the main thread
std::shared_ptr<background_removal_filter> tf = *ptr;