Fix bug where outputs wouldn't start up properly

This commit is contained in:
jp9000 2014-04-02 19:06:33 -07:00
parent 4a652ec82d
commit c25f10595d
2 changed files with 7 additions and 7 deletions

View File

@ -780,9 +780,9 @@ void OBSBasic::on_actionSourceDown_triggered()
{
}
void OBSBasic::OutputConnect(bool success)
void OBSBasic::OutputStart(int errorcode)
{
if (!success) {
if (errorcode != OBS_OUTPUT_SUCCESS) {
obs_output_destroy(outputTest);
outputTest = NULL;
} else {
@ -792,12 +792,12 @@ void OBSBasic::OutputConnect(bool success)
ui->streamButton->setEnabled(true);
}
static void OBSOutputConnect(void *data, calldata_t params)
static void OBSOutputStart(void *data, calldata_t params)
{
bool success = calldata_bool(params, "success");
int code = calldata_bool(params, "errorcode");
QMetaObject::invokeMethod(static_cast<OBSBasic*>(data),
"OutputConnect", Q_ARG(bool, success));
"OutputStart", Q_ARG(int, code));
}
/* TODO: lots of temporary code */
@ -836,7 +836,7 @@ void OBSBasic::on_streamButton_clicked()
return;
signal_handler_connect(obs_output_signalhandler(outputTest),
"start", OBSOutputConnect, this);
"start", OBSOutputStart, this);
obs_output_start(outputTest);
ui->streamButton->setEnabled(false);

View File

@ -61,7 +61,7 @@ private:
void InsertSceneItem(obs_sceneitem_t item);
public slots:
void OutputConnect(bool success);
void OutputStart(int errorcode);
private slots:
void AddSceneItem(OBSSceneItem item);