independent of the data stream except that offsets are used for
Yeah, if you set a tag to a time in the past, the following blocks will (likely,
based on the dynamics of the scheduler) prune it before your follow-on block can
I’d have to double check and think about the case where you use set_history for
this. It seems like it should work, but just remember that set history really just
initializes your read pointers back by
history()-1 number of items. So the tag wouldn’t go on item-2 in the stream since
index 0 of the buffer /is/ item-2 already.
Ok, I guess I should go poke around the prune_tags logic and see how it
works. If it respects history(), it wouldn’t prune tags from any item
that is available at the start of the read pointer, including history.
If it doesn’t, tags may be abandoned/pruned even though I have access to
history()-1 number of previous items, and I’m still stuck.
Functionally speaking, if I can read a sample, I should be able to read
its associated tags. But history() only involves input buffers, not
output buffers, so perhaps I’m still falling into the trap mentioned
above, i.e., the tag may be pruned before the downstream block can see
But something like this, if not exactly, should work, yes.
I’m trying to determine an “exact” solution. This is another way to work
around PFB arb resampler tag propagation issues (discussed in issue
#652). Basically I’m adding a start-of-burst tag to the first sample of
a stream pre-resampler, and then once things have been resampled, I go
back and fill in end-of-burst tags. This avoids having to know when the
PFB arb resampler adds +/- 1 samples. This block I’ve written is a
sync_block that simply does a memcpy of samples and the tag processing
Now I’m thinking a workaround could be to return noutput_items-1 items.
This way I get to check the last item of a work input buffer,
nitems_read(0)+noutput_items-1, for a start-of-burst tag and place an
end-of-burst tag at nitems_read(0)+noutput_items-2. At the next call to
work, that last item of the previous input buffer is the first item of
the input buffer, and I can put an end-of-burst tag at nitems_read(0) if
I find a tag at nitems_read(0)+1. Makes sense in my head, at least…