<DIV>Thanks! I appreciate your help and advice. Let me describe what I'm working on so that everyone can make some comments on whether my approach is ok. </DIV>
<DIV> </DIV>
<DIV>I am building an application that takes in some audio and does some analysis on the raw audio. The application then makes certain decisions based on the results of the analysis. There are many ways of doing this particular analysis, so this application will have its own plugin system so that people can write new analysis algorithms. </DIV>
<DIV> </DIV>
<DIV>The reason I wanted to use Gstreamer was to conveniently get audio from different sources. 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 <rbultje@ronald.bitfreak.net></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>> By the way, I may not have been clear before. What I want to do is<BR>> to get the raw audio data from a decoder so that I can manipulate it<BR>> with standard C++ code. I don't want to have to hook the decoder up<BR>> 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>