ZLMediaKit/tests
Miau Lightouch a9e0e1a81e
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
DockerPy / build (push) Has been cancelled
Linux / build (push) Has been cancelled
Linux_Python / build (push) Has been cancelled
macOS / build (push) Has been cancelled
macOS_Python / build (push) Has been cancelled
Windows / build (push) Has been cancelled
Windows_Python / build (push) Has been cancelled
fix(webrtc): fix GStreamer WHEP interop (#4720)
## Summary

This PR fixes GStreamer interoperability issues during WebRTC/WHEP
negotiation with ZLMediaServer.

GStreamer could fail to establish the connection for two separate
reasons:

1. ZLMediaServer generated a non-compliant ICE `ufrag`. The generated
value contained `_`, which is not a valid ICE character, so GStreamer
rejected the SDP.
2. ZLMediaServer did not correctly handle `bundle-only` offers and could
answer an accepted bundled m-line with `port=0`, which caused the later
WHEP negotiation to fail.

## Changes

- Generate ICE `ufrag` values using ICE-compliant characters only.
- Preserve and handle `a=bundle-only` correctly during SDP parsing and
answer generation.
- Return `port=9` instead of `port=0` for accepted bundled m-lines.
- Add regression coverage for `bundle-only` SDP handling.
- URL-encode `delete_webrtc` query parameters in the returned `Location`
header so ICE-safe identifiers remain round-trippable over HTTP.

## Validation

- Built with WebRTC and SCTP enabled.
- Added regression test: `test_webrtc_regression`
- Verified:
  - ICE-safe identifier round-trip through `delete_webrtc`
  - `bundle-only` SDP answer generation
2026-04-21 11:37:08 +08:00
..
DeviceHK AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00
bom.cpp AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00
CMakeLists.txt fix(webrtc): fix GStreamer WHEP interop (#4720) 2026-04-21 11:37:08 +08:00
README.md Modify the readme description (#2859) 2023-10-12 14:38:45 +08:00
tab.cpp AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00
test_bench_forward.cpp AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00
test_bench_proxy.cpp AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00
test_bench_pull.cpp AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00
test_bench_push.cpp 修复关闭mp4相关功能时test编译报错 (#4043) 2024-11-27 15:22:09 +08:00
test_flv.cpp 优化代码 2024-11-29 23:51:34 +08:00
test_http_head.cpp feature:添加http head请求的支持 (#4321) 2025-06-30 20:46:18 +08:00
test_httpApi.cpp AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00
test_httpClient.cpp AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00
test_ps.cpp 修复编译警告 2026-01-08 21:18:00 +08:00
test_pusher.cpp AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00
test_pusherMp4.cpp 支持webrtc推流 2025-09-22 21:06:17 +08:00
test_rtcp_nack.cpp release 8.0 2023-12-09 16:23:51 +08:00
test_rtp_pcap.cpp 修复编译警告 2026-01-08 21:18:00 +08:00
test_rtp.cpp 优化代码 2024-11-29 23:51:34 +08:00
test_server.cpp AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00
test_sortor.cpp AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00
test_webrtc_regression.cpp fix(webrtc): fix GStreamer WHEP interop (#4720) 2026-04-21 11:37:08 +08:00
test_wsClient.cpp AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00
test_wsServer.cpp AI automatically translates all comments in the code into English (#3917) 2024-09-19 14:53:50 +08:00

此目录下的所有.cpp文件将被编译成可执行程序(不包含此目录下的子目录). 子目录DeviceHK为海康IPC的适配程序,需要先下载海康的SDK才能编译, 由于操作麻烦,所以仅把源码放在这里仅供参考.

  • test_benchmark.cpp

    rtsp/rtmp性能测试客户端

  • test_httpApi.cpp

    http api 测试服务器

  • test_httpClient.cpp

    http 测试客户端

  • test_player.cpp

    rtsp/rtmp带视频渲染的客户端

  • test_pusher.cpp

    先拉流再推流的测试客户端

  • test_pusherMp4.cpp

    解复用mp4文件再推流的测试客户端

  • test_server.cpp

    rtsp/rtmp/http等服务器

  • test_wsClient.cpp

    websocket测试客户端

  • test_wsServer.cpp

    websocket回显测试服务器