Rémi Bernon (@rbernon) commented about dlls/winegstreamer/wg_parser.c:
- if (factory)
name = gst_element_factory_get_longname(factory);
- if (name && strstr(name, "libav H.264"))
- {
const gint32 MAX_THREADS = 16;
gint32 max_threads;
+#ifdef HAVE_SCHED_SETAFFINITY
gint32 thread_count;
cpu_set_t p_aff;
memset( &p_aff, 0, sizeof(p_aff) );
if( sched_getaffinity( 0, sizeof(p_aff), &p_aff ) )
thread_count = 0;
else
thread_count = CPU_COUNT(&p_aff);
What about using Nt functions instead? NtQueryInformationThread( ThreadBasicInformation ), and counting the bits in `info.AffinityMask`?
It could probably better be done in `wg_init_gstreamer`, as this callback may be called in a non-wine thread.