phonon and synchronization (Re: KDE4 and video acquisition)

Florian Winter azasello at web.de
Sun Jan 29 19:22:06 GMT 2006


hi,

just an idea to add synchronization to the phonon API in a simple way 
that doesn't require any additional API calls for most applications, and 
which should be general enough for most back-ends:

we introduce the concept of a synchronization group which is a set of 
synchronized objects. a synchronized object may be a source or a sink 
(such as an AvCapture or AudioOutput).

by default, all synchronized objects created by the same application 
belong to the same synchronization group. if the application wants 
multiple synchronization groups, it has to explicitly create a new 
synchronization group and add synchronized objects to it.

the back-end is expected to somehow synchronize all synchronized objects 
within a synchronization group. however we do not specify how this 
should happen. all the application does is specify to the back-end what 
sources and sinks belong to the same "synchronization context" (defined 
by the synchronization group) (such as: audio and video from 
microphone+camera, an MPEG stream with audio and video, etc).

what are the advantages of this approach?
 - most common applications don't need to specify anything regarding 
synchronization
(because most applications have only one synchronization group)
 - the case of an application receiving audio and video over RTP is 
handled correctly
(by default, both sinks will be synchronized because they belong to the 
same synchronization group)
 - the back-end is free whether and how to implement synchronization
(for example, NMM synchronizes all sinks to the master audio sink, other 
back-ends might choose to perform synchronization between sources and 
sinks, etc)

what additional objects do we need?
 - a SynchronizationGroup class for managing synchronization groups
 - a SynchronizedObject class which ias a base class of all sinks and 
sources
(if this doesn't work because of multiple inheritance, a 
SynchronizationGroup may also have separate lists for sources and sinks)

keep up the good work,
fw



More information about the kde-multimedia mailing list