UI: Allow file name generation without spaces

This will probably go away once proper file name formatting is
implemented (https://obsproject.com/mantis/view.php?id=361)
This commit is contained in:
Palana
2015-11-27 15:48:30 +01:00
parent 1cd98ae008
commit 124ccb68de
7 changed files with 98 additions and 37 deletions
+10 -2
View File
@@ -430,6 +430,8 @@ bool SimpleOutput::StartRecording()
"SimpleOutput", "RecFormat");
const char *mux = config_get_string(main->Config(), "SimpleOutput",
"MuxerCustom");
bool noSpace = config_get_bool(main->Config(), "SimpleOutput",
"FileNameWithoutSpace");
os_dir_t *dir = path ? os_opendir(path) : nullptr;
@@ -449,7 +451,8 @@ bool SimpleOutput::StartRecording()
if (lastChar != '/' && lastChar != '\\')
strPath += "/";
strPath += GenerateTimeDateFilename(ffmpegOutput ? "avi" : format);
strPath += GenerateTimeDateFilename(ffmpegOutput ? "avi" : format,
noSpace);
SetupOutputs();
@@ -931,6 +934,7 @@ bool AdvancedOutput::StartRecording()
{
const char *path;
const char *format;
bool noSpace = false;
if (!useStreamEncoder) {
if (!ffmpegOutput) {
@@ -950,6 +954,10 @@ bool AdvancedOutput::StartRecording()
ffmpegRecording ? "FFFilePath" : "RecFilePath");
format = config_get_string(main->Config(), "AdvOut",
ffmpegRecording ? "FFExtension" : "RecFormat");
noSpace = config_get_bool(main->Config(), "AdvOut",
ffmpegRecording ?
"FFFileNameWithoutSpace" :
"RecFileNameWithoutSpace");
os_dir_t *dir = path ? os_opendir(path) : nullptr;
@@ -969,7 +977,7 @@ bool AdvancedOutput::StartRecording()
if (lastChar != '/' && lastChar != '\\')
strPath += "/";
strPath += GenerateTimeDateFilename(format);
strPath += GenerateTimeDateFilename(format, noSpace);
obs_data_t *settings = obs_data_create();
obs_data_set_string(settings,