Hi,
So I've created a new Python script based on the one here https://obsproject.com/forum/thread...-encoding-good-for-learning-python-api.86047/
But I have noticed that the moment that I modify my Output settings (eg. key interval), then these callback methods do not get invoked any more, until I reload the Python scripts.
The handler is connected using the below Python code:
I've looked through the API and could not find a way using Python to listen for config/output setting changes and then reattach my signal handlers.
One very dirty way for me would be to add a timer and at say 1s intervals check if the old signal handler is equal to the current signal handler, and if not, disconnect old & connect new one.
It is not often that I'll have this issue, but I want to have my script as bulletproof as possible for the volunteers in my team.
Any guidance / recommendations on how to handle this would be much appreciated!
So I've created a new Python script based on the one here https://obsproject.com/forum/thread...-encoding-good-for-learning-python-api.86047/
But I have noticed that the moment that I modify my Output settings (eg. key interval), then these callback methods do not get invoked any more, until I reload the Python scripts.
The handler is connected using the below Python code:
Python:
recording_signal_handler = obs.obs_output_get_signal_handler(obs.obs_frontend_get_recording_output())
obs.signal_handler_connect(recording_signal_handler, "stop", cb_recording_stop)
I've looked through the API and could not find a way using Python to listen for config/output setting changes and then reattach my signal handlers.
One very dirty way for me would be to add a timer and at say 1s intervals check if the old signal handler is equal to the current signal handler, and if not, disconnect old & connect new one.
It is not often that I'll have this issue, but I want to have my script as bulletproof as possible for the volunteers in my team.
Any guidance / recommendations on how to handle this would be much appreciated!