X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcross.h;h=6904811b756bd7299c57c96bbdad45baac079761;hb=HEAD;hp=b79f7ebdf6953071bef4df028470a4010e047d8a;hpb=8a8c977c12fc65f1f50ea05099387e0fc8840e7d;p=dcpomatic.git diff --git a/src/lib/cross.h b/src/lib/cross.h index b79f7ebdf..6904811b7 100644 --- a/src/lib/cross.h +++ b/src/lib/cross.h @@ -29,6 +29,8 @@ #include #endif #include +/* windows.h defines this but we want to use it */ +#undef ERROR #include #include @@ -42,7 +44,7 @@ struct AVIOContext; extern void dcpomatic_sleep_seconds (int); extern void dcpomatic_sleep_milliseconds (int); extern std::string cpu_info (); -extern void run_ffprobe (boost::filesystem::path, boost::filesystem::path); +extern void run_ffprobe(boost::filesystem::path content, boost::filesystem::path out, bool err = true, std::string args = {}); extern std::list> mount_info (); extern boost::filesystem::path openssl_path (); extern void make_foreground_application (); @@ -159,4 +161,27 @@ boost::optional analyse_osx_media_path (std::string path); std::vector osx_disks_to_drives (std::vector disks); +class ArgFixer +{ +public: + ArgFixer(int argc, char** argv); + + int argc() const { + return _argc; + } + + char** argv() const { + return _argv; + } + +private: + int _argc; + char** _argv; +#ifdef DCPOMATIC_WINDOWS + std::vector _argv_strings; +#endif + +}; + + #endif