< prev index next >

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

Print this page
rev 10250 : imported patch 9-cpu-1701.patch

*** 1050,1059 **** --- 1050,1063 ---- { GSourceList *source_list; source_list = find_source_list_for_priority (context, source->priority, FALSE); g_return_if_fail (source_list != NULL); + #ifdef GSTREAMER_LITE + if (source_list == NULL) + return; + #endif // GSTREAMER_LITE if (source->prev) source->prev->next = source->next; else source_list->head = source->next;
*** 1324,1333 **** --- 1328,1342 ---- 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);
*** 1593,1602 **** --- 1602,1615 ---- 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;
*** 1634,1643 **** --- 1647,1664 ---- GMainContext *context, gint priority) { GSList *tmp_list; + #ifdef GSTREAMER_LITE + if (source == NULL || source->priv == NULL || source->priv->parent_source == NULL) + return; + + if (context == NULL) + return; + #endif // GSTREAMER_LITE + g_return_if_fail (source->priv->parent_source == NULL || source->priv->parent_source->priority == priority); if (context) {
*** 1701,1710 **** --- 1722,1736 ---- 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); g_return_if_fail (source->priv->parent_source == NULL); context = source->context;
*** 1766,1775 **** --- 1792,1806 ---- GMainContext *context; g_return_if_fail (source != NULL); g_return_if_fail (source->ref_count > 0); + #ifdef GSTREAMER_LITE + if (source == NULL) + return; + #endif // GSTREAMER_LITE + if (source->priv->ready_time == ready_time) return; context = source->context;
*** 2074,2083 **** --- 2105,2118 ---- **/ 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); } /**
*** 4564,4581 **** --- 4599,4621 ---- **/ 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.
*** 4605,4615 **** 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. --- 4645,4655 ---- 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.
*** 4653,4662 **** --- 4693,4706 ---- 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);
*** 4706,4715 **** --- 4750,4760 ---- { 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
*** 4814,4823 **** --- 4859,4869 ---- { 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
*** 5229,5238 **** --- 5275,5288 ---- #ifndef G_OS_WIN32 g_return_val_if_fail (pid > 0, NULL); #endif source = g_source_new (&g_child_watch_funcs, sizeof (GChildWatchSource)); + #ifdef GSTREAMER_LITE + if (source == NULL) + return NULL; + #endif // GSTREAMER_LITE child_watch_source = (GChildWatchSource *)source; child_watch_source->pid = pid; #ifdef G_OS_WIN32
< prev index next >