|
|
|
|
@ -215,9 +215,9 @@ int call_video_configure(struct UTUN_INSTANCE *inst, uint64_t id, const struct c
|
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_CALL, "video configured call=%llu encode=%u/%u decode=%u/%u", (unsigned long long)id, |
|
|
|
|
v->local.encode[0].width, v->local.encode[1].width, v->local.decode[0].width, v->local.decode[1].width); |
|
|
|
|
for (unsigned i = 0; i < 2; i++) DEBUG_DEBUG(DEBUG_CATEGORY_CALL, |
|
|
|
|
"video local limits codec=%u encode_level=%u bps=%u vbv=%u decode_level=%u bps=%u vbv=%u", |
|
|
|
|
i + 1, v->local.encode[i].level, v->local.encode[i].maximum_bps, v->local.encode[i].maximum_vbv_bits, |
|
|
|
|
v->local.decode[i].level, v->local.decode[i].maximum_bps, v->local.decode[i].maximum_vbv_bits); |
|
|
|
|
"video local limits codec=%u encode_level=%u bps=%u profiles=%u decode_level=%u bps=%u profiles=%u", |
|
|
|
|
i + 1, v->local.encode[i].level, v->local.encode[i].maximum_bps, v->local.encode[i].profiles, |
|
|
|
|
v->local.decode[i].level, v->local.decode[i].maximum_bps, v->local.decode[i].profiles); |
|
|
|
|
return control_send(v, VIDEO_CAPS); |
|
|
|
|
} |
|
|
|
|
int call_video_send_frame(struct UTUN_INSTANCE *inst, const struct call_video_frame *f) { |
|
|
|
|
@ -234,8 +234,8 @@ int call_video_send_frame(struct UTUN_INSTANCE *inst, const struct call_video_fr
|
|
|
|
|
} |
|
|
|
|
if (!v->have_peer || v->acknowledged_revision != v->local_revision) { v->need_key = 1; return 0; } |
|
|
|
|
if (!call_video_format_supported(&v->local, &v->peer, &f->format)) { |
|
|
|
|
DEBUG_WARN(DEBUG_CATEGORY_CALL, "video TX unsupported format codec=%u level=%u bitrate_cap=%u vbv=%u", |
|
|
|
|
f->format.codec, f->format.level, f->format.maximum_bps, f->format.vbv_bits); return -1; |
|
|
|
|
DEBUG_WARN(DEBUG_CATEGORY_CALL, "video TX unsupported format codec=%u level=%u bitrate_cap=%u profile=%u", |
|
|
|
|
f->format.codec, f->format.level, f->format.maximum_bps, f->format.profile); return -1; |
|
|
|
|
} |
|
|
|
|
if (v->rate_format.generation) { |
|
|
|
|
if (!call_video_same_format(&f->format, &v->rate_format)) { |
|
|
|
|
@ -288,9 +288,9 @@ int call_video_configure_rate(struct UTUN_INSTANCE *inst, uint64_t id, const str
|
|
|
|
|
call_video_rate_init(&v->rate, get_time_us()); route_tx_meter_reset(&v->production, get_time_us()); |
|
|
|
|
} |
|
|
|
|
v->applied_bps = applied; v->maximum_bps = maximum; |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_CALL, "video rate configured call=%llu generation=%llu codec=%u level=%u applied=%u cap=%u envelope=%u vbv=%u", |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_CALL, "video rate configured call=%llu generation=%llu codec=%u level=%u applied=%u cap=%u envelope=%u profile=%u", |
|
|
|
|
(unsigned long long)id, (unsigned long long)generation, format->codec, format->level, |
|
|
|
|
applied, maximum, format->maximum_bps, format->vbv_bits); return 0; |
|
|
|
|
applied, maximum, format->maximum_bps, format->profile); return 0; |
|
|
|
|
} |
|
|
|
|
int call_video_rate_applied(struct UTUN_INSTANCE *inst, uint64_t id, uint64_t generation, uint64_t request, uint32_t bps) { |
|
|
|
|
struct call_session *s = active(inst, id); |
|
|
|
|
@ -369,9 +369,9 @@ static void receive(struct ETCP_CONN *conn, struct ll_entry *entry) {
|
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_CALL, "video peer capabilities call=%llu encode=%u/%u decode=%u/%u", (unsigned long long)id, |
|
|
|
|
caps.encode[0].width, caps.encode[1].width, caps.decode[0].width, caps.decode[1].width); |
|
|
|
|
for (unsigned i = 0; i < 2; i++) DEBUG_DEBUG(DEBUG_CATEGORY_CALL, |
|
|
|
|
"video peer limits codec=%u encode_level=%u bps=%u vbv=%u decode_level=%u bps=%u vbv=%u", |
|
|
|
|
i + 1, caps.encode[i].level, caps.encode[i].maximum_bps, caps.encode[i].maximum_vbv_bits, |
|
|
|
|
caps.decode[i].level, caps.decode[i].maximum_bps, caps.decode[i].maximum_vbv_bits); |
|
|
|
|
"video peer limits codec=%u encode_level=%u bps=%u profiles=%u decode_level=%u bps=%u profiles=%u", |
|
|
|
|
i + 1, caps.encode[i].level, caps.encode[i].maximum_bps, caps.encode[i].profiles, |
|
|
|
|
caps.decode[i].level, caps.decode[i].maximum_bps, caps.decode[i].profiles); |
|
|
|
|
if (v->ops.capabilities) v->ops.capabilities(v->arg, &v->peer); |
|
|
|
|
control_send(v, VIDEO_CAPS_ACK); |
|
|
|
|
} else if (data[0] == VIDEO_CAPS_ACK && length == 17 && revision && revision <= v->local_revision) { |
|
|
|
|
|