<DIV>I am trying to pull data from an audio sink to use for a spectrum analyzer that I am coding up. When I try to output the data, I get all zeroes. I did not quite understand the documentation on the gstreamer website. Any suggestions? Here is a fragment of my code pertaining to this issue:</DIV>
<DIV> </DIV>
<DIV>// First, I get the sink pad from the audio sink</DIV>
<DIV>GstPad *sinkpad;</DIV>
<DIV>sinkpad = gst_element_get_pad (audiosink, "sink");</DIV>
<DIV> </DIV>
<DIV>GstBuffer *buffer, *outbuffer;</DIV>
<DIV>while (1) {<BR> // For testing purposes, I put it into an infinite loop.</DIV>
<DIV> // I pull from the sinkpad</DIV>
<DIV> buffer = gst_pad_pull (sinkpad);</DIV>
<DIV> </DIV>
<DIV> // output the size of the data and the actual data to the screen<BR> cout << buffer->size << endl;</DIV>
<DIV> for (int i=0; i<buffer->size; ++i)<BR> {<BR> cout << buffer->data[i] << ", ";<BR> }</DIV>
<DIV> gst_bin_iterate (GST_BIN (pipeline));<BR> }</DIV>
<DIV> </DIV>
<DIV> </DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
<a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=21260/*http://photos.yahoo.com">New Yahoo! Photos - easier uploading and sharing</a>