GstAudio.AudioClock¶
- Subclasses:
- None 
Methods¶
- Inherited:
- Gst.SystemClock (2), Gst.Clock (32), Gst.Object (27), GObject.Object (37) 
- Structs:
| class | 
 | 
| 
 | |
| 
 | |
| 
 | |
| 
 | 
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
| Name | Type | Access | Description | 
|---|---|---|---|
| clock | r | ||
| destroy_notify | r | ||
| func | r | ||
| last_time | r | ||
| time_offset | r | ||
| user_data | r | 
Class Details¶
- class GstAudio.AudioClock(**kwargs)¶
- Bases:
- Abstract:
- No 
- Structure:
 - GstAudio.AudioClockmakes it easy for elements to implement a- Gst.Clock, they simply need to provide a function that returns the current clock time.- This object is internally used to implement the clock in - GstAudio.AudioBaseSink.- classmethod new(name, func, *user_data)[source]¶
- Parameters:
- name ( - str) – the name of the clock
- func ( - GstAudio.AudioClockGetTimeFunc) – a function
 
- Returns:
- a new - GstAudio.AudioClockcasted to a- Gst.Clock.
- Return type:
 - Create a new - GstAudio.AudioClockinstance. Whenever the clock time should be calculated it will call func with user_data. When func returns- Gst.CLOCK_TIME_NONE, the clock will return the last reported time.
 - adjust(time)[source]¶
- Parameters:
- time ( - int) – a #GstClockTime
- Returns:
- time adjusted with the internal offset. 
- Return type:
 - Adjust time with the internal offset of the audio clock. 
 - get_time()[source]¶
- Returns:
- the time as reported by the time function of the audio clock 
- Return type:
 - Report the time as returned by the - GstAudio.AudioClockGetTimeFuncwithout applying any offsets.
 - invalidate()[source]¶
- Invalidate the clock function. Call this function when the provided - GstAudio.AudioClockGetTimeFunccannot be called anymore, for example, when the user_data becomes invalid.- After calling this function, self will return the last returned time for the rest of its lifetime. 
 - reset(time)[source]¶
- Parameters:
- time ( - int) – a #GstClockTime
 - Inform self that future calls to - GstAudio.AudioClockGetTimeFuncwill return values starting from time. The clock will update an internal offset to make sure that future calls to internal_time will return an increasing result as required by the- Gst.Clockobject.