Browse Source

libobs: Add timeout_sec param to reconnect signal

This optionally allows the front-end to know what the current timeout
value in seconds is set to for the reconnection without having to call
an extra API function to find that out.
jp9000 10 năm trước cách đây
mục cha
commit
691d3b4a73
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      libobs/obs-output.c

+ 6 - 1
libobs/obs-output.c

@@ -1026,7 +1026,12 @@ static inline void signal_start(struct obs_output *output)
 
 static inline void signal_reconnect(struct obs_output *output)
 {
-	do_output_signal(output, "reconnect");
+	struct calldata params = {0};
+	calldata_set_int(&params, "timeout_sec",
+			output->reconnect_retry_sec);
+	calldata_set_ptr(&params, "output", output);
+	signal_handler_signal(output->context.signals, "reconnect", &params);
+	calldata_free(&params);
 }
 
 static inline void signal_reconnect_success(struct obs_output *output)