[Bug 748495] libde265: No code to detect the number of CPUs on W32
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Mon Apr 27 06:52:27 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=748495
Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #302396|none |needs-work
status| |
--- Comment #2 from Nicolas Dufresne (stormer) <nicolas.dufresne at collabora.co.uk> ---
Review of attachment 302396:
--> (https://bugzilla.gnome.org/review?bug=748495&attachment=302396)
Kind of a sad moment, since we got g_get_num_processors() since glib 2.36, but
GST depends on 2.32 :-( Interestingly the glib implementation is much more
complex, I wonder if there is a reason for this. Would it be possible to ask
Ryan ?
#ifdef G_OS_WIN32
DWORD_PTR process_cpus;
DWORD_PTR system_cpus;
if (GetProcessAffinityMask (GetCurrentProcess (),
&process_cpus, &system_cpus))
{
unsigned int count;
for (count = 0; process_cpus != 0; process_cpus >>= 1)
if (process_cpus & 1)
count++;
if (count > 0)
return count;
}
::: ext/libde265/libde265-dec.c
@@ +43,3 @@
#include <unistd.h>
#endif
+#ifdef _WIN32
Most code I have been across uses G_OS_WIN32 for portability. Any reason this
would not be right here ?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list