| 195 | } |
| 196 | |
| 197 | void 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 | |
| 214 | void streamfx::obs::source_tracker::source_rename_handler(void* ptr, calldata_t* data) noexcept |
| 215 | { |
nothing calls this directly
no test coverage detected