412
412
// Glib version is < 2.31.20?
413
413
// Ref: http://developer.gnome.org/glib/2.30/glib-Version-Information.html
414
414
// http://ftp.gnome.org/pub/gnome/sources/glib/
416
// $ pkg-config --modversion glib-2.0
418
#if (!GLIB_CHECK_VERSION(2, 31, 18))
419
// Glib version is < 2.31.18.
420
// We must use the older g_async_queue_timed_pop(...) function.
424
g_get_current_time(&time);
425
g_time_val_add(&time, TIMEOUT_USECONDS/*in micro seconds*/);
427
// Read next command from the queue
428
cmd = (RecorderCommand*)g_async_queue_timed_pop(g_cmd_queue, &time);
430
// Glib version is >= 2.31.18.
431
// We use the newer g_async_queue_timeout_pop(...) function.
433
// Read next command from the queue
434
cmd = (RecorderCommand*)g_async_queue_timeout_pop(g_cmd_queue, TIMEOUT_USECONDS/*in micro seconds*/);
416
// $ pkg-config --modversion glib-2.0
418
#if (!GLIB_CHECK_VERSION(2, 31, 18))
419
// Glib version is < 2.31.18.
420
// We must use the older g_async_queue_timed_pop(...) function.
424
g_get_current_time(&time);
425
g_time_val_add(&time, TIMEOUT_USECONDS/*in micro seconds*/);
427
// Read next command from the queue
428
cmd = (RecorderCommand*)g_async_queue_timed_pop(g_cmd_queue, &time);
430
// Glib version is >= 2.31.18.
431
// We use the newer g_async_queue_timeout_pop(...) function.
433
// Read next command from the queue
434
cmd = (RecorderCommand*)g_async_queue_timeout_pop(g_cmd_queue, TIMEOUT_USECONDS/*in micro seconds*/);
437
437
if (!cmd) continue;