Пример #1
0
def register_output_stream_callbacks(output_name):
    output = obs.obs_get_output_by_name(output_name)
    signal_handler = obs.obs_output_get_signal_handler(output)
    obs.signal_handler_connect(signal_handler, "start",
                               load_start_url_streamcb)
    obs.signal_handler_connect(signal_handler, "stop", load_stop_url_streamcb)
    obs.obs_output_release(output)
Пример #2
0
def remove_output_rec_callbacks(output_name):
    output = obs.obs_get_output_by_name(output_name)
    signal_handler = obs.obs_output_get_signal_handler(output)
    obs.signal_handler_disconnect(signal_handler, "start",
                                  load_start_url_reccb)
    obs.signal_handler_disconnect(signal_handler, "stop", load_stop_url_reccb)
    obs.obs_output_release(output)
    def destroy_match_video_output():
        global output, output_video_encoder, output_audio_encoder

        print(f'Destroying match video OBS output')

        if not output:
            print(f'WARNING: Match video OBS output does not exist')
            print()
            return

        # release output (which should then be garbage collected)
        obs.obs_output_release(output)
        output = None
        obs.obs_encoder_release(output_video_encoder)
        output_video_encoder = None
        obs.obs_encoder_release(output_audio_encoder)
        output_audio_encoder = None

        print()