MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ resolve_write_path()

std::string MayaFlux::IO::resolve_write_path ( const std::string &  filepath)
inline

Anchor a relative output path to Config::SOURCE_DIR.

Absolute paths are returned unchanged. Relative paths are prefixed with Config::SOURCE_DIR so output files land in the project source tree rather than the binary CWD (which varies by platform and IDE).

Parameters
filepathPath as supplied by the caller.
Returns
Resolved path string.

Definition at line 35 of file FileWriter.hpp.

36{
37 namespace fs = std::filesystem;
38 auto normalized = std::string(filepath);
39 std::ranges::replace(normalized, '\\', '/');
40
41 if (fs::path(normalized).is_absolute())
42 return normalized;
43
44 return (fs::path(Config::SOURCE_DIR) / normalized).string();
45}
std::vector< double > normalized(const std::vector< double > &data, double target_peak)
Normalize single-channel data (non-destructive)
Definition Yantra.cpp:588

References MayaFlux::normalized().

Referenced by MayaFlux::IO::FFmpegMuxContext::open().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: