def eventsource_request_sent(session, result, _data): print("request sent") input_stream = session.send_finish(result) if input_stream: data_input_stream = Gio.DataInputStream.new(input_stream) read_eventstream_line(data_input_stream) else: print("error") Owr.quit()
def reset(): global LOCAL_SOURCES, TRANSPORT_AGENT, ALL_SESSIONS print("Reset") for session, session_data in ALL_SESSIONS: session.set_send_source(None) ALL_SESSIONS = [] TRANSPORT_AGENT = None LOCAL_SOURCES = [] Owr.get_capture_sources(Owr.MediaType.VIDEO, got_local_sources)
def main(): mc = GLib.MainContext.get_thread_default() if not mc: mc = GLib.MainContext.default() Owr.init(mc) Owr.get_capture_sources(Owr.MediaType.VIDEO, got_local_sources) Owr.run() print("exiting")