mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-22 14:41:47 +00:00
d/dai: Add tracing support
This commit is contained in:
parent
09513d73af
commit
94d029ed15
|
@ -17,6 +17,7 @@
|
||||||
#include "util/u_frame.h"
|
#include "util/u_frame.h"
|
||||||
#include "util/u_format.h"
|
#include "util/u_format.h"
|
||||||
#include "util/u_logging.h"
|
#include "util/u_logging.h"
|
||||||
|
#include "util/u_trace_marker.h"
|
||||||
|
|
||||||
#include "depthai_interface.h"
|
#include "depthai_interface.h"
|
||||||
|
|
||||||
|
@ -138,6 +139,9 @@ depthai_do_one_frame(struct depthai_fs *depthai)
|
||||||
return; // Nothing to do.
|
return; // Nothing to do.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Trace-marker here for timing after we have gotten a frame.
|
||||||
|
SINK_TRACE_IDENT(depthai_frame);
|
||||||
|
|
||||||
// Get the timestamp.
|
// Get the timestamp.
|
||||||
auto duration = imgFrame->getTimestamp().time_since_epoch();
|
auto duration = imgFrame->getTimestamp().time_since_epoch();
|
||||||
auto nano = std::chrono::duration_cast<std::chrono::duration<int64_t, std::nano>>(duration);
|
auto nano = std::chrono::duration_cast<std::chrono::duration<int64_t, std::nano>>(duration);
|
||||||
|
@ -170,6 +174,8 @@ depthai_do_one_frame(struct depthai_fs *depthai)
|
||||||
static void *
|
static void *
|
||||||
depthai_mainloop(void *ptr)
|
depthai_mainloop(void *ptr)
|
||||||
{
|
{
|
||||||
|
SINK_TRACE_MARKER();
|
||||||
|
|
||||||
struct depthai_fs *depthai = (struct depthai_fs *)ptr;
|
struct depthai_fs *depthai = (struct depthai_fs *)ptr;
|
||||||
DEPTHAI_DEBUG(depthai, "DepthAI: Mainloop called");
|
DEPTHAI_DEBUG(depthai, "DepthAI: Mainloop called");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue