+/* Stop any currently playing sound on this channel, and remove any
+ format-specific GStreamer elements from the channel. */
+static void
+clean_up_after_playing_sound(schanid_t chan)
+{
+ if(!gst_element_set_state(chan->pipeline, GST_STATE_NULL))
+ WARNING_S(_("Could not set GstElement state to"), "NULL");
+ if(chan->demux)
+ {
+ gst_bin_remove(GST_BIN(chan->pipeline), chan->demux);
+ chan->demux = NULL;
+ }
+ if(chan->decode)
+ {
+ gst_bin_remove(GST_BIN(chan->pipeline), chan->decode);
+ chan->decode = NULL;
+ }
+}
+
+/* This signal is thrown whenever the GStreamer pipeline generates a message.
+ Most messages are harmless. */