Hi,<br><br>&nbsp; The general rule is that you want to avoid as many memcpy&#39;s as possible. So if your plugin is, let&#39;s say, an mp3 decoder, you need to have a look at how to have the actual decoding process put its output in the outgoing buffer. You have several options:
<br>&nbsp; A) The decoder allows you to give a pointer to a region of data where it will write its output. In that case you need to allocate a buffer before and give it GST_BUFFER_DATA (outputbuffer).<br>&nbsp; B) The decoder gives you an allocated region of memory every time (new for every time you call it). In that case you can use gst_buffer_new(), which doesn&#39;t allocate data, and you can set GST_BUFFER_DATA() to that adress.
<br>&nbsp; C) The decoder always outputs in one identical region of memory (only
allocated once at the beginning). In that case you need to copy over
the data into your newly allocated buffer.<br>
<br>&nbsp; A) and B) are the best options. C) requires you to copy at every iteration.<br><br>&nbsp;&nbsp; Hope it helps, but maybe some <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Edward<br><br><div><span class="gmail_quote">On 7/27/07, <b class="gmail_sendername">
pritesh</b> &lt;<a href="mailto:digitaldsp@excite.com">digitaldsp@excite.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 <table bgcolor="white" border="0" cellpadding="3" cellspacing="0" width="100%"><tbody><tr valign="top"><td width="100%"><font color="black" size="2"><br>hi,<br>ok i got it , <br>what wiil be the overhead of calling this api  before decoding a frame ,  repeatedly for each encoded frame(say mp3)
<br>here i am saying this in reference to embedded system. <br><br><br><br></font></td></tr></tbody></table><p></p><hr><span class="q"><font face="geneva" size="2"><b>Join Excite! - <a href="http://www.excite.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.excite.com</a></b><br>The most personalized portal on the Web!</font>
</span><p></p><br>-------------------------------------------------------------------------<br>This SF.net email is sponsored by: Splunk Inc.<br>Still grepping through log files to find problems? &nbsp;Stop.<br>Now Search log events and configuration files using AJAX and a browser.
<br>Download your FREE copy of Splunk now &gt;&gt; &nbsp;<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://get.splunk.com/" target="_blank">http://get.splunk.com/</a><br>_______________________________________________
<br>gstreamer-devel mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>Edward Hervey<br>Multimedia editing developer<br><a href="http://www.pitivi.org/">http://www.pitivi.org/
</a>