Re: Message negociation

Steve Lhomme <[email protected]>
Newsgroups gmane.comp.multimedia.media-api
Message-ID <[email protected]>
Toby Hudon wrote:

>>I was just thinkING about pointers...
>>
>>We said that we need messages but that treating them all the time in a 
>>switch could have an impact on performance.
>>
>>So what about having a filter ask for a function to the filter it wants 
>>to send the message. It only has to do this once and then call this 
>>function instead of sending a message.
>>
> 
> 
> Are we really so starved for cpu power that a couple hundred compares of a variable to a fixed value will kill us? How slow is it really to do "does X = #?" for each entry in the switch when you pass it?

Not really. But that equivalent to the message-oriented system. But more 
efficient CPU wise. And would probably lead to cleaner code too (on both 
sides). During the init/connection of 2 filters they request all the 
callbacks they need once. And then they just call functions the way they 
always do it...
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.