Browse Source

Include Android streaming bridge and refine malformed wire tests

master
evgeny 1 week ago
parent
commit
938289a6f0
  1. 2
      tests/test_stream_media.c
  2. 1
      tools/chatgui-android/libutun_lite/utun_sources.cmake

2
tests/test_stream_media.c

@ -35,7 +35,7 @@ static void test_media(void) {
memcpy(saved, wire, length);
struct stream_media_block parsed;
CHECK(stream_media_parse(wire, length, &parsed) == STREAM_OK && parsed.first_frame_offset == 0);
const unsigned mutations[] = {0, 4, 5, 6, 7, 8, 12, 14, 16, 20, 24, 28, 32, 48, 52, 56, 60, 61, 72, 76, 78};
const unsigned mutations[] = {0, 4, 5, 6, 7, 8, 12, 14, 16, 20, 24, 28, 48, 52, 56, 60, 61, 72, 76, 78};
for (unsigned i = 0; i < sizeof(mutations) / sizeof(mutations[0]); i++) {
memcpy(wire, saved, length); wire[mutations[i]] = 255;
struct stream_media_block before; memset(&before, 0xa5, sizeof(before)); parsed = before;

1
tools/chatgui-android/libutun_lite/utun_sources.cmake

@ -45,6 +45,7 @@ function(utun_setup_sources LIB_DIR SRC_DIR CONFIG_DIR TOOLS_DIR)
"${CONFIG_DIR}/video_sender.c"
"${CONFIG_DIR}/photo_sender.c"
"${CONFIG_DIR}/standby.c"
"${CONFIG_DIR}/stream_bridge.c"
)
# ── Export sources ──

Loading…
Cancel
Save