Re: Message negociation

"Toby Hudon" <[email protected]>
Newsgroups gmane.comp.multimedia.media-api
Message-ID <[email protected]>
----- Original Message -----
From: Steve Lhomme <[email protected]>
Date: Thu, 08 Jan 2004 09:43:24 +0100
To: "The attempt to create a new,  open standard codec API" <[email protected]>
Subject: Re: [Media-api] Message negociation

> 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...
> 

Ok, but what happens if the filter doesn't support all the functions requested? Does it just blow up? What if we actually didn't need to use all those functions anyway because some were optional and wouldn't have come up during the current decode anyway?
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm
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.