summaryrefslogtreecommitdiffstats
path: root/src/options/general.h
diff options
context:
space:
mode:
authorsumuel <samuel@yakubos.org>2026-08-17 20:44:55 +0000
committersumuel <samuel@yakubos.org>2026-08-17 20:44:55 +0000
commit76424950e373d3b04ac3dd13019151bfba3e8423 (patch)
tree4c3cfdbda039e592b9186be3e28f8d7cfd439e8a /src/options/general.h
Add the files
Diffstat (limited to 'src/options/general.h')
-rw-r--r--src/options/general.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/options/general.h b/src/options/general.h
new file mode 100644
index 0000000..454ca60
--- /dev/null
+++ b/src/options/general.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include "common/ffdata.h"
+
+typedef enum FF_A_PACKED FFDsForceDrmType {
+ FF_DS_FORCE_DRM_TYPE_FALSE = 0, // Disable
+ FF_DS_FORCE_DRM_TYPE_TRUE = 1, // Try `libdrm`, then `sysfs` if libdrm failed
+ FF_DS_FORCE_DRM_TYPE_SYSFS_ONLY, // Use `/sys/class/drm` only
+} FFDsForceDrmType;
+
+typedef struct FFOptionsGeneral {
+ bool multithreading;
+ int32_t processingTimeout;
+ bool detectVersion;
+ FFstrbuf playerName;
+
+// Module options that cannot be put in module option structure
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__) || defined(__GNU__)
+ FFDsForceDrmType dsForceDrm;
+#endif
+} FFOptionsGeneral;
+
+const char* ffOptionsParseGeneralJsonConfig(FFOptionsGeneral* options, yyjson_val* root);
+bool ffOptionsParseGeneralCommandLine(FFOptionsGeneral* options, const char* key, const char* value);
+void ffOptionsInitGeneral(FFOptionsGeneral* options);
+void ffOptionsDestroyGeneral(FFOptionsGeneral* options);
+void ffOptionsGenerateGeneralJsonConfig(FFdata* data, FFOptionsGeneral* options);