rhythmbox r5889 - in trunk: . backends/gstreamer
- From: jmatthew svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r5889 - in trunk: . backends/gstreamer
- Date: Sat, 6 Sep 2008 01:19:18 +0000 (UTC)
Author: jmatthew
Date: Sat Sep 6 01:19:18 2008
New Revision: 5889
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=5889&view=rev
Log:
2008-09-06 Jonathan Matthew <jonathan d14n org>
* backends/gstreamer/rb-player-gst-xfade.c: (start_sink):
During sink startup, pass error messages from stream bins to the
normal message handler rather than assuming that they indicate a
problem with the sink. From #550271.
Modified:
trunk/ChangeLog
trunk/backends/gstreamer/rb-player-gst-xfade.c
Modified: trunk/backends/gstreamer/rb-player-gst-xfade.c
==============================================================================
--- trunk/backends/gstreamer/rb-player-gst-xfade.c (original)
+++ trunk/backends/gstreamer/rb-player-gst-xfade.c Sat Sep 6 01:19:18 2008
@@ -2636,26 +2636,39 @@
{
char *debug;
GError *gst_error = NULL;
+ GstObject *message_src;
+ RBXFadeStream *stream;
- gst_message_parse_error (message, &gst_error, &debug);
- rb_debug ("got error message: %s (%s)", gst_error->message, debug);
- gst_message_unref (message);
- g_free (debug);
-
- if (error != NULL && *error == NULL) {
- g_set_error (error,
- RB_PLAYER_ERROR,
- RB_PLAYER_ERROR_INTERNAL, /* ? */
- _("Failed to open output device: %s"),
- gst_error->message);
- }
- g_error_free (gst_error);
- g_error_free (generic_error);
+ /* we only want to process errors from the sink here.
+ * errors from streams should go to the normal message handler.
+ */
+ message_src = GST_MESSAGE_SRC (message);
+ stream = find_stream_by_element (player, GST_ELEMENT (message_src));
+ if (stream != NULL) {
+ rb_debug ("got an error from a stream; passing it to the bus handler");
+ rb_player_gst_xfade_bus_cb (bus, message, player);
+ g_object_unref (stream);
+ } else {
+ gst_message_parse_error (message, &gst_error, &debug);
+ rb_debug ("got error message: %s (%s)", gst_error->message, debug);
+ gst_message_unref (message);
+ g_free (debug);
+
+ if (error != NULL && *error == NULL) {
+ g_set_error (error,
+ RB_PLAYER_ERROR,
+ RB_PLAYER_ERROR_INTERNAL, /* ? */
+ _("Failed to open output device: %s"),
+ gst_error->message);
+ }
+ g_error_free (gst_error);
+ g_error_free (generic_error);
- gst_element_set_state (player->priv->outputbin, GST_STATE_NULL);
- gst_element_set_state (player->priv->adder, GST_STATE_NULL);
- gst_element_set_state (player->priv->silencebin, GST_STATE_NULL);
- return FALSE;
+ gst_element_set_state (player->priv->outputbin, GST_STATE_NULL);
+ gst_element_set_state (player->priv->adder, GST_STATE_NULL);
+ gst_element_set_state (player->priv->silencebin, GST_STATE_NULL);
+ return FALSE;
+ }
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]