Files
video-shader-toys/apps/RenderCadenceCompositor/app/AppConfigProvider.h
Aiden 9938a6cc26
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m54s
CI / Windows Release Package (push) Successful in 3m2s
http
2026-05-12 12:38:54 +10:00

31 lines
773 B
C++

#pragma once
#include "AppConfig.h"
#include <filesystem>
#include <string>
namespace RenderCadenceCompositor
{
class AppConfigProvider
{
public:
AppConfigProvider();
bool Load(const std::filesystem::path& path, 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);
void VideoFormatDimensions(const std::string& formatName, unsigned& width, unsigned& height);
}