mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-30 23:33:02 +00:00
source-mirror: Ensure that we have a source on video_tick
This commit is contained in:
parent
5e4a781912
commit
e621b69aa2
2 changed files with 11 additions and 1 deletions
|
@ -319,9 +319,18 @@ void Source::Mirror::deactivate() {
|
|||
m_active = false;
|
||||
}
|
||||
|
||||
void Source::Mirror::video_tick(float) {
|
||||
void Source::Mirror::video_tick(float time) {
|
||||
m_tick += time;
|
||||
|
||||
if (m_mirrorSource) {
|
||||
m_mirrorName = obs_source_get_name(m_mirrorSource->get_object());
|
||||
} else {
|
||||
if (m_tick > 0.1f) {
|
||||
obs_data_t* ref = obs_source_get_settings(m_source);
|
||||
update(ref);
|
||||
obs_data_release(ref);
|
||||
m_tick -= 0.1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ namespace Source {
|
|||
class Mirror {
|
||||
bool m_active;
|
||||
obs_source_t* m_source = nullptr;
|
||||
float_t m_tick = 0;
|
||||
|
||||
// Input Source
|
||||
std::string m_mirrorName;
|
||||
|
|
Loading…
Reference in a new issue