Skip to content

Commit

Permalink
ext-image-copy-capture: Add pts
Browse files Browse the repository at this point in the history
  • Loading branch information
any1 committed Sep 24, 2024
1 parent 559f400 commit 94487af
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ext-image-copy-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,12 @@ static void frame_handle_presentation_time(void *data,
struct ext_image_copy_capture_frame_v1 *frame,
uint32_t sec_hi, uint32_t sec_lo, uint32_t nsec)
{
// TODO
struct ext_image_copy_capture* self = data;

uint64_t sec = (uint64_t)sec_hi << 32 | (uint64_t)sec_lo;
uint64_t pts = sec * UINT64_C(1000000) + (uint64_t)nsec / UINT64_C(1000);
nvnc_trace("Setting buffer pts: %" PRIu64, pts);
nvnc_fb_set_pts(self->buffer->nvnc_fb, pts);
}

static struct ext_image_copy_capture_session_v1_listener session_listener = {
Expand Down

0 comments on commit 94487af

Please sign in to comment.