Fix metrics
This commit is contained in:
parent
9c53c4bd3a
commit
cf14b670b7
@ -44,10 +44,10 @@ void buffer_lock_capture(buffer_lock_t *buf_lock, buffer_t *buf)
|
|||||||
buf_lock->buf = buf;
|
buf_lock->buf = buf;
|
||||||
buf_lock->counter++;
|
buf_lock->counter++;
|
||||||
buf_lock->buf_time_us = get_monotonic_time_us(NULL, NULL);
|
buf_lock->buf_time_us = get_monotonic_time_us(NULL, NULL);
|
||||||
uint64_t captured_time_s = get_time_us(CLOCK_FROM_PARAMS, NULL, &buf->v4l2_buffer.timestamp, 0);
|
uint64_t captured_time_us = get_time_us(CLOCK_FROM_PARAMS, NULL, &buf->v4l2_buffer.timestamp, 0);
|
||||||
E_LOG_DEBUG(buf_lock, "Captured buffer %s (refs=%d), frame=%d, delay=%llus",
|
E_LOG_DEBUG(buf_lock, "Captured buffer %s (refs=%d), frame=%d, delay=%.1f",
|
||||||
dev_name(buf), buf ? buf->mmap_reflinks : 0, buf_lock->counter,
|
dev_name(buf), buf ? buf->mmap_reflinks : 0, buf_lock->counter,
|
||||||
buf_lock->buf_time_us - captured_time_s);
|
(buf_lock->buf_time_us - captured_time_us) / 1000.0f);
|
||||||
pthread_cond_broadcast(&buf_lock->cond_wait);
|
pthread_cond_broadcast(&buf_lock->cond_wait);
|
||||||
pthread_mutex_unlock(&buf_lock->lock);
|
pthread_mutex_unlock(&buf_lock->lock);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user