Re: Refactoring Patch 2 and 3 [re-submit]
Ralf Engels <[email protected]>
| Newsgroups | gmane.comp.audio.zinf.devel |
|---|---|
| Message-ID | <[email protected]> |
Message: 3 Subject: Re: [Zinf-devel] Refactoring Patch 2 and 3 [re-submit] From: "Kristian G. Kvilekval" <[email protected]> To: [email protected] Date: Wed, 13 Aug 2003 13:37:10 -0700 Reply-To: [email protected] On Wed, 2003-08-13 at 11:07, Ralf Engels wrote: >> Hi, ... >> simpler! >I'm disinclined to apply the latest patch as it uses >strncmp, strchr, instead of std::string functionality. >Here's an abbreviated version of std::string >http://www.msoe.edu/eecs/ce/courseinfo/stl/string.htm I guess you mean this: zinf-refactoring2.diff:- if (strncmp(url, "file://", 7) == 0){ zinf-refactoring2.diff:+ if (strncmp(url.c_str(), "file://", 7) == 0){ As you can See it was not my idea. I agree that it is probably a place for further refactoring. Should I do this and send you a patch? >Please don't spend time renaming PullBuffer *& buf -> >PullBuffer **buf. A more useful patch would be to create >a reference counting, thread safe proxy of PullBuffer so >that the audio pipeline could have forks for other style >plugins such as filewriters or visuals. >input -> LMC -> output > | +> Visual > +> file writer >Notice that both filewriter and Visual need read-only copies >of the buffer, it would be best to able to keep track of how many >elements of the pipeline need a copy and delete the puffer only >when the last element is done. >Check out GstBuffer, and GstBufferPool in >http://www.gstreamer.net/docs/gstreamer/gstreamer.html Currently I am through with the pull-buffer. However I will take your hint and look at Visual. I am not sure why Visual need access to the actual sound data? The problem is always the same. Where does the created buffer belong to? Who has the right to destroy it. The Delphi help-pages were quite good in this respect. They always stated who owns the lists afterwards. You will have to endure me just a little more. I only have one week holiday and afterwards the frequency of my patches will decrease a lot. BR, Ralf ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01