|
|
|
|
@ -148,7 +148,7 @@ static struct call_video_frame video_test_frame(uint64_t id, unsigned generation
|
|
|
|
|
struct call_video_frame f = {0}; |
|
|
|
|
f.call_id = id; f.frame_id = generation; f.pts_us = sent_timing.pts_us + generation * 30000; |
|
|
|
|
f.format = (struct call_video_format){generation, 640, 480, 30, 0, |
|
|
|
|
generation == 1 ? CALL_VIDEO_H265 : CALL_VIDEO_H264, generation == 1 ? 93 : 31, 4000000, 1000000}; |
|
|
|
|
generation == 1 ? CALL_VIDEO_H265 : CALL_VIDEO_H264, generation == 1 ? 93 : 31, 4000000, 1}; |
|
|
|
|
f.flags = CALL_VIDEO_KEY; f.size = f.length = sizeof(g_video_data); f.data = g_video_data; |
|
|
|
|
return f; |
|
|
|
|
} |
|
|
|
|
@ -517,7 +517,7 @@ static void call_tick(void* arg) {
|
|
|
|
|
for (unsigned i = 4; i < sizeof(g_video_data); i++) g_video_data[i] = (uint8_t)i; |
|
|
|
|
struct call_video_caps caps = {0}; |
|
|
|
|
caps.encode[0] = caps.encode[1] = caps.decode[0] = caps.decode[1] |
|
|
|
|
= (struct call_video_limit){1280, 720, 30, 1280 * 720 * 30, 4000000, 1000000, 31}; |
|
|
|
|
= (struct call_video_limit){1280, 720, 30, 1280 * 720 * 30, 4000000, 1, 31}; |
|
|
|
|
caps.encode[1].level = caps.decode[1].level = 93; |
|
|
|
|
if (call_video_configure(A, t->call_id, &caps, &video_ops, (void*)0) |
|
|
|
|
|| call_video_configure(B, t->call_id, &caps, &video_ops, (void*)1)) { t->result = 2; break; } |
|
|
|
|
@ -527,10 +527,10 @@ static void call_tick(void* arg) {
|
|
|
|
|
if (g_video_peer[0].decode[1].width != 1280 || g_video_peer[1].decode[1].width != 1280) break; |
|
|
|
|
struct call_video_frame f = video_test_frame(t->call_id, 1); |
|
|
|
|
if (call_video_configure_rate(A, t->call_id, &f.format, 800000, 400000)) { t->result = 2; break; } |
|
|
|
|
struct call_video_frame invalid = f; invalid.format.vbv_bits = 1000001; |
|
|
|
|
struct call_video_frame invalid = f; invalid.format.profile = 2; |
|
|
|
|
if (call_video_send_frame(A, &invalid) != -1 |
|
|
|
|
|| call_video_configure_rate(A, t->call_id, &invalid.format, 800000, 400000) != -1) { |
|
|
|
|
DEBUG_ERROR(DEBUG_CATEGORY_CALL, "video accepted VBV above peer limit"); t->result = 2; break; |
|
|
|
|
DEBUG_ERROR(DEBUG_CATEGORY_CALL, "video accepted unsupported profile"); t->result = 2; break; |
|
|
|
|
} |
|
|
|
|
int result = call_video_send_frame(A, &f); |
|
|
|
|
if (result < 0) { fprintf(stderr, "video send failed\n"); t->result = 2; break; } |
|
|
|
|
|