summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald Bultje <rbultje@src.gnome.org>2004-10-22 12:05:20 +0000
committerRonald Bultje <rbultje@src.gnome.org>2004-10-22 12:05:20 +0000
commit89d992e4046bcd5aff07599e56ae49ed1da44391 (patch)
tree7dbf0b45ccac0a7988ad6f36cba87711847208f5
parent6c0b238ee2922563359165bb712fa0df41977538 (diff)
downloadtotem-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--ChangeLog9
-rw-r--r--src/backend/bacon-video-widget-gst.c9
-rw-r--r--src/bacon-video-widget-gst.c9
3 files changed, 23 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 91e6f0c69..d334aaaac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;