<DIV>Thanks!&nbsp; I appreciate your help and advice.&nbsp; Let me describe what I'm working on so that everyone can make some comments on whether my approach is ok.&nbsp; </DIV>
<DIV>&nbsp;</DIV>
<DIV>I am building an application that takes in some audio and does some&nbsp;analysis on the raw audio.&nbsp; The application then makes certain decisions based on the results of the&nbsp;analysis.&nbsp;&nbsp;There are many ways of doing this particular analysis, so&nbsp;this application will have its own plugin system so that people can write new analysis algorithms.&nbsp; </DIV>
<DIV>&nbsp;</DIV>
<DIV>The reason I wanted to use Gstreamer was to conveniently get audio from different sources.&nbsp; If I understand your comments correctly, you are suggesting that instead of my application having its own plugin system, I should just write plugins for Gstreamer to perform the analysis?<BR><BR><B><I>Ronald Bultje &lt;rbultje@ronald.bitfreak.net&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="BORDER-LEFT: #1010ff 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5px">On Mon, 2003-12-22 at 18:56, Quan Nguyen wrote:<BR>&gt; By the way, I may not have been clear before. What I want to do is<BR>&gt; to get the raw audio data from a decoder so that I can manipulate it<BR>&gt; with standard C++ code. I don't want to have to hook the decoder up<BR>&gt; to another element. Thanks.<BR><BR>First a note: this is a *really* bad idea. GStreamer is intended for<BR>elements that can be used by each application. By using such 'hacks',<BR>the whole idea of GStreamer has little use.<BR><BR>How:<BR><BR>#include <GST gst.h><BR><BR>static void<BR>cb_manipulate (GstElement *element,<BR>GstData *data)<BR>{<BR>GstBuffer *buffer;<BR><BR>/* no events */<BR>if (!GST_IS_BUFFER (data))<BR>return;<BR>buffer = GST_BUFFER (data);<BR><BR>/* manipulate your data here */<BR>[..]<BR>}<BR><BR>int<BR>main ()<BR>{<BR>GstElement *listener;<BR>[..]<BR>listener = gst_element_factory_make
 ("identity", <BR>"listener");<BR>g_signal_connect (G_OBJECT (listener), "handoff",<BR>G_CALLBACK (cb_manipulate), NULL);<BR>[..]<BR>/* example pipeline... */<BR>gst_element_link_many (audiosource, decoder, listener,<BR>audiosink, NULL);<BR>}<BR><BR>But again, this is a really bad idea. It's nice as a quick hack, but<BR>nothing more than that. Rethink your application if it requires this.<BR><BR>Ronald<BR><BR>-- <BR>Ronald Bultje <RBULTJE@RONALD.BITFREAK.NET><BR>Linux Video/Multimedia developer<BR></BLOCKQUOTE><p><hr SIZE=1>
Do you Yahoo!?<br>
Yahoo! Photos - <a href="http://us.rd.yahoo.com/evt=21486/*http://f1.pg.photos.yahoo.com/ph//spsimplenol?.file=ny_ts_splash.html">Get your photo on the big screen in Times Square</a>