Trace sampled video frames through desktop encoding and transport
This commit is contained in:
1 parent
19a135d552
commit
e2102bbbcc
2 files changed
+22
-2
No files matched your search
@@ -211,7 +211,14 @@ static void flush(struct call_video_transport *v) {
|
||||
if (call_video_fragment_encode(f, wire, sizeof(wire), &length)
|
||||
|| etcp_router_conn_send(conn, wire, length, 0)) { discard_tx(v, "router_send"); return; }
|
||||
f->offset += f->length;
|
||||
if (f->offset == f->size) pop_tx(v);
|
||||
if (f->offset == f->size) {
|
||||
if (f->pts_us % 1000000 < 34000)
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG,
|
||||
"video timing stage=send call=%llu frame=%llu pts=%lld boot_us=%llu bytes=%u queue_age_us=%llu",
|
||||
(unsigned long long)f->call_id, (unsigned long long)f->frame_id, (long long)f->pts_us,
|
||||
(unsigned long long)get_time_us(), f->size, (unsigned long long)((get_time_tb() - head->started_tb) * 100));
|
||||
pop_tx(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
static void tick(void *arg) {
|
||||
@@ -466,7 +473,13 @@ static void receive(struct ETCP_CONN *conn, struct ll_entry *entry) {
|
||||
if (!v->have_peer || !call_video_format_supported(&v->peer, &v->local, &f.format)) goto invalid;
|
||||
struct call_video_frame complete;
|
||||
int result = call_video_receiver_push(v->receiver, &f, get_time_us(), &complete);
|
||||
if (result == 1) { v->received_generation = complete.format.generation; v->ops.frame(v->arg, &complete); }
|
||||
if (result == 1) {
|
||||
if (complete.pts_us % 1000000 < 34000)
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "video timing stage=receive call=%llu frame=%llu pts=%lld boot_us=%llu bytes=%u",
|
||||
(unsigned long long)id, (unsigned long long)complete.frame_id, (long long)complete.pts_us,
|
||||
(unsigned long long)get_time_us(), complete.size);
|
||||
v->received_generation = complete.format.generation; v->ops.frame(v->arg, &complete);
|
||||
}
|
||||
else if (result < 0 || (!(f.flags & CALL_VIDEO_KEY) && call_video_receiver_needs_key(v->receiver)))
|
||||
call_video_request_key(conn->instance, id);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user