![Symbian OS Library](../../../../a_stock/mainheading.gif)
![]() |
![]() |
|
Location:
devvideobase.h
class MMMFClockSource;
Defines the interface that video clock sources must to implement.
A clock source can be used to synchronize video processing to some other processing entity, for example an audio stream. The clock source is created and controlled by the DevVideo client, and passed to the video hwdevices via the DevVideo interface. This allows the hwdevice to query the current stream time, so it can ascertain which frame should be processed at any given moment.
"Stream time" is defined as the current position in the media stream. For example, when playing a video clip, the stream time will always equal the current position in the clip. So, when the clip is repositioned, the stream time will be equal to the new clip position. When the clip is paused, the stream time will pause too.
Many hwdevice implementations will use extra threads to perform the video processing, so it is essential that all implementations of the MMMFClockSource interface can be used from multiple threads. A hwdevice that receives a clock source from the DevVideo client must be able to assume that it can pass a pointer to the clock source object into another thread and use the object directly from there.
All clock source implementations must protect the methods defined in the MMMFClockSource interface so they can be called from
any thread within the current process. Practically speaking, this means using mutexes and critical sections to protect member
data from being accessed from multiple threads simultaneously. Also, any use of thread-specific handles (e.g. a CMMFDevSound
object) must be avoided from within these methods.
It can be assumed that any methods defined outside the MMMFClockSource interface (for example methods used to control the clock source) will only be executed within the DevVideo client's thread, so do not require protection.
Defined in MMMFClockSource
:
CustomInterface()
, Time()
virtual TAny *CustomInterface(TUid aInterface)=0;
Retrieves a custom interface for the clock source.
This method can be called from any thread running inside the process in which the concrete clock source was created. Note that this does not mean that all methods in the custom interface can be called from any thread - that will be specified by the custom interface itself.
|
|
virtual TTimeIntervalMicroSeconds Time()=0;
Retrieves the current stream time. For example, if a clip is being played, the stream time will be equal to the current position in the clip.
This method can be called from any thread running inside the process in which the concrete clock source was created.
|