diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-08-19 09:28:05 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-08-19 09:28:05 -0700 |
commit | de5a8a689915bc5918097168a172e11ad1059c3f (patch) | |
tree | 7e5936372aa803ad1831df542ce69c001e77051d /src | |
parent | a0dad867b7647994cafdb31aeea1289407a2363c (diff) |
til_stream: track frame in til_stream_pipe_t
This is needed for determining which tap's first on a given pipe
per-frame.
Diffstat (limited to 'src')
-rw-r--r-- | src/til_stream.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/til_stream.c b/src/til_stream.c index c508e35..eec0af4 100644 --- a/src/til_stream.c +++ b/src/til_stream.c @@ -78,6 +78,7 @@ struct til_stream_pipe_t { const void *owner_foo; /* supplemental pointer for owner's use */ char *parent_path; const til_tap_t *driving_tap; /* tap producing values for the pipe */ + unsigned frame; /* most recent frame tapped */ uint32_t hash; /* hash of (driving_tap->name_hash ^ .parent_hash) */ }; @@ -239,6 +240,7 @@ int til_stream_tap(til_stream_t *stream, const void *owner, const void *owner_fo if (pipe->driving_tap == tap) { /* this is the pipe and we're driving */ *(tap->ptr) = pipe->driving_tap->elems; + pipe->frame = stream->frame; pthread_mutex_unlock(&stream->mutex); return 0; @@ -257,6 +259,7 @@ int til_stream_tap(til_stream_t *stream, const void *owner, const void *owner_fo pipe->driving_tap = tap; *(tap->ptr) = pipe->driving_tap->elems; + pipe->frame = stream->frame; pthread_mutex_unlock(&stream->mutex); return (tap != pipe->driving_tap); @@ -282,6 +285,7 @@ int til_stream_tap(til_stream_t *stream, const void *owner, const void *owner_fo pipe->owner = *p_owner; pipe->owner_foo = *p_owner_foo; pipe->driving_tap = *p_tap; + pipe->frame = stream->frame; pipe->parent_path = strdup(parent_path); if (!pipe->parent_path) { |