void-packages/srcpkgs/obs/patches/non-x86-64.patch

60 lines
1.5 KiB
Diff

--- a/plugins/obs-qsv11/QSV_Encoder.cpp 2023-11-10 09:29:58.000000000 +0100
+++ - 2023-11-14 10:27:36.335536275 +0100
@@ -284,6 +284,7 @@
enum qsv_cpu_platform qsv_get_cpu_platform()
{
+#if defined(__x86_64__)
using std::string;
int cpuInfo[4];
@@ -363,6 +364,9 @@
//assume newer revisions are at least as capable as Haswell
return QSV_CPU_PLATFORM_INTEL;
+#else
+ return QSV_CPU_PLATFORM_UNKNOWN;
+#endif
}
int qsv_hevc_encoder_headers(qsv_t *pContext, uint8_t **pVPS, uint8_t **pSPS,
--- a/plugins/obs-qsv11/common_utils_linux.cpp 2023-11-10 09:29:58.000000000 +0100
+++ - 2023-11-14 10:28:41.685885028 +0100
@@ -1,7 +1,9 @@
#include "common_utils.h"
#include <time.h>
+#if defined(__x86_64__)
#include <cpuid.h>
+#endif
#include <util/c99defs.h>
#include <util/dstr.h>
#include <va/va_drm.h>
@@ -191,12 +193,14 @@
return 0.0;
}
+#if defined(__x86_64__)
extern "C" void util_cpuid(int cpuinfo[4], int level)
{
__get_cpuid(level, (unsigned int *)&cpuinfo[0],
(unsigned int *)&cpuinfo[1], (unsigned int *)&cpuinfo[2],
(unsigned int *)&cpuinfo[3]);
}
+#endif
struct vaapi_device {
int fd;
--- a/plugins/obs-qsv11/common_utils.h 2023-11-10 09:29:58.000000000 +0100
+++ - 2023-11-14 10:29:16.281404822 +0100
@@ -24,7 +24,9 @@
extern struct adapter_info adapters[MAX_ADAPTERS];
extern size_t adapter_count;
+#if defined(__x86_64__)
void util_cpuid(int cpuinfo[4], int flags);
+#endif
void check_adapters(struct adapter_info *adapters, size_t *adapter_count);
#ifdef __cplusplus