MCPcopy Create free account
hub / github.com/Vhonowslend/StreamFX-Public / source_destroy_handler

Method source_destroy_handler

source/obs/obs-source-tracker.cpp:197–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197void streamfx::obs::source_tracker::source_destroy_handler(void* ptr, calldata_t* data) noexcept
198{
199 auto* self = reinterpret_cast<streamfx::obs::source_tracker*>(ptr);
200 try {
201 obs_source_t* source = nullptr;
202 if (calldata_get_ptr(data, "source", &source); !source) {
203 throw std::runtime_error("Missing 'source' parameter.");
204 }
205
206 self->remove_source(source);
207 } catch (const std::exception& ex) {
208 DLOG_ERROR("Event 'source_destroy' caused exception: %s", ex.what());
209 } catch (...) {
210 DLOG_ERROR("Event 'source_destroy' caused unknown exception.", nullptr);
211 }
212}
213
214void streamfx::obs::source_tracker::source_rename_handler(void* ptr, calldata_t* data) noexcept
215{

Callers

nothing calls this directly

Calls 1

remove_sourceMethod · 0.95

Tested by

no test coverage detected