[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog backend/sound_handler_gst.cpp [release_0_
From: |
Markus Gothe |
Subject: |
[Gnash-commit] gnash ChangeLog backend/sound_handler_gst.cpp [release_0_7_2] |
Date: |
Wed, 08 Nov 2006 21:57:42 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch: release_0_7_2
Changes by: Markus Gothe <nihilus> 06/11/08 21:57:42
Modified files:
. : ChangeLog
backend : sound_handler_gst.cpp
Log message:
Applied patch from Hiroyuki Ikezoe.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&only_with_tag=release_0_7_2&r1=1.1412.2.123&r2=1.1412.2.124
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_gst.cpp?cvsroot=gnash&only_with_tag=release_0_7_2&r1=1.22.2.4&r2=1.22.2.5
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.1412.2.123
retrieving revision 1.1412.2.124
diff -u -b -r1.1412.2.123 -r1.1412.2.124
--- ChangeLog 8 Nov 2006 15:12:06 -0000 1.1412.2.123
+++ ChangeLog 8 Nov 2006 21:57:41 -0000 1.1412.2.124
@@ -1,3 +1,7 @@
+2006-11-08 Markus Gothe <address@hidden>
+
+ * backend/sound_handler_gst.cpp: Applied patch from Hiroyuki Ikezoe.
+
2006-11-08 Tomas Groth Christensen <address@hidden>
* backend/sound_handler_sdl.cpp: Made ffmpeg error handling
Index: backend/sound_handler_gst.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_gst.cpp,v
retrieving revision 1.22.2.4
retrieving revision 1.22.2.5
diff -u -b -r1.22.2.4 -r1.22.2.5
--- backend/sound_handler_gst.cpp 3 Nov 2006 06:15:31 -0000 1.22.2.4
+++ backend/sound_handler_gst.cpp 8 Nov 2006 21:57:41 -0000 1.22.2.5
@@ -18,7 +18,7 @@
// Based on sound_handler_sdl.cpp by Thatcher Ulrich http://tulrich.com 2003
// which has been donated to the Public Domain.
-/* $Id: sound_handler_gst.cpp,v 1.22.2.4 2006/11/03 06:15:31 strk Exp $ */
+/* $Id: sound_handler_gst.cpp,v 1.22.2.5 2006/11/08 21:57:41 nihilus Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -53,6 +53,7 @@
GstElement *audioresample;
GstElement *volume;
GstElement *bin;
+ GstPad *addersinkpad;
// position in the stream
long position;
@@ -162,7 +163,11 @@
gst_bin_add (GST_BIN (pipeline), audiosink);
// link adder and audiosink
- gst_element_link (adder, audiosink);
+ GstPad *srcpad = gst_element_get_pad (adder, "src");
+ GstPad *sinkpad = gst_element_get_pad (audiosink, "sink");
+ gst_pad_link (srcpad, sinkpad);
+ gst_object_unref (GST_OBJECT (srcpad));
+ gst_object_unref (GST_OBJECT (sinkpad));
}
@@ -523,7 +528,11 @@
// Add the bin to the main pipeline
gst_bin_add(GST_BIN (pipeline), gst_element->bin);
- gst_element_link(gst_element->bin,adder);
+ // Link to the adder sink pad
+ gst_element->addersinkpad = gst_element_get_request_pad (adder,
"sink%d");
+ GstPad *srcpad = gst_element_get_pad (gst_element->bin, "src");
+ gst_pad_link (srcpad, gst_element->addersinkpad);
+ gst_object_unref (GST_OBJECT (srcpad));
// Set the volume
g_object_set (G_OBJECT (gst_element->volume), "volume",
static_cast<double>(m_sound_data[sound_handle]->volume) / 100.0, NULL);
@@ -566,18 +575,20 @@
// playback - if not we skip cleaning this for now
// FIXME: what if it ain't possible to stop an element
when this is called from ~GST_sound_handler
- // Unlink the elements
- gst_element_unlink_many (elements->bin, adder, NULL);
+ // Disconnect signals
+ g_signal_handler_disconnect (elements->input,
elements->handoff_signal_id);
// FIXME: This stops ALL sounds, not just the current.
if (gst_element_set_state (GST_ELEMENT (elements->bin),
GST_STATE_NULL) != 1) continue;
- // Disconnect signals
- g_signal_handler_disconnect (elements->input,
elements->handoff_signal_id);
+ // Unlink the pad which is linked the adder sink pad.
+ GstPad *srcpad = gst_element_get_pad (elements->bin,
"src");
+ gst_pad_unlink (srcpad, elements->addersinkpad);
+ gst_element_release_request_pad (adder,
elements->addersinkpad);
+ gst_object_unref (GST_OBJECT (srcpad));
// Unref/delete the elements
- gst_bin_remove(GST_BIN (pipeline), elements->bin);
-
+ gst_bin_remove (GST_BIN (pipeline), elements->bin);
// Delete the gst_element struct
// @@ we're deleting the elements from the start, so
half-way of the loop we will be referring to undefined elements. Is this
intended ? --strk;