diff --git a/docs/random/wtay/clocking2 b/docs/random/wtay/clocking2 new file mode 100644 index 0000000000..1c51f69b74 --- /dev/null +++ b/docs/random/wtay/clocking2 @@ -0,0 +1,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 !-^ + + + + + + + + + + + diff --git a/docs/random/wtay/clocking3 b/docs/random/wtay/clocking3 new file mode 100644 index 0000000000..25e1c8be37 --- /dev/null +++ b/docs/random/wtay/clocking3 @@ -0,0 +1,41 @@ + +blocking wait +------------- + +- allocate a new clock entry +- add to list of pending sync waits +- do { + wait on entry + } while (entry != restart) +- free entry/remove from list + +async wait +---------- + +- if no thread, start thread +- alloc a new clock entry +- add to list of pending async waits +- signal thread to restart timeouts + +async thread +------------ + + while (true) { + if (no entry) wait for restart + do { + take first entry + wait on it + } while (entry != restart) + call entry signal function + free entry/remove from list + } + +clock adjust +------------ + +- loop over sync/async entries +- restart all entries + + + + diff --git a/docs/random/wtay/padprobes b/docs/random/wtay/padprobes new file mode 100644 index 0000000000..18f7dddcd4 --- /dev/null +++ b/docs/random/wtay/padprobes @@ -0,0 +1,14 @@ +PadProbes +--------- + +Required functionality + + - get notification of data passing on arbitrary pad + - posibility to drop data + - posibility to change/inspect data + - single shot probe + - filter on events/buffers? + - filter on timestamp? + - filter on types of events? + +