[x264-devel] [PATCH] Haiku support
Jérôme Duval
jerome.duval+x264 at gmail.com
Sun Aug 16 21:58:40 CEST 2015
Hi all,
I'm submitting a patch to add support for Haiku.
Here is a description of the changes:
1st: Add Haiku as supported platform.
2nd: Haiku has no nice() function, we use the platform specific call.
The patch is rebased against 20150725 snapshot.
Please consider applying.
Best regards,
Jérôme Duval
>From 15849a53c78b5b0d8d10e439ae6d383d62b61e3b Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval at gmail.com>
Date: Fri, 13 Jun 2014 19:56:27 +0000
Subject: Haiku patch
diff --git a/configure b/configure
index 15b1c91..181c64f 100755
--- a/configure
+++ b/configure
@@ -644,6 +644,9 @@ case $host_os in
HAVE_GETOPT_LONG=0
CFLAGS="$CFLAGS -I\$(SRCPATH)/extras"
;;
+ *haiku*)
+ SYS="HAIKU"
+ ;;
*)
die "Unknown system $host, edit the configure"
;;
--
1.8.3.4
>From 50cfef611e7b77ee30f9ec8f04d75a37e430923a Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval at gmail.com>
Date: Wed, 12 Aug 2015 19:46:55 +0000
Subject: Add Haiku version of adjusting thread priority
diff --git a/common/osdep.h b/common/osdep.h
index 2dfd00b..d0819ac 100644
--- a/common/osdep.h
+++ b/common/osdep.h
@@ -363,6 +363,9 @@ static ALWAYS_INLINE void x264_prefetch( void *p )
sp.sched_priority -= p;\
pthread_setschedparam( handle, policy, &sp );\
}
+#elif SYS_HAIKU
+#include <OS.h>
+#define x264_lower_thread_priority(p) { UNUSED status_t nice_ret =
set_thread_priority(find_thread(NULL), B_LOW_PRIORITY); }
#else
#include <unistd.h>
#define x264_lower_thread_priority(p) { UNUSED int nice_ret = nice(p); }
--
1.8.3.4
More information about the x264-devel
mailing list