Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/rpicam_encoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ class RPiCamEncoder : public RPiCamApp
if (!buffer || !mem)
throw std::runtime_error("no buffer to encode");
auto ts = completed_request->metadata.get(controls::FrameWallClock);
int64_t timestamp_us = ts ? *ts : buffer->metadata().timestamp / 1000;
int64_t timestamp_ns = ts ? *ts : buffer->metadata().timestamp;
{
std::lock_guard<std::mutex> lock(encode_buffer_queue_mutex_);
encode_buffer_queue_.push(completed_request); // creates a new reference
}
encoder_->EncodeBuffer(buffer->planes()[0].fd.get(), span.size(), mem, info, timestamp_us);
encoder_->EncodeBuffer(buffer->planes()[0].fd.get(), span.size(), mem, info, timestamp_ns / 1000);

// Tell our caller that encoding is underway.
return true;
Expand Down
Loading