Re: [FFmpeg-devel] [IMPORTANT] AI written TLS Code in WHIP patch

2025-07-29 Thread Jack Lau
> On Jul 30, 2025, at 04:02, Kieran Kunhya via ffmpeg-devel > wrote: > > Hello, > > It seem there is strong evidence that AI wrote TLS code as part of the > WHIP patch. It goes without saying why this is bad. Further discussion > here: > https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20053 Hello

Re: [FFmpeg-devel] [PATCH v2] Changlog: mention add WHIP muxer (experimental)

2025-07-24 Thread Jack Lau
> On Jul 25, 2025, at 12:18, Gyan Doshi wrote: > > > > On 2025-07-25 03:29 am, Jack Lau wrote: >> Signed-off-by: Jack Lau >> --- >> Changelog | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/Changelog b/Changelog >&g

[FFmpeg-devel] [PATCH v2] Changlog: mention add WHIP muxer (experimental)

2025-07-24 Thread Jack Lau
Signed-off-by: Jack Lau --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index 228029ea00..27531ad0ab 100644 --- a/Changelog +++ b/Changelog @@ -25,6 +25,7 @@ version : - APV in MP4/ISOBMFF muxing and demuxing - OpenHarmony hardware decoder/encoder

[FFmpeg-devel] [FFFjo] Re: [FFmpeg/FFmpeg] avformat/whip: add NACK, RTX, DTLS active role support (PR #20030)

2025-07-24 Thread Jack Lau
*JackLau* force-pushed the *whip* from *d0d5c8ddde* ( https://code.ffmpeg.org/FFmpeg/FFmpeg/commit/d0d5c8dddef1c958596cb920559f3b27fb5ff4ed ) to *3d7807e03f* ( https://code.ffmpeg.org/FFmpeg/FFmpeg/commit/3d7807e03f17fb6222d15c452978f445720549cc ). --- View it on FFmpeg Forgejo ( https://code

[FFmpeg-devel] [FFFjo] [FFmpeg/FFmpeg] avformat/whip: add NACK, RTX, DTLS active role support (PR #20030)

2025-07-24 Thread Jack Lau
This patchset mainly add NACK, RTX, DTLS active support, fix some issues and optimize the ICE and DTLS code This version fix issue: * fix https://ffmpeg.org/pipermail/ffmpeg-devel/2025-July/346906.html * fix build error when openssl is 1.1.0, log: libavformat/tls_openssl.c: In function ‘tls_writ

Re: [FFmpeg-devel] [PATCH v5 12/15] avformat/tls_openssl: directly use mtu in TLSShared

2025-07-23 Thread Jack Lau
> On Jul 22, 2025, at 20:43, Timo Rothenpieler wrote: > > On 22/07/2025 14:36, Jack Lau wrote: >> Openssl 1.1.0 version haven't DTLS_get_data_mtu API >> Signed-off-by: Jack Lau >> --- >> libavformat/tls_openssl.c | 2 +- >> 1 file changed, 1

[FFmpeg-devel] [PATCH] Changlog: mention add WHIP muxer (experimental)

2025-07-23 Thread Jack Lau
Signed-off-by: Jack Lau --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index 228029ea00..1c6c27919f 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are

[FFmpeg-devel] [PATCH v5 15/15] doc: add doc for dtls and whip

2025-07-22 Thread Jack Lau
Signed-off-by: Jack Lau --- doc/muxers.texi| 29 ++--- doc/protocols.texi | 78 ++ 2 files changed, 103 insertions(+), 4 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index d2ee90bf33..393e606e12 100644 --- a/doc

[FFmpeg-devel] [PATCH v5 14/15] avformat/tls_openssl: cleanup the pointer name of TLSContext and TLSShared

2025-07-22 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 236 +++--- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 9a8456c438..d42c5c95cf 100644 --- a/libavformat/tls_openssl.c +++ b

[FFmpeg-devel] [PATCH v5 13/15] avformat/tls: add new option use_srtp to control whether enable it

2025-07-22 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/tls.h | 2 ++ libavformat/tls_openssl.c | 24 libavformat/whip.c| 1 + 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/libavformat/tls.h b/libavformat/tls.h index 157c0d0256..a11f8d6afb 100644

[FFmpeg-devel] [PATCH v5 12/15] avformat/tls_openssl: directly use mtu in TLSShared

2025-07-22 Thread Jack Lau
Openssl 1.1.0 version haven't DTLS_get_data_mtu API Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index fa852aac18..54860857c0 100644 --- a/libavformat/tls_open

[FFmpeg-devel] [PATCH v5 11/15] avformat/whip: simplify and modularize the ICE and DTLS

2025-07-22 Thread Jack Lau
Fmpeg's request to ensure candidate pair become valid in both directions. Then the peer does nomination, and ICE is done. Signed-off-by: Jack Lau --- libavformat/whip.c | 135 + 1 file changed, 62 insertions(+), 73 deletions(-) diff --git a/

[FFmpeg-devel] [PATCH v5 10/15] avformat/whip: remove WHIP_STATE_DTLS_CONNECTING

2025-07-22 Thread Jack Lau
This value is only useful when dtls handshake is NONBLOCK mode, dtls handshake just need to call ffurl_handshake once since it force block mode. Signed-off-by: Jack Lau --- libavformat/whip.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/libavformat

[FFmpeg-devel] [PATCH v5 09/15] avformat/whip: check the peer whether is ice lite

2025-07-22 Thread Jack Lau
See RFC 5245 Section 4.3: If an agent is a lite implementation, it MUST include an "a=ice-lite" session-level attribute in its SDP. If an agent is a full implementation, it MUST NOT include this attribute. Signed-off-by: Jack Lau --- libavformat/whip.c | 3 +++ 1 file changed, 3

[FFmpeg-devel] [PATCH v5 08/15] avformat/whip: remove DTLSState enum

2025-07-22 Thread Jack Lau
This patch aims to simplify the dtls handshake process since dtls handshake use force block mode We can just use the return code instead of DTLSState enum Signed-off-by: Jack Lau --- libavformat/tls.h | 15 -- libavformat/tls_openssl.c | 7 - libavformat/tls_schannel.c

[FFmpeg-devel] [PATCH v5 07/15] avformat/whip: add support for active dtls role

2025-07-22 Thread Jack Lau
master key plus salt. Signed-off-by: Jack Lau --- libavformat/whip.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index 094d3a0a4c..e02ed7a8a4 100644 --- a/libavformat/whip.c +++ b/libavformat/whip.c

[FFmpeg-devel] [PATCH v5 06/15] avformat/whip: reindent whip options

2025-07-22 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/whip.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index 5907865d22..094d3a0a4c 100644 --- a/libavformat/whip.c +++ b/libavformat/whip.c @@ -2090,13 +2090,13 @@ static int

[FFmpeg-devel] [PATCH v5 05/15] avformat/whip: implement NACK and RTX suppport

2025-07-22 Thread Jack Lau
Garcia Murillo Signed-off-by: Jack Lau --- libavformat/whip.c | 206 - 1 file changed, 202 insertions(+), 4 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index 4de8eb2601..5907865d22 100644 --- a/libavformat/whip.c +++ b

[FFmpeg-devel] [PATCH v5 04/15] WHIP: X509 cert serial number should be positive.

2025-07-22 Thread Jack Lau
From: winlin See RFC5280 4.1.2.2 Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 0a7998210f..2689aa5090 100644 --- a/libavformat/tls_openssl.c +++ b

[FFmpeg-devel] [PATCH v5 03/15] avformat/whip: fix H264 profile_iop bit map for SDP

2025-07-22 Thread Jack Lau
AVCodecParameters::profile only contains constraint_set1_flag (AV_PROFILE_H264_CONSTRAINED 1<<9). So add H264 constraints flag fully parse refer to hlsenc write_codec_attr Signed-off-by: Jack Lau --- libavformat/whip.c | 47 -- 1 file chang

[FFmpeg-devel] [PATCH v5 01/15] avformat/whip: add whip_flags ignore_ipv6 to skip IPv6 ICE candidates

2025-07-22 Thread Jack Lau
mark this ignore_ipv6 flag could ignore any IPv6 ICE candidate, preventing “No route to host” errors on devices without IPv6 connectivity. Signed-off-by: Jack Lau --- libavformat/whip.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/libavformat/whip.c b

[FFmpeg-devel] [PATCH v5 02/15] avformat/whip: fix typos

2025-07-22 Thread Jack Lau
Remove redundant "WHIP: " prefix in log context since it already add whip context. Fix grammers in whip options descriptions Signed-off-by: Jack Lau --- libavformat/whip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/whip.c b/libavformat/wh

[FFmpeg-devel] [PATCH v5 00/15] avformat/whip: Add NACK, RTX, DTLS active support

2025-07-22 Thread Jack Lau
~ 3. clean up dtls code 4. add doc for whip and dtls Jack Lau (14): avformat/whip: add whip_flags ignore_ipv6 to skip IPv6 ICE candidates avformat/whip: fix typos avformat/whip: fix H264 profile_iop bit map for SDP avformat/whip: implement NACK and RTX suppport avformat/whip: reindent w

[FFmpeg-devel] [PATCH v4 11/11] avformat/whip: simplify and modularize the ICE and DTLS

2025-07-21 Thread Jack Lau
Fmpeg's request to ensure candidate pair become valid in both directions. Then the peer does nomination, and ICE is done. Signed-off-by: Jack Lau --- libavformat/whip.c | 135 + 1 file changed, 62 insertions(+), 73 deletions(-) diff --git a/

[FFmpeg-devel] [PATCH v4 10/11] avformat/whip: remove WHIP_STATE_DTLS_CONNECTING

2025-07-21 Thread Jack Lau
This value is only useful when dtls handshake is NONBLOCK mode, dtls handshake just need to call ffurl_handshake once since it force block mode. Signed-off-by: Jack Lau --- libavformat/whip.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/libavformat

[FFmpeg-devel] [PATCH v4 09/11] avformat/whip: check the peer whether is ice lite

2025-07-21 Thread Jack Lau
See RFC 5245 Section 4.3: If an agent is a lite implementation, it MUST include an "a=ice-lite" session-level attribute in its SDP. If an agent is a full implementation, it MUST NOT include this attribute. Signed-off-by: Jack Lau --- libavformat/whip.c | 3 +++ 1 file changed, 3

[FFmpeg-devel] [PATCH v4 08/11] avformat/whip: remove DTLSState enum

2025-07-21 Thread Jack Lau
This patch aims to simplify the dtls handshake process since dtls handshake use force block mode We can just use the return code instead of DTLSState enum Signed-off-by: Jack Lau --- libavformat/tls.h | 15 -- libavformat/tls_openssl.c | 7 - libavformat/tls_schannel.c

[FFmpeg-devel] [PATCH v4 07/11] avformat/whip: add support for active dtls role

2025-07-21 Thread Jack Lau
master key plus salt. Signed-off-by: Jack Lau --- libavformat/whip.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index 094d3a0a4c..e02ed7a8a4 100644 --- a/libavformat/whip.c +++ b/libavformat/whip.c

[FFmpeg-devel] [PATCH v4 06/11] avformat/whip: reindent whip options

2025-07-21 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/whip.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index 5907865d22..094d3a0a4c 100644 --- a/libavformat/whip.c +++ b/libavformat/whip.c @@ -2090,13 +2090,13 @@ static int

[FFmpeg-devel] [PATCH v4 04/11] WHIP: X509 cert serial number should be positive.

2025-07-21 Thread Jack Lau
From: winlin See RFC5280 4.1.2.2 Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index a6b358d8f9..778595c721 100644 --- a/libavformat/tls_openssl.c +++ b

[FFmpeg-devel] [PATCH v4 05/11] avformat/whip: implement NACK and RTX suppport

2025-07-21 Thread Jack Lau
Garcia Murillo Signed-off-by: Jack Lau --- libavformat/whip.c | 206 - 1 file changed, 202 insertions(+), 4 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index 4de8eb2601..5907865d22 100644 --- a/libavformat/whip.c +++ b

[FFmpeg-devel] [PATCH v4 03/11] avformat/whip: fix H264 profile_iop bit map for SDP

2025-07-21 Thread Jack Lau
AVCodecParameters::profile only contains constraint_set1_flag (AV_PROFILE_H264_CONSTRAINED 1<<9). So add H264 constraints flag fully parse refer to hlsenc write_codec_attr Signed-off-by: Jack Lau --- libavformat/whip.c | 47 -- 1 file chang

[FFmpeg-devel] [PATCH v4 02/11] avformat/whip: fix typos

2025-07-21 Thread Jack Lau
Remove redundant "WHIP: " prefix in log context since it already add whip context. Fix grammers in whip options descriptions Signed-off-by: Jack Lau --- libavformat/whip.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/whip.c b/libavformat/wh

[FFmpeg-devel] [PATCH v4 01/11] avformat/whip: add whip_flags ignore_ipv6 to skip IPv6 ICE candidates

2025-07-21 Thread Jack Lau
mark this ignore_ipv6 flag could ignore any IPv6 ICE candidate, preventing “No route to host” errors on devices without IPv6 connectivity. Signed-off-by: Jack Lau --- libavformat/whip.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/libavformat/whip.c b

[FFmpeg-devel] [PATCH v4 00/11] avformat/whip: Add NACK, RTX, DTLS active support

2025-07-21 Thread Jack Lau
This version add DTLS active support, cleanup the ICE and DTLS code Jack Lau (10): avformat/whip: add whip_flags ignore_ipv6 to skip IPv6 ICE candidates avformat/whip: fix typos avformat/whip: fix H264 profile_iop bit map for SDP avformat/whip: implement NACK and RTX suppport avformat

Re: [FFmpeg-devel] [PATCH 02/14] avformat/tls_openssl: force dtls handshake to be blocking

2025-07-15 Thread Jack Lau
> On Jul 14, 2025, at 03:24, Timo Rothenpieler wrote: > > There is no sensible way to handle this otherwise anyway, one just has > to loop over this function until it succeeds. > --- > libavformat/tls_openssl.c | 18 -- > 1 file changed, 12 insertions(+), 6 deletions(-) > > diff

[FFmpeg-devel] [PATCH v3 9/9] avformat/tls_openssl: init DTLS context with explicit method

2025-07-13 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 344b152902..4874260b6b 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -787,7 +787,7

[FFmpeg-devel] [PATCH v3 8/9] avformat/tls_openssl: auto set the dest addr when dtls in listen mode

2025-07-13 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 13 + 1 file changed, 13 insertions(+) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 1c4d114205..344b152902 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -465,6 +465,8

[FFmpeg-devel] [PATCH v3 7/9] avformat/tls_openssl: remove requirement for dtls must init cert and key

2025-07-13 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 8 1 file changed, 8 deletions(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 4f950a2fde..1c4d114205 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -731,10 +731,6 @@ static

[FFmpeg-devel] [PATCH v3 5/9] avformat/whip: free udp socket after dtls free

2025-07-13 Thread Jack Lau
the SSL_shutdown in tls_close need call the url_bio_bwrite so we should keep udp still alive Signed-off-by: Jack Lau --- libavformat/whip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index e272254a6f..17a3cd0ea8 100644 --- a

[FFmpeg-devel] [PATCH v3 6/9] avformat/tls_openssl: replace 1 to TLS_ST_OK to be more clear

2025-07-13 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 3ed4585ecf..4f950a2fde 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -695,7 +695,7

[FFmpeg-devel] [PATCH v3 4/9] avformat/tls_openssl: make tls and dtls use one close function

2025-07-13 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index c824c5452b..3ed4585ecf 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat

[FFmpeg-devel] [PATCH v3 3/9] avformat/tls_openssl: remove all redundant "TLS: " in log with AVClass

2025-07-13 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 25318d5fca..c824c5452b 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat

[FFmpeg-devel] [PATCH v3 2/9] avformat/tls_openssl: fix dtls_handshake return code

2025-07-13 Thread Jack Lau
If the handshake is still in progress, dtls_handshake should return a status code. init ret=AVERROR(EAGAIN) to match most of FFmpeg code Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavformat/tls_openssl.c b

[FFmpeg-devel] [PATCH v3 1/9] avformat/tls: add trace function for log TLS/DTLS record

2025-07-13 Thread Jack Lau
Refer to RFC 5246, RFC 6347 Signed-off-by: Jack Lau --- libavformat/tls.c | 56 +++ libavformat/tls.h | 2 ++ libavformat/tls_openssl.c | 8 -- 3 files changed, 64 insertions(+), 2 deletions(-) diff --git a/libavformat/tls.c b

[FFmpeg-devel] [PATCH v3 0/9] Fix some issues in tls_openssl

2025-07-13 Thread Jack Lau
dtls_handshake can't return positive code when it still in progressing 2. udp server mode haven't dest_addr so we need set it through last_recv_addr 3. some code cleanup This patchset depends on Timo's latest schannel patchset More details: https://github.com/BtbN/FFmpeg/pull/3 Jac

[FFmpeg-devel] [PATCH v3 4/6] WHIP: X509 cert serial number should be positive.

2025-07-12 Thread Jack Lau
From: winlin See RFC5280 4.1.2.2 Co-authored-by: Jack Lau Signed-off-by: winlin --- libavformat/tls_openssl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 2a01fb387d..285ea166ac 100644 --- a/libavformat

[FFmpeg-devel] [PATCH v3 6/6] avformat/whip: reindent whip options

2025-07-12 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/whip.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index d954e80830..f7eb6e1323 100644 --- a/libavformat/whip.c +++ b/libavformat/whip.c @@ -2089,13 +2089,13 @@ static int

[FFmpeg-devel] [PATCH v3 5/6] avformat/whip: implement NACK and RTX suppport

2025-07-12 Thread Jack Lau
Garcia Murillo Signed-off-by: Jack Lau --- libavformat/whip.c | 206 - 1 file changed, 202 insertions(+), 4 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index f1f8d1b4ad..d954e80830 100644 --- a/libavformat/whip.c +++ b

[FFmpeg-devel] [PATCH v3 3/6] avformat/whip: fix H264 profile_iop bit map for SDP

2025-07-12 Thread Jack Lau
AVCodecParameters::profile only contains constraint_set1_flag (AV_PROFILE_H264_CONSTRAINED 1<<9). So add H264 constraints flag fully parse refer to hlsenc write_codec_attr Signed-off-by: Jack Lau --- libavformat/whip.c | 47 -- 1 file chang

[FFmpeg-devel] [PATCH v3 2/6] avformat/whip: fix typos

2025-07-12 Thread Jack Lau
Remove redundant "WHIP: " prefix in log context since it already add whip context. Fix grammers in whip options descriptions Signed-off-by: Jack Lau --- libavformat/whip.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/whip.c b/libavformat/wh

[FFmpeg-devel] [PATCH v3 1/6] avformat/whip: add whip_flags ignore_ipv6 to skip IPv6 ICE candidates

2025-07-12 Thread Jack Lau
mark this ignore_ipv6 flag could ignore any IPv6 ICE candidate, preventing “No route to host” errors on devices without IPv6 connectivity. Signed-off-by: Jack Lau --- libavformat/whip.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/libavformat/whip.c b

[FFmpeg-devel] [PATCH v3 0/6] avformat/whip: Add NACK and RTX support

2025-07-12 Thread Jack Lau
Version 3 of https://ffmpeg.org/pipermail/ffmpeg-devel/2025-July/346052.html This patchset rebase latest commit Jack Lau (5): avformat/whip: add whip_flags ignore_ipv6 to skip IPv6 ICE candidates avformat/whip: fix typos avformat/whip: fix H264 profile_iop bit map for SDP avformat/whip

Re: [FFmpeg-devel] [PATCH v2 2/4] avformat/tls_openssl: fix dtls_handshake return code

2025-07-11 Thread Jack Lau
> On Jul 11, 2025, at 23:05, Steven Liu > wrote: > > Jack Lau <mailto:jacklau1222gm-at-gmail@ffmpeg.org>> 于2025年7月11日周五 21:22写道: >> >> If the handshake is still in progress, dtls_handshake should >> return a positive status code. >> >

[FFmpeg-devel] [PATCH v2 3/4] avformat/tls_openssl: remove all redundant "TLS: " in log with AVClass

2025-07-11 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index ffd9cd51d2..a519c8c880 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat

[FFmpeg-devel] [PATCH v2 4/4] avformat/udp: fix udp server mode haven't dest_addr

2025-07-11 Thread Jack Lau
If udp is in server mode(init local addr and port through url), then it maybe haven't dest_addr, so we should set it after udp_read get the client addr and port This feature only enable when the new udp option autodetect_dest is specified Signed-off-by: Jack Lau --- libavformat/udp.

[FFmpeg-devel] [PATCH v2 2/4] avformat/tls_openssl: fix dtls_handshake return code

2025-07-11 Thread Jack Lau
If the handshake is still in progress, dtls_handshake should return a positive status code. Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 8639ac9758

[FFmpeg-devel] [PATCH v2 1/4] avformat/tls_openssl: add record trace function

2025-07-11 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 51 +-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 2a01fb387d..8639ac9758 100644 --- a/libavformat/tls_openssl.c +++ b

[FFmpeg-devel] [PATCH v2 0/4] Fix some issues in tls_openssl and udp

2025-07-11 Thread Jack Lau
: 1. dtls_handshake can't return positive code when it still in progressing 2. udp server mode haven't dest_addr so we need set it through last_recv_addr 3. some code cleanup This patchset depends on Timo's latest schannel patchset More details: https://github.com/BtbN/FFmpeg/pull

Re: [FFmpeg-devel] [PATCH 1/4] avformat/tls_openssl: add record trace function

2025-07-09 Thread Jack Lau
> On Jul 10, 2025, at 06:16, Michael Niedermayer wrote: > > On Wed, Jul 09, 2025 at 09:36:26PM +0800, Jack Lau wrote: >> Signed-off-by: Jack Lau >> --- >> libavformat/tls_openssl.c | 51 +-- >> 1 file changed, 49 insertio

Re: [FFmpeg-devel] [PATCH 4/4] avformat/udp: fix udp server mode haven't dest_addr

2025-07-09 Thread Jack Lau
> On Jul 9, 2025, at 22:16, Timo Rothenpieler wrote: > > On 09/07/2025 15:36, Jack Lau wrote: >> If udp is in server mode(init local addr and port through url), >> then it maybe haven't dest_addr, so we should set it after udp_read >> get the client addr and po

Re: [FFmpeg-devel] [PATCH 2/4] avformat/tls_openssl: fix dtls_handshake return code

2025-07-09 Thread Jack Lau
> On Jul 9, 2025, at 22:14, Timo Rothenpieler wrote: > > On 09/07/2025 15:36, Jack Lau wrote: >> If the handshake is still in progress, dtls_handshake should >> return a positive status code. > > Shouldn't dtls_open/start also be calling it in a loop then? &g

[FFmpeg-devel] [PATCH 4/4] avformat/udp: fix udp server mode haven't dest_addr

2025-07-09 Thread Jack Lau
If udp is in server mode(init local addr and port through url), then it maybe haven't dest_addr, so we should set it after udp_read get the client addr and port Signed-off-by: Jack Lau --- libavformat/udp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/udp.c b/libavf

[FFmpeg-devel] [PATCH 3/4] avformat/tls_openssl: remove all redundant "TLS: " in log with AVClass

2025-07-09 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index ffd9cd51d2..a519c8c880 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat

[FFmpeg-devel] [PATCH 2/4] avformat/tls_openssl: fix dtls_handshake return code

2025-07-09 Thread Jack Lau
If the handshake is still in progress, dtls_handshake should return a positive status code. Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 8639ac9758

[FFmpeg-devel] [PATCH 1/4] avformat/tls_openssl: add record trace function

2025-07-09 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 51 +-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 2a01fb387d..8639ac9758 100644 --- a/libavformat/tls_openssl.c +++ b

[FFmpeg-devel] [PATCH 0/4] Fix some issues in tls_openssl and udp

2025-07-09 Thread Jack Lau
ll in progressing 2. udp server mode haven't dest_addr so we need set it through last_recv_addr 3. some code cleanup This patchset depends Timo's latest schannel patchset More details: https://github.com/BtbN/FFmpeg/pull/3 Jack Lau (4): avformat/tls_openssl: add record trace function avfor

Re: [FFmpeg-devel] [PATCH v2 2/8] avformat/udp: make recv addr of each packet available

2025-07-07 Thread Jack Lau
> On Jul 7, 2025, at 19:28, Timo Rothenpieler wrote: > > On 07/07/2025 10:03, Jack Lau wrote: >>> On Jul 7, 2025, at 02:36, Timo Rothenpieler wrote: >>> >>> --- >>> libavformat/network.h | 2 ++ >>> libavformat/udp.c | 25

Re: [FFmpeg-devel] [PATCH v2 1/8] avformat/tls: move whip specific init out of generic tls code

2025-07-07 Thread Jack Lau
> On Jul 7, 2025, at 19:26, Timo Rothenpieler wrote: > > On 07/07/2025 08:30, Jack Lau wrote: >>> On Jul 7, 2025, at 02:36, Timo Rothenpieler wrote: >>> >>> --- >>> libavformat/tls.c | 9 - >>> libavformat/tls_openssl.

Re: [FFmpeg-devel] [PATCH v2 2/8] avformat/udp: make recv addr of each packet available

2025-07-07 Thread Jack Lau
> On Jul 7, 2025, at 02:36, Timo Rothenpieler wrote: > > --- > libavformat/network.h | 2 ++ > libavformat/udp.c | 25 + > 2 files changed, 19 insertions(+), 8 deletions(-) > > diff --git a/libavformat/network.h b/libavformat/network.h > index ca214087fc..48bb75a758

Re: [FFmpeg-devel] [PATCH v2 1/8] avformat/tls: move whip specific init out of generic tls code

2025-07-06 Thread Jack Lau
> On Jul 7, 2025, at 02:36, Timo Rothenpieler wrote: > > --- > libavformat/tls.c | 9 - > libavformat/tls_openssl.c | 12 > libavformat/whip.c| 5 + > 3 files changed, 13 insertions(+), 13 deletions(-) > > diff --git a/libavformat/tls.c b/libavformat/tls

Re: [FFmpeg-devel] [PATCH 11/18] avformat/udp: make recv addr of each packet available

2025-07-05 Thread Jack Lau
> On Jul 3, 2025, at 00:56, Timo Rothenpieler wrote: > > --- > libavformat/network.h | 2 ++ > libavformat/udp.c | 25 + > 2 files changed, 19 insertions(+), 8 deletions(-) > > diff --git a/libavformat/network.h b/libavformat/network.h > index ca214087fc..48bb75a758

Re: [FFmpeg-devel] [PATCH 08/18] avformat/tls: move openssl specific init out of generic code

2025-07-05 Thread Jack Lau
> On Jul 4, 2025, at 00:41, Timo Rothenpieler wrote: > > On 03.07.2025 17:22, Jack Lau wrote: >>> On Jul 3, 2025, at 22:24, Timo Rothenpieler wrote: >>> >>> On 03.07.2025 03:07, Jack Lau wrote: >>>>> On Jul 3, 2025, at 00:56, Timo Rothenpiel

Re: [FFmpeg-devel] [PATCH 08/18] avformat/tls: move openssl specific init out of generic code

2025-07-03 Thread Jack Lau
> On Jul 3, 2025, at 22:24, Timo Rothenpieler wrote: > > On 03.07.2025 03:07, Jack Lau wrote: >>> On Jul 3, 2025, at 00:56, Timo Rothenpieler wrote: >>> >>> --- >>> libavformat/tls.c | 9 - >>> libavformat/tls_openssl.c | 3

[FFmpeg-devel] [PATCH v3 5/6] avformat/whip: implement NACK and RTX suppport

2025-07-02 Thread Jack Lau
Garcia Murillo Signed-off-by: Jack Lau --- libavformat/whip.c | 206 - 1 file changed, 202 insertions(+), 4 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index e287a3062f..b86e343419 100644 --- a/libavformat/whip.c +++ b

Re: [FFmpeg-devel] [PATCH 08/18] avformat/tls: move openssl specific init out of generic code

2025-07-02 Thread Jack Lau
> On Jul 3, 2025, at 00:56, Timo Rothenpieler wrote: > > --- > libavformat/tls.c | 9 - > libavformat/tls_openssl.c | 3 +++ > 2 files changed, 3 insertions(+), 9 deletions(-) > > diff --git a/libavformat/tls.c b/libavformat/tls.c > index 5ec4cca58a..f888970969 100644 > --- a/lib

Re: [FFmpeg-devel] [PATCH v2 5/6] avformat/whip: implement NACK and RTX suppport

2025-07-02 Thread Jack Lau
Hi > On Jul 2, 2025, at 21:46, Steven Liu > wrote: > > Jack Lau <mailto:jacklau1222gm-at-gmail@ffmpeg.org>> 于2025年7月2日周三 20:09写道: >> >> RTP retransmission described in RFC4588 (RTX) is an effective packet >> loss recovery technique for real-time

Re: [FFmpeg-devel] [PATCH 2/6] avformat/whip: reindent whip options

2025-07-02 Thread Jack Lau
> On Jul 2, 2025, at 13:10, Steven Liu > wrote: > > Jack Lau 于2025年7月2日周三 12:25写道: >> >> Signed-off-by: Jack Lau >> --- >> libavformat/whip.c | 21 ++--- >> 1 file changed, 14 insertions(+), 7 deletions(-) >> >> diff --

[FFmpeg-devel] [PATCH v2 5/6] avformat/whip: implement NACK and RTX suppport

2025-07-02 Thread Jack Lau
Garcia Murillo Signed-off-by: Jack Lau --- libavformat/whip.c | 198 - 1 file changed, 195 insertions(+), 3 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index e287a3062f..fa6e3855d3 100644 --- a/libavformat/whip.c +++ b

[FFmpeg-devel] [PATCH v2 6/6] avformat/whip: reindent whip options

2025-07-02 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/whip.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index fa6e3855d3..0c44ef6c73 100644 --- a/libavformat/whip.c +++ b/libavformat/whip.c @@ -2081,13 +2081,13 @@ static int

[FFmpeg-devel] [PATCH v2 4/6] WHIP: X509 cert serial number should be positive.

2025-07-02 Thread Jack Lau
From: winlin See RFC5280 4.1.2.2 Co-authored-by: winlin Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 2a3905891d..4733faec9c 100644 --- a/libavformat

[FFmpeg-devel] [PATCH v2 3/6] avformat/whip: fix H264 profile_iop bit map for SDP

2025-07-02 Thread Jack Lau
AVCodecParameters::profile only contains constraint_set1_flag (AV_PROFILE_H264_CONSTRAINED 1<<9). So add H264 constraints flag fully parse refer to hlsenc write_codec_attr Signed-off-by: Jack Lau --- libavformat/whip.c | 47 -- 1 file chang

[FFmpeg-devel] [PATCH v2 2/6] avformat/whip: fix typos

2025-07-02 Thread Jack Lau
Remove redundant "WHIP: " prefix in log context since it already add whip context. Fix grammers in whip options descriptions Signed-off-by: Jack Lau --- libavformat/whip.c | 152 ++--- 1 file changed, 76 insertions(+), 76 deletions(-) di

[FFmpeg-devel] [PATCH v2 1/6] avformat/whip: add whip_flags ignore_ipv6 to skip IPv6 ICE candidates

2025-07-02 Thread Jack Lau
mark this ignore_ipv6 flag could ignore any IPv6 ICE candidate, preventing “No route to host” errors on devices without IPv6 connectivity. Signed-off-by: Jack Lau --- libavformat/whip.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/libavformat/whip.c b

[FFmpeg-devel] [PATCH v2 0/6] avformat/whip: Add NACK and RTX support (depends on ignore_ipv6 patchset)

2025-07-02 Thread Jack Lau
to avoid misunderstanding * add rtx_history_size option which can set the size of rtp packet history buffer Jack Lau (5): avformat/whip: add whip_flags ignore_ipv6 to skip IPv6 ICE candidates avformat/whip: fix typos avformat/whip: fix H264 profile_iop bit map for SDP avformat/whip: implem

Re: [FFmpeg-devel] [PATCH 6/6] avformat/whip: implement NACK and RTX suppport

2025-07-02 Thread Jack Lau
> On Jul 2, 2025, at 13:16, Steven Liu > wrote: > > Jack Lau <mailto:jacklau1222gm-at-gmail@ffmpeg.org>> 于2025年7月2日周三 12:35写道: >> >> RTP retransmission described in RFC4588 (RTX) is an effective packet >> loss recovery technique for real-time

[FFmpeg-devel] [PATCH 6/6] avformat/whip: implement NACK and RTX suppport

2025-07-01 Thread Jack Lau
Garcia Murillo Signed-off-by: Jack Lau --- libavformat/whip.c | 198 - 1 file changed, 195 insertions(+), 3 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index 15d1de691e..a32177e0b4 100644 --- a/libavformat/whip.c +++ b

[FFmpeg-devel] [PATCH 4/6] avformat/whip: fix H264 profile_iop bit map for SDP

2025-07-01 Thread Jack Lau
AVCodecParameters::profile only contains constraint_set1_flag (AV_PROFILE_H264_CONSTRAINED 1<<9). So add H264 constraints flag fully parse refer to hlsenc write_codec_attr Signed-off-by: Jack Lau --- libavformat/whip.c | 47 -- 1 file chang

[FFmpeg-devel] [PATCH 5/6] WHIP: X509 cert serial number should be positive.

2025-07-01 Thread Jack Lau
From: winlin See RFC5280 4.1.2.2 Co-authored-by: winlin Signed-off-by: Jack Lau --- libavformat/tls_openssl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 2a3905891d..4733faec9c 100644 --- a/libavformat

[FFmpeg-devel] [PATCH 3/6] avformat/whip: fix typos

2025-07-01 Thread Jack Lau
Remove redundant "WHIP: " prefix in log context since it already add whip context. Fix grammers in whip options descriptions Signed-off-by: Jack Lau --- libavformat/whip.c | 152 ++--- 1 file changed, 76 insertions(+), 76 deletions(-) di

[FFmpeg-devel] [PATCH 1/6] avformat/whip: add whip_flags ignore_ipv6 to skip IPv6 ICE candidates

2025-07-01 Thread Jack Lau
mark this ignore_ipv6 flag could ignore any IPv6 ICE candidate, preventing “No route to host” errors on devices without IPv6 connectivity. Signed-off-by: Jack Lau --- libavformat/whip.c | 13 + 1 file changed, 13 insertions(+) diff --git a/libavformat/whip.c b/libavformat/whip.c

[FFmpeg-devel] [PATCH 2/6] avformat/whip: reindent whip options

2025-07-01 Thread Jack Lau
Signed-off-by: Jack Lau --- libavformat/whip.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/libavformat/whip.c b/libavformat/whip.c index be6ee9c951..8d1be90f32 100644 --- a/libavformat/whip.c +++ b/libavformat/whip.c @@ -1904,13 +1904,20 @@ static

[FFmpeg-devel] [PATCH 0/6] avformat/whip: avformat/whip: Add NACK and RTX support (depends on ignore_ipv6 patchset)

2025-07-01 Thread Jack Lau
testing that patchset until it can really work. I've been test this patch with Pion, Janus and it works well. Jack Lau (5): avformat/whip: add whip_flags ignore_ipv6 to skip IPv6 ICE candidates avformat/whip: reindent whip options avformat/whip: fix typos avformat/whip: fix H264 profil

Re: [FFmpeg-devel] [PATCH v5 3/3] avformat/whip: fix typos

2025-06-29 Thread Jack Lau
> On Jun 29, 2025, at 19:47, Timo Rothenpieler wrote: > > On 29.06.2025 05:14, Jack Lau wrote: >>> On Jun 29, 2025, at 11:11, Jack Lau wrote: >>> >>> Hi Timo, >>>> On Jun 29, 2025, at 06:49, Timo Rothenpieler wrote: >>>> >&g

Re: [FFmpeg-devel] [PATCH v5 3/3] avformat/whip: fix typos

2025-06-28 Thread Jack Lau
> On Jun 29, 2025, at 11:11, Jack Lau wrote: > > Hi Timo, >> On Jun 29, 2025, at 06:49, Timo Rothenpieler wrote: >> >> I've actually cleaned this up a bit while trying to implement DTLS via >> schannel, and effectively removed the whole section: >>

Re: [FFmpeg-devel] [PATCH v5 3/3] avformat/whip: fix typos

2025-06-28 Thread Jack Lau
Hi Timo, > On Jun 29, 2025, at 06:49, Timo Rothenpieler wrote: > > I've actually cleaned this up a bit while trying to implement DTLS via > schannel, and effectively removed the whole section: > >> https://github.com/BtbN/FFmpeg/commit/b6794f1373fb07b791cfacd2189c7efc4d6bdbcc > > There's also

Re: [FFmpeg-devel] [PATCH v4 3/3] avformat/whip: fix typos

2025-06-28 Thread Jack Lau
> On Jun 28, 2025, at 22:15, Marvin Scholz > wrote: > > On 28 Jun 2025, at 4:17, Jack Lau via ffmpeg-devel wrote: > >> AV_OPT_TYPE_INT,{ .i64 = 1200 },-1, >> INT_MAX, ENC }, >> -{ "authorization"

[FFmpeg-devel] [PATCH v5 3/3] avformat/whip: fix typos

2025-06-28 Thread Jack Lau via ffmpeg-devel
--- Begin Message --- Remove redundant "WHIP: " prefix in log context since it already add whip context. Fix grammers in whip options descriptions Signed-off-by: Jack Lau --- libavformat/tls.c | 2 +- libavformat/whip.c | 152 ++--- 2 fil

Re: [FFmpeg-devel] [PATCH v3 2/3] avformat/whip: add whip_flags ignore_ipv6 to skip IPv6 candidates

2025-06-27 Thread Jack Lau
> On Jun 27, 2025, at 22:03, Marvin Scholz > wrote: > > On 13 Jun 2025, at 10:56, Jack Lau via ffmpeg-devel wrote: > >> mark this ignore_ipv6 flag could ignore any ipv6 ICE candidate, >> preventing “No route to host” errors on devices without IPv6 connectivity. >

[FFmpeg-devel] [PATCH v4 3/3] avformat/whip: fix typos

2025-06-27 Thread Jack Lau via ffmpeg-devel
--- Begin Message --- Remove redundant "WHIP: " prefix in log context since it already add whip context. Fix grammers in whip options "The Optional" > "(Optional)" Signed-off-by: Jack Lau --- libavformat/tls.c | 2 +- libavformat/whip.c | 152 +++

  1   2   >