ohmu
·
2026-10-15
1#pragma once
2
3#include "common/ffdata.h"
4
5typedef enum FFDsForceDrmType: uint8_t {
6 FF_DS_FORCE_DRM_TYPE_FALSE = 0, // Disable
7 FF_DS_FORCE_DRM_TYPE_TRUE = 1, // Try `libdrm`, then `sysfs` if libdrm failed
8 FF_DS_FORCE_DRM_TYPE_SYSFS_ONLY, // Use `/sys/class/drm` only
9} FFDsForceDrmType;
10
11typedef struct FFOptionsGeneral {
12 bool multithreading;
13 int32_t processingTimeout;
14 bool detectVersion;
15 FFstrbuf playerName;
16
17// Module options that cannot be put in module option structure
18#if defined(__linux__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__) || defined(__GNU__)
19 FFDsForceDrmType dsForceDrm;
20#endif
21} FFOptionsGeneral;
22
23const char* ffOptionsParseGeneralJsonConfig(FFOptionsGeneral* options, yyjson_val* root, yyjson_val** pkey);
24bool ffOptionsParseGeneralCommandLine(FFOptionsGeneral* options, const char* key, const char* value);
25void ffOptionsInitGeneral(FFOptionsGeneral* options);
26void ffOptionsDestroyGeneral(FFOptionsGeneral* options);
27void ffOptionsGenerateGeneralJsonConfig(FFdata* data, FFOptionsGeneral* options);