def monitor_source_callback(calldata): source = obs.calldata_source(calldata, 'source') if not source: return if obs.obs_source_get_type(source) == obs.OBS_SOURCE_TYPE_INPUT: monitor_source(source)
def source_deactivated(calldata): source = obs.calldata_source(calldata, "source") if source is not None: name = obs.obs_source_get_name(source) if name == LATEST_SUBSCRIBER_SOURCE and TRACKING_SUBSCRIBERS: obs.timer_remove(update_latest_subscriber)
def source_deactivated(calldata): source = obs.calldata_source(calldata, "source") if source is not None: name = obs.obs_source_get_name(source) if name == LATEST_FOLLOWER_SOURCE and TRACKING_FOLLOWERS: obs.timer_remove(update_latest_follower)
def source_activated(calldata): source = obs.calldata_source(calldata, "source") if source is not None: name = obs.obs_source_get_name(source) if name == LATEST_SUBSCRIBER_SOURCE and not TRACKING_SUBSCRIBERS: update_latest_subscriber() obs.timer_add(update_latest_subscriber, UPDATE_INTERVAL * 1000)
def source_activated(cd): global pleaseLog source = obs.calldata_source(cd, "source") if source is not None: name = obs.obs_source_get_name(source) if name[0] == "/": client.send_message(name, 1) if (pleaseLog): print("send " + name)
def activate_signal(cd, activating): """ Called when source is activated / deactivated """ _source = obs.calldata_source(cd, "text_source") if _source: _name = obs.obs_source_get_name(_source) if (_name == _name): activate(activating)
def source_shown(stuff): source = obs.calldata_source(stuff, "source") print(obs.obs_source_get_name(source)) if obs.obs_source_active( source ): #should never happen unless handlers fire in a weird order print("TODO: set live tally") else: print("TODO: set preview tally") obs.obs_source_release(source)
def change(s, enabled): source = obs.calldata_source(s, 'source') if source is not None: source_type = obs.obs_source_get_id(source) name = obs.obs_source_get_name(source) print('detected change in ' + name + ' (' + source_type + ')') if len(config.source_types) == 0 or source_type in config.source_types: print('informing') requests.put(config.server + '/change', json={ 'enabled': [name], })
def source_activated(calldata): global verbose global config_valid global sources global messages_and_bundles if config_valid: source = obs.calldata_source(calldata, "source") if source is not None: source_name = obs.obs_source_get_name(source) if source_name in sources: msg = sources[source_name] if verbose: print("Source \"" + source_name + "\" activated. Sending the message/bundle \"" + msg + "\".") send_bundle_or_message(messages_and_bundles[msg])
def source_activated(stuff): source = obs.calldata_source(stuff, "source") print(obs.obs_source_get_name(source)) print("TODO: set live tally") if handler_name == "activate": print("TODO: set live tally") elif handler_name == "deactivate": if obs.obs_source_showing(source): print("TODO: set preview tally") else: print("TODO: clear tally") elif handler_name == "show": if obs.obs_source_active( source ): #should never happen unless handlers fire in a weird order print("TODO: set live tally") else: print("TODO: set preview tally") elif handler_name == "hide": print("TODO: clear tally") else: print("TODO: clear tally")
def source_hidden(stuff): source = obs.calldata_source(stuff, "source") print(obs.obs_source_get_name(source)) print("TODO: clear tally") obs.obs_source_release(source)