File: clocking2

package info (click to toggle)
gstreamer1.0 1.28.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,604 kB
  • sloc: ansic: 203,072; python: 1,985; sh: 566; lex: 188; lisp: 154; java: 81; makefile: 59; cpp: 58; perl: 46
file content (88 lines) | stat: -rw-r--r-- 1,348 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
The clock
---------

The clock always returns reference time

Element State change
--------------------

Each element receives the current clock reference time
in the state change function.

On PAUSED to PLAYING 

An element starts sending buffers with timestamp 
reftime + internal counter

After a seek, the element sets internal counters to 0


Bin state change
----------------

PAUSED to PLAYING

bin propagates clock time to children


Toplevel bin state change
-------------------------

PAUSED to PLAYING

start time is set to ref time
stream time is thus 0

start time is sent to state change of children


use case 1
----------

filesrc ! mad ! osssink

pipeline PAUSED to PLAYING:

start time = ref time

filesrc state change gets starttime
mad state change gets starttime
osssink state change gets starttime

mad sends buffers with timestamp starttime + internal counter
osssink syncs these samples against the clock with starttime + timestamp

PLAYING to PAUSED

nothing happens

use case 2
----------

 { filesrc ! mad ! queue } ! osssink

let it play for a while
PAUSE the thread
PLAY the thread
thread is not the toplevel bin, use same starttime as when 
it first started.
do state change on elements with same starttime

use case 3
----------

  filesrc ! mad ! mixer ! osssink

                  !
  filesrc ! mad !-^