Skip to content
This repository has been archived by the owner on Jul 21, 2020. It is now read-only.

Commit

Permalink
moved the starting of ftl-express until everything has been authentic…
Browse files Browse the repository at this point in the history
…ated with the server
  • Loading branch information
sslivins committed Jul 10, 2016
1 parent 327d3b3 commit 3f0bdcb
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 42 deletions.
2 changes: 1 addition & 1 deletion build_scripts/build_tachyon_windows_vs.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
REM check for cef binary
REM check for dependencies (ffmpeg, etc)
SET build_config=Release
SET obs_version=1.2.6
SET obs_version=1.2.8
SET cef_binary_dir=C:\beam\cef_binary
SET cef_release_dir=C:\beam\obs-browser-1.22
SET coredeps=C:\beam\tachyon_deps
Expand Down
2 changes: 1 addition & 1 deletion build_scripts/tachyon_windows_installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Tachyon"
!define DEFAULT_INST_DIR "$PROGRAMFILES\${PRODUCT_NAME}"
!define PRODUCT_VERSION "1.2.6"
!define PRODUCT_VERSION "1.2.8"
!define PRODUCT_PUBLISHER "Beam Interactive"
!define PRODUCT_WEB_SITE "http://beam.pro"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\tachyon64.exe"
Expand Down
81 changes: 41 additions & 40 deletions plugins/obs-ffmpeg/obs-ffmpeg-output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1190,47 +1190,8 @@ static int try_connect(struct ffmpeg_output *output)
return OBS_OUTPUT_ERROR;
}

/* Glue together the ingest URL */
int size = 0;

#ifdef _WIN32
swprintf(ftl_ingest_arg, sizeof(ftl_ingest_arg)/sizeof(wchar_t), L"-rtpingestaddr=%hs:8082", config.ingest_location);
blog(LOG_WARNING, "FTL ingest args are: %S\n", ftl_ingest_arg);
ZeroMemory( &output->ShExecInfo, sizeof(output->ShExecInfo) );
output->ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
output->ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; //SEE_MASK_WAITFORINPUTIDLE
output->ShExecInfo.hwnd = NULL;
output->ShExecInfo.lpVerb = L"open";
output->ShExecInfo.lpFile = L"ftl-express.exe";
output->ShExecInfo.lpParameters = ftl_ingest_arg;
output->ShExecInfo.lpDirectory = NULL;
output->ShExecInfo.nShow = /*SW_SHOW;*/SW_HIDE;
output->ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&output->ShExecInfo);
SetPriorityClass(output->ShExecInfo.hProcess, HIGH_PRIORITY_CLASS);
#elif __APPLE__

#else
snprintf(ftl_ingest_arg, sizeof(ftl_ingest_arg), "-rtpingestaddr=%s:8082", config.ingest_location);
blog(LOG_WARNING, "FTL ingest args are: %s\n", ftl_ingest_arg);
/* print error message if fork() fails */
blog(LOG_WARNING, "Forking Process\n");

if((output->ftl_express_pid = fork()) < 0 )
{
blog(LOG_ERROR, "call to fork failed\n");
return OBS_OUTPUT_ERROR;
}

if(output->ftl_express_pid == 0)
{
execlp("ftl-express", "ftl-express", ftl_ingest_arg, NULL);

blog(LOG_ERROR, "failed to start ftl-express\n");
exit(1);
}
#endif

int size = 0;
//size = snprintf(config.url, 2048, "rtp://%s:8082?pkt_size=1350", config.ingest_location);
size = snprintf(config.url, 2048, "rtp://%s:8082?pkt_size=1350", "127.0.0.1");
if (size == 2048) {
Expand Down Expand Up @@ -1333,6 +1294,46 @@ static int try_connect(struct ffmpeg_output *output)
return OBS_OUTPUT_ERROR;
}

/* Glue together the ingest URL */

#ifdef _WIN32
swprintf(ftl_ingest_arg, sizeof(ftl_ingest_arg)/sizeof(wchar_t), L"-rtpingestaddr=%hs:8082", config.ingest_location);
blog(LOG_WARNING, "FTL ingest args are: %S\n", ftl_ingest_arg);
ZeroMemory( &output->ShExecInfo, sizeof(output->ShExecInfo) );
output->ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
output->ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; //SEE_MASK_WAITFORINPUTIDLE
output->ShExecInfo.hwnd = NULL;
output->ShExecInfo.lpVerb = L"open";
output->ShExecInfo.lpFile = L"ftl-express.exe";
output->ShExecInfo.lpParameters = ftl_ingest_arg;
output->ShExecInfo.lpDirectory = NULL;
output->ShExecInfo.nShow = /*SW_SHOW;*/SW_HIDE;
output->ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&output->ShExecInfo);
SetPriorityClass(output->ShExecInfo.hProcess, HIGH_PRIORITY_CLASS);
#elif __APPLE__

#else
snprintf(ftl_ingest_arg, sizeof(ftl_ingest_arg), "-rtpingestaddr=%s:8082", config.ingest_location);
blog(LOG_WARNING, "FTL ingest args are: %s\n", ftl_ingest_arg);
/* print error message if fork() fails */
blog(LOG_WARNING, "Forking Process\n");

if((output->ftl_express_pid = fork()) < 0 )
{
blog(LOG_ERROR, "call to fork failed\n");
return OBS_OUTPUT_ERROR;
}

if(output->ftl_express_pid == 0)
{
execlp("ftl-express", "ftl-express", ftl_ingest_arg, NULL);

blog(LOG_ERROR, "failed to start ftl-express\n");
exit(1);
}
#endif

obs_output_set_video_conversion(output->output, NULL);
obs_output_set_audio_conversion(output->output, &aci);
obs_output_begin_data_capture(output->output, 0);
Expand Down

0 comments on commit 3f0bdcb

Please sign in to comment.