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

Method insert_source

source/obs/obs-source-tracker.cpp:93–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void streamfx::obs::source_tracker::insert_source(obs_source_t* source)
94{
95 const char* name = obs_source_get_name(source);
96
97 // Don't track unnamed sources.
98 if (!name || (strnlen(name, 1) == 0)) {
99 D_LOG_DEBUG("Unnamed source '0x%08zX' left untracked.", source);
100 return;
101 }
102
103 // Insert the newly tracked source into the map.
104 std::lock_guard<decltype(_mutex)> lock(_mutex);
105 _sources.emplace(std::string{name}, ::streamfx::obs::weak_source{source});
106}
107
108void streamfx::obs::source_tracker::remove_source(obs_source_t* source)
109{

Callers 2

source_trackerMethod · 0.95
source_create_handlerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected