Commit 72b37013 authored by Thiago Santini's avatar Thiago Santini

Forwards internal timestamp to clients

parent 01beb749
...@@ -63,9 +63,7 @@ void UVCCameraSession::callback(uvc_frame_t *frame) ...@@ -63,9 +63,7 @@ void UVCCameraSession::callback(uvc_frame_t *frame)
void UVCCameraSession::presentFrame(QVideoFrame frame, const qreal t) void UVCCameraSession::presentFrame(QVideoFrame frame, const qreal t)
{ {
qreal latency = frameReference.elapsed() - t; qreal latency = frameReference.elapsed() - t;
frame.setMetaData("latency", latency); frame.setMetaData("timestamp", t);
frame.map(QAbstractVideoBuffer::ReadOnly);
frame.unmap();
if (latency <= MAX_LATENCY_MS) if (latency <= MAX_LATENCY_MS)
m_surface->present(frame); m_surface->present(frame);
//else //else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment