[gstreamer-bugs] [Bug 338827] [patch] gnomevfssrc should use async api to not block on network problems
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Tue Nov 28 10:35:55 PST 2006
Do not reply to this via email (we are currently unable to handle email
responses and they get discarded). You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=338827
GStreamer | gst-plugins-base | Ver: HEAD CVS
Marc-Andre Lureau changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marcandre.lureau at gmail.com
------- Comment #20 from Marc-Andre Lureau 2006-11-28 18:34 UTC -------
Starting from the 3rd patches of stefan, with a bit of rewritting, I changed
the async_wait() function. Does it solve the bug?
- no more main GMainContext
- no more main loop.
static gboolean
gst_gnome_vfs_async_wait(GstGnomeVFSSrc * src)
{
gboolean res;
GTimeVal timeval;
g_get_current_time (&timeval);
g_time_val_add (&timeval, src->timeout * 1000000);
/* FIXME: the mutex is not useful (btw, it should NOT be async_op_mutex, I
think) */
if (g_cond_timed_wait (src->async_op_cond, src->async_op_mutex, &timeval) ==
FALSE) {
gnome_vfs_async_cancel (src->handle);
res = FALSE;
GST_INFO_OBJECT (src, "Timeout occured during gnomevfs async call with %f",
src->timeout);
} else {
src->async_op_pending = FALSE;
res = TRUE;
}
return res;
}
--
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
More information about the Gstreamer-bugs
mailing list