Skip to content
Snippets Groups Projects
Commit f4926565 authored by Leo Pound Singer's avatar Leo Pound Singer
Browse files

Correct timestamps and durations propagated from NDS2

parent bed2b1f3
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,7 @@
#include <gstlal.h>
#include <gstlal_nds2_framesrc.h>
#include <daqc_internal.h>
/*
......@@ -477,6 +478,14 @@ static GstFlowReturn create(GstBaseSrc *basesrc, guint64 offset, guint size, Gst
return GST_FLOW_ERROR;
}
// TODO: Ask John Zweizig how to get timestamp and duration of block; this
// struct is part of an obsolete interface according to Doxygen documentation
guint64 nsamples = data_length / element->daq_channel->bps;
basesrc->offset += nsamples;
GST_BUFFER_OFFSET_END(*buffer) = basesrc->offset;
GST_BUFFER_TIMESTAMP(*buffer) = GST_SECOND * element->daq->tb->gps + element->daq->tb->gpsn;
GST_BUFFER_DURATION(*buffer) = round(GST_SECOND * nsamples / element->daq_channel->rate);
return GST_FLOW_OK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment