From: Wim T. <wi...@fl...> - 2005-05-02 17:41:08
|
On Thu, 2005-03-31 at 12:53 +0200, Ronald S. Bultje wrote: > Hey guys, > > On Thu, 2005-03-31 at 12:11, Wim Taymans wrote: > [..] > > Added start/stop methods to transform base class so subclasses > > don't need to deal with state changes even. > > So, Benjamin proposed something similar. Is this a good idea? Reason > that I goubt it is because we're creating interfaces over our own > interfaces. That seems like a bad idea, given the xvideosink debacle > back in the 0.6-and-earlier days. I thought it was more convenient given that the start should be done in the sinkpad activate function, a pad that is provided by the base class even. Explaining to get the sinkpad from the base class, saving the old activate function, inserting a new activate function, performing the start on the right time seems more complicated than overriding a method and calling that method in the base class from wherever it is needed. > > What I'm trying to say is: can we please not create interfaces to wrap > ourselves if there isn't a very very good reason, i.e. in this case just > deal with state changes? The amount of code saved (=gain) by this is, > well, zero, and it does make our iterfaces very fuzzy One of the points of the base classes is to create a specific interface for a specific task. This interface can be different from the (extremely) general core interfaces or it can simply be a wrapper. In most cases it is not simply a wrapper though. The close method in the audiosink is also called when a newcaps arrives and possibly when the mute/release action is done etc.. Wim > > Ronald > -- Wim Taymans <wi...@fl...> |