stream: add more timing info

Keep track of queued data in the stream
Pass delay field around to make it possible to know about the raw
software read/write pointer and the hardware one.
Start stream position at 0
This commit is contained in:
Wim Taymans 2018-07-19 13:30:27 +02:00
parent d3c203b744
commit 0d148654c0
8 changed files with 72 additions and 21 deletions

View file

@ -74,9 +74,12 @@ struct spa_io_control_range {
/** A time source */
struct spa_io_clock {
uint64_t nsec; /**< time in nanoseconds */
struct spa_fraction rate; /**< rate */
uint32_t position; /**< current position expressed in rate */
uint64_t nsec; /**< time in nanoseconds */
struct spa_fraction rate; /**< rate for position/delay */
uint64_t position; /**< current position */
uint64_t delay; /**< delay between position and hardware,
add to position for capture,
subtract for playback */
};
struct spa_type_io {