Based on OBSBasic::GetCurrentOutputPath()
| 344 | |
| 345 | // Based on OBSBasic::GetCurrentOutputPath() |
| 346 | static const char *getCurrentOutputPath() |
| 347 | { |
| 348 | const char *path = nullptr; |
| 349 | auto config = obs_frontend_get_profile_config(); |
| 350 | if (!config) { |
| 351 | return path; |
| 352 | } |
| 353 | |
| 354 | const char *mode = config_get_string(config, "Output", "Mode"); |
| 355 | |
| 356 | if (strcmp(mode, "Advanced") == 0) { |
| 357 | const char *advanced_mode = |
| 358 | config_get_string(config, "AdvOut", "RecType"); |
| 359 | |
| 360 | if (strcmp(advanced_mode, "FFmpeg") == 0) { |
| 361 | path = config_get_string(config, "AdvOut", |
| 362 | "FFFilePath"); |
| 363 | } else { |
| 364 | path = config_get_string(config, "AdvOut", |
| 365 | "RecFilePath"); |
| 366 | } |
| 367 | } else { |
| 368 | path = config_get_string(config, "SimpleOutput", "FilePath"); |
| 369 | } |
| 370 | |
| 371 | return path; |
| 372 | } |
| 373 | |
| 374 | bool MacroConditionStats::CheckDiskUsage() const |
| 375 | { |