< prev index next >

modules/media/src/main/native/gstreamer/3rd_party/glib/glib-2.28.8/glib/gmain.c

Print this page
rev 9617 : imported patch 8u121.patch

*** 1136,1145 **** --- 1136,1150 ---- g_return_if_fail (source != NULL); g_return_if_fail (fd != NULL); g_return_if_fail (!SOURCE_DESTROYED (source)); + #ifdef GSTREAMER_LITE + if (source == NULL) + return; + #endif // GSTREAMER_LITE + context = source->context; if (context) LOCK_CONTEXT (context);
*** 1169,1178 **** --- 1174,1188 ---- g_return_if_fail (source != NULL); g_return_if_fail (fd != NULL); g_return_if_fail (!SOURCE_DESTROYED (source)); + #ifdef GSTREAMER_LITE + if (source == NULL) + return; + #endif // GSTREAMER_LITE + context = source->context; if (context) LOCK_CONTEXT (context);
*** 1387,1396 **** --- 1397,1410 ---- GDestroyNotify notify) { GSourceCallback *new_callback; g_return_if_fail (source != NULL); + #ifdef GSTREAMER_LITE + if (source == NULL) + return; + #endif // GSTREAMER_LITE new_callback = g_new (GSourceCallback, 1); new_callback->ref_count = 1; new_callback->func = func;
*** 1478,1487 **** --- 1492,1506 ---- g_source_set_priority (GSource *source, gint priority) { GMainContext *context; + #ifdef GSTREAMER_LITE + if (source == NULL || source->priv == NULL || source->priv->parent_source == NULL) + return; + #endif // GSTREAMER_LITE + g_return_if_fail (source != NULL); context = source->context; if (context)
*** 1739,1748 **** --- 1758,1771 ---- **/ void g_source_unref (GSource *source) { g_return_if_fail (source != NULL); + #ifdef GSTREAMER_LITE + if (source == NULL) + return; + #endif // GSTREAMER_LITE g_source_unref_internal (source, source->context, FALSE); } /**
*** 3929,3946 **** --- 3952,3974 ---- **/ GSource * g_timeout_source_new (guint interval) { GSource *source = g_source_new (&g_timeout_funcs, sizeof (GTimeoutSource)); + #ifdef GSTREAMER_LITE + if (source == NULL) + return NULL; + #endif // GSTREAMER_LITE GTimeoutSource *timeout_source = (GTimeoutSource *)source; timeout_source->interval = interval; g_timeout_set_expiration (timeout_source, g_get_monotonic_time ()); return source; } + #ifndef GSTREAMER_LITE /** * g_timeout_source_new_seconds: * @interval: the timeout interval in seconds * * Creates a new timeout source.
*** 3967,3977 **** g_timeout_set_expiration (timeout_source, g_get_monotonic_time ()); return source; } ! /** * g_timeout_add_full: * @priority: the priority of the timeout source. Typically this will be in * the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH. --- 3995,4005 ---- g_timeout_set_expiration (timeout_source, g_get_monotonic_time ()); return source; } ! #endif // GSTREAMER_LITE /** * g_timeout_add_full: * @priority: the priority of the timeout source. Typically this will be in * the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH.
*** 4011,4020 **** --- 4039,4052 ---- guint id; g_return_val_if_fail (function != NULL, 0); source = g_timeout_source_new (interval); + #ifdef GSTREAMER_LITE + if (source == NULL) + return 0; + #endif // GSTREAMER_LITE if (priority != G_PRIORITY_DEFAULT) g_source_set_priority (source, priority); g_source_set_callback (source, function, data, notify);
*** 4061,4070 **** --- 4093,4103 ---- { return g_timeout_add_full (G_PRIORITY_DEFAULT, interval, function, data, NULL); } + #ifndef GSTREAMER_LITE /** * g_timeout_add_seconds_full: * @priority: the priority of the timeout source. Typically this will be in * the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH. * @interval: the time between calls to the function, in seconds
*** 4162,4171 **** --- 4195,4205 ---- { g_return_val_if_fail (function != NULL, 0); return g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, interval, function, data, NULL); } + #endif // GSTREAMER_LITE /* Child watch functions */ #ifdef G_OS_WIN32
*** 4429,4438 **** --- 4463,4477 ---- g_child_watch_source_new (GPid pid) { GSource *source = g_source_new (&g_child_watch_funcs, sizeof (GChildWatchSource)); GChildWatchSource *child_watch_source = (GChildWatchSource *)source; + #ifdef GSTREAMER_LITE + if (source == NULL) + return NULL; + #endif // GSTREAMER_LITE + #ifdef G_OS_WIN32 child_watch_source->poll.fd = (gintptr) pid; child_watch_source->poll.events = G_IO_IN; g_source_add_poll (source, &child_watch_source->poll);
< prev index next >