avformat/whip: add DTLS active role support

Add dtls_active flag to specify the dtls role.

Properly set the send key and recv key depends on DTLS role:

As DTLS server, the recv key is client master key plus salt,
the send key is server master key plus salt.
As DTLS client, the recv key is server master key plus salt,
the send key is client master key plus salt.

Signed-off-by: Jack Lau <jacklau1222@qq.com>
This commit is contained in:
Jack Lau
2025-10-10 18:06:03 +08:00
committed by stevenliu
parent 535d4047d3
commit 0e8cff52bc
2 changed files with 34 additions and 11 deletions

View File

@@ -3959,6 +3959,14 @@ Default value is 1200.
Set the buffer size, in bytes, of underlying protocol.
Default value is -1(auto). The UDP auto selects a reasonable value.
@item whip_flags @var{flags}
Possible values:
@table @samp
@item dtls_active
The muxer will try to set dtls active role and send the first client hello.
@end table
@item authorization @var{string}
The optional Bearer token for WHIP Authorization.