diff options
author | Ronald Bultje <rbultje@src.gnome.org> | 2004-10-22 12:05:20 +0000 |
---|---|---|
committer | Ronald Bultje <rbultje@src.gnome.org> | 2004-10-22 12:05:20 +0000 |
commit | 89d992e4046bcd5aff07599e56ae49ed1da44391 (patch) | |
tree | 7dbf0b45ccac0a7988ad6f36cba87711847208f5 | |
parent | 6c0b238ee2922563359165bb712fa0df41977538 (diff) | |
download | totem-89d992e4046bcd5aff07599e56ae49ed1da44391.tar.gz |
Since we are blocking the mainloop in _play or _open, errors will never be
* src/bacon-video-widget-gst.c: (got_error):
Since we are blocking the mainloop in _play or _open, errors
will never be reported until after we unblock the mainloop if we
use idle handlers. Also, we don't need signals at that stage. So
we can abuse the coincidence of those two and just report errors
as we should.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/backend/bacon-video-widget-gst.c | 9 | ||||
-rw-r--r-- | src/bacon-video-widget-gst.c | 9 |
3 files changed, 23 insertions, 4 deletions
@@ -1,3 +1,12 @@ +2004-10-22 Ronald S. Bultje <rbultje@ronald.bitfreak.net> + + * src/bacon-video-widget-gst.c: (got_error): + Since we are blocking the mainloop in _play or _open, errors + will never be reported until after we unblock the mainloop if we + use idle handlers. Also, we don't need signals at that stage. So + we can abuse the coincidence of those two and just report errors + as we should. + 2004-10-21 Bastien Nocera <hadess@hadess.net> * src/totem-playlist.c: (totem_playlist_add_files), diff --git a/src/backend/bacon-video-widget-gst.c b/src/backend/bacon-video-widget-gst.c index bd3575578..86d698dbb 100644 --- a/src/backend/bacon-video-widget-gst.c +++ b/src/backend/bacon-video-widget-gst.c @@ -871,9 +871,14 @@ got_error (GstElement *play, GstElement *orig, GError *error, g_return_if_fail (bvw != NULL); g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw)); - /* the handler will catch it */ - if (GST_STATE (play) != GST_STATE_PLAYING) + /* since we're opening, we will never enter the mainloop + * until we return, so setting an idle handler doesn't + * help... Anyway, let's prepare a message. */ + if (GST_STATE (play) != GST_STATE_PLAYING) { + g_free (bvw->priv->last_error_message); + bvw->priv->last_error_message = g_strdup (error->message); return; + } signal = g_new0 (BVWSignal, 1); signal->signal_id = ASYNC_ERROR; diff --git a/src/bacon-video-widget-gst.c b/src/bacon-video-widget-gst.c index bd3575578..86d698dbb 100644 --- a/src/bacon-video-widget-gst.c +++ b/src/bacon-video-widget-gst.c @@ -871,9 +871,14 @@ got_error (GstElement *play, GstElement *orig, GError *error, g_return_if_fail (bvw != NULL); g_return_if_fail (BACON_IS_VIDEO_WIDGET (bvw)); - /* the handler will catch it */ - if (GST_STATE (play) != GST_STATE_PLAYING) + /* since we're opening, we will never enter the mainloop + * until we return, so setting an idle handler doesn't + * help... Anyway, let's prepare a message. */ + if (GST_STATE (play) != GST_STATE_PLAYING) { + g_free (bvw->priv->last_error_message); + bvw->priv->last_error_message = g_strdup (error->message); return; + } signal = g_new0 (BVWSignal, 1); signal->signal_id = ASYNC_ERROR; |