node: add fields to support sync

Sync is enabled when clients need time to move to a new location.
It's a bit like GStreamer preroll after a seek. Clients that need
time, increment the sync_total. Whenever a seek is done, the server
waits in the Starting state until the sync_pending is 0 (or timeout
later).

Improve atomic operations
This commit is contained in:
Wim Taymans 2019-08-28 13:56:23 +02:00
parent 0a15e1f804
commit 84405dae2a
5 changed files with 70 additions and 34 deletions

View file

@ -111,7 +111,7 @@ struct spa_io_sequence {
/** bar and beat segment */
struct spa_io_segment_bar {
uint32_t offset; /**< offset in samples of this beat */
uint64_t offset; /**< offset in segment of this beat */
float signature_num; /**< time signature numerator */
float signature_denom; /**< time signature denominator */
double bpm; /**< beats per minute */
@ -121,7 +121,7 @@ struct spa_io_segment_bar {
/** video frame segment */
struct spa_io_segment_video {
uint32_t offset; /**< offset of frame against current segment */
uint64_t offset; /** offset in segment */
struct spa_fraction framerate;
#define SPA_IO_SEGMENT_VIDEO_FLAG_DROP_FRAME (1<<0)
#define SPA_IO_SEGMENT_VIDEO_FLAG_PULL_DOWN (1<<1)