| 1 |
The clock |
| 2 |
--------- |
| 3 |
|
| 4 |
The clock always returns reference time |
| 5 |
|
| 6 |
Element State change |
| 7 |
-------------------- |
| 8 |
|
| 9 |
Each element receives the current clock reference time |
| 10 |
in the state change function. |
| 11 |
|
| 12 |
On PAUSED to PLAYING |
| 13 |
|
| 14 |
An element starts sending buffers with timestamp |
| 15 |
reftime + internal counter |
| 16 |
|
| 17 |
After a seek, the element sets internal counters to 0 |
| 18 |
|
| 19 |
|
| 20 |
Bin state change |
| 21 |
---------------- |
| 22 |
|
| 23 |
PAUSED to PLAYING |
| 24 |
|
| 25 |
bin propagates clock time to children |
| 26 |
|
| 27 |
|
| 28 |
Toplevel bin state change |
| 29 |
------------------------- |
| 30 |
|
| 31 |
PAUSED to PLAYING |
| 32 |
|
| 33 |
start time is set to ref time |
| 34 |
stream time is thus 0 |
| 35 |
|
| 36 |
start time is sent to state change of children |
| 37 |
|
| 38 |
|
| 39 |
use case 1 |
| 40 |
---------- |
| 41 |
|
| 42 |
filesrc ! mad ! osssink |
| 43 |
|
| 44 |
pipeline PAUSED to PLAYING: |
| 45 |
|
| 46 |
start time = ref time |
| 47 |
|
| 48 |
filesrc state change gets starttime |
| 49 |
mad state change gets starttime |
| 50 |
osssink state change gets starttime |
| 51 |
|
| 52 |
mad sends buffers with timestamp starttime + internal counter |
| 53 |
osssink syncs these samples against the clock with starttime + timestamp |
| 54 |
|
| 55 |
PLAYING to PAUSED |
| 56 |
|
| 57 |
nothing happens |
| 58 |
|
| 59 |
use case 2 |
| 60 |
---------- |
| 61 |
|
| 62 |
{ filesrc ! mad ! queue } ! osssink |
| 63 |
|
| 64 |
let it play for a while |
| 65 |
PAUSE the thread |
| 66 |
PLAY the thread |
| 67 |
thread is not the toplevel bin, use same starttime as when |
| 68 |
it first started. |
| 69 |
do state change on elements with same starttime |
| 70 |
|
| 71 |
use case 3 |
| 72 |
---------- |
| 73 |
|
| 74 |
filesrc ! mad ! mixer ! osssink |
| 75 |
|
| 76 |
! |
| 77 |
filesrc ! mad !-^ |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|