Use XrTime for all time data
This commit is contained in:
@@ -105,7 +105,7 @@ void VideoEncoder::Encode(wivrn_session & cnx,
|
||||
bool idr = sync_needed.exchange(false);
|
||||
const char * extra = idr ? ",idr" : ",p";
|
||||
clock = cnx.get_offset();
|
||||
timing_info.encode_begin = clock.to_headset(os_monotonic_get_ns()).count();
|
||||
timing_info.encode_begin = clock.to_headset(os_monotonic_get_ns());
|
||||
cnx.dump_time("encode_begin", frame_index, os_monotonic_get_ns(), stream_idx, extra);
|
||||
|
||||
// Prepare the video shard template
|
||||
@@ -122,13 +122,13 @@ void VideoEncoder::SendData(std::span<uint8_t> data, bool end_of_frame)
|
||||
{
|
||||
std::lock_guard lock(mutex);
|
||||
if (end_of_frame)
|
||||
timing_info.send_end = clock.to_headset(os_monotonic_get_ns()).count();
|
||||
timing_info.send_end = clock.to_headset(os_monotonic_get_ns());
|
||||
if (video_dump)
|
||||
video_dump.write((char*)data.data(), data.size());
|
||||
if (shard.shard_idx == 0)
|
||||
{
|
||||
cnx->dump_time("send_begin", shard.frame_idx, os_monotonic_get_ns(), stream_idx);
|
||||
timing_info.send_begin = clock.to_headset(os_monotonic_get_ns()).count();
|
||||
timing_info.send_begin = clock.to_headset(os_monotonic_get_ns());
|
||||
}
|
||||
|
||||
shard.flags = to_headset::video_stream_data_shard::start_of_slice;
|
||||
|
||||
Reference in New Issue
Block a user