Files
Aiden d411453f80
All checks were successful
CI / React UI Build (push) Successful in 10s
CI / Native Windows Build And Tests (push) Successful in 3m1s
CI / Windows Release Package (push) Successful in 3m20s
timing refactor
2026-05-12 23:39:57 +10:00

36 lines
1.1 KiB
C++

#pragma once
#include "AppConfig.h"
#include "DeckLinkDisplayMode.h"
#include <filesystem>
#include <string>
namespace RenderCadenceCompositor
{
class AppConfigProvider
{
public:
AppConfigProvider();
bool Load(const std::filesystem::path& path, std::string& error);
bool LoadDefault(std::string& error);
void ApplyCommandLine(int argc, char** argv);
const AppConfig& Config() const { return mConfig; }
const std::filesystem::path& SourcePath() const { return mSourcePath; }
bool LoadedFromFile() const { return mLoadedFromFile; }
private:
AppConfig mConfig;
std::filesystem::path mSourcePath;
bool mLoadedFromFile = false;
};
double FrameDurationMillisecondsFromRateString(const std::string& rateText, double fallbackRate = 59.94);
double FrameDurationMillisecondsFromDisplayMode(BMDDisplayMode displayMode, double fallbackMilliseconds);
void VideoFormatDimensions(const std::string& formatName, unsigned& width, unsigned& height);
std::filesystem::path FindConfigFile(const std::filesystem::path& relativePath = "config/runtime-host.json");
std::filesystem::path FindRepoPath(const std::filesystem::path& relativePath);
}