VirtualC64 v5.0 beta
Commodore 64 Emulator
Loading...
Searching...
No Matches
FFmpeg.h
1// -----------------------------------------------------------------------------
2// This file is part of VirtualC64
3//
4// Copyright (C) Dirk W. Hoffmann. www.dirkwhoffmann.de
5// This FILE is dual-licensed. You are free to choose between:
6//
7// - The GNU General Public License v3 (or any later version)
8// - The Mozilla Public License v2
9//
10// SPDX-License-Identifier: GPL-3.0-or-later OR MPL-2.0
11// -----------------------------------------------------------------------------
12
13#pragma once
14
15#include "Types.h"
16#include <vector>
17#include <filesystem>
18
19namespace vc64 {
20
21namespace fs = ::std::filesystem;
22
23class FFmpeg final {
24
25public:
26
27 // A list of available FFmpeg executables (setup in init() )
28 static std::vector<std::filesystem::path> paths;
29
30 // Path to the selected FFmpeg executable
31 static std::filesystem::path exec;
32
33#ifdef _MSC_VER
34
35#else
36 FILE *handle = nullptr;
37#endif
38
39 //
40 // Locating FFmpeg
41 //
42
43 // Sets up the 'path' vector
44 static void init();
45
46 // Getter and setter for the FFmpeg executable path
47 static const fs::path getExecPath();
48 static void setExecPath(const fs::path &path);
49
50 // Checks whether FFmeg is available
51 static bool available();
52
53
54 //
55 // Running FFmpeg
56 //
57
58 // Launches the FFmpeg instance
59 bool launch(const string &args);
60
61 // Returns true if the FFmpeg instance is currently running
62 bool isRunning();
63
64 // Waits until the FFmpeg instance has terminated
65 void join();
66};
67
68}
VirtualC64 project namespace.
Definition CmdQueue.cpp:16