UI: Add popup warnings for connection failure

Also, check for null stream path/key in the RTMP output module.
This commit is contained in:
jp9000
2014-05-12 15:30:36 -07:00
parent fa22417f8c
commit 03ca5919ce
7 changed files with 90 additions and 28 deletions

View File

@@ -30,5 +30,5 @@
#define OBS_OUTPUT_BAD_PATH -1
#define OBS_OUTPUT_CONNECT_FAILED -2
#define OBS_OUTPUT_INVALID_STREAM -3
#define OBS_OUTPUT_FAIL -4
#define OBS_OUTPUT_ERROR -4
#define OBS_OUTPUT_DISCONNECTED -5

View File

@@ -37,8 +37,10 @@ const char *obs_output_getdisplayname(const char *id, const char *locale)
}
static const char *output_signals[] = {
"void start(ptr output, int errorcode)",
"void stop(ptr output)",
"void start(ptr output)",
"void stop(ptr output, int code)",
"void reconnect(ptr output)",
"void reconnect_success(ptr output)",
NULL
};
@@ -519,7 +521,7 @@ static inline void signal_start(struct obs_output *output)
static inline void signal_stop(struct obs_output *output, int code)
{
struct calldata params = {0};
calldata_setint(&params, "errorcode", code);
calldata_setint(&params, "code", code);
calldata_setptr(&params, "output", output);
signal_handler_signal(output->context.signals, "stop", &params);
calldata_free(&params);

View File

@@ -28,6 +28,13 @@
extern "C" {
#endif
#define STRINGIFY(x) #x
#define STRINGIFY_(x) STRINGIFY(x)
#define S__LINE__ STRINGIFY_(__LINE__)
#define INT_CUR_LINE __LINE__
#define FILE_LINE __FILE__ " (" S__LINE__ "): "
enum {
/**
* Use if there's a problem that can potentially affect the program,