[vlc-devel] [PATCH] Restore compatibility with recent SRT library

Julien Montant julien.montant at gmail.com
Fri Oct 16 11:27:35 CEST 2020


On 2020-10-14 08:11, Steve Lhomme wrote:

> On 2020-10-13 21:45, Julien Montant wrote:
>> The macro `SRTO_TSBPDDELAY` has been deleted from SRT.
>> This prevents the compilation with SRT versions >= v1.4.2.
>> The (unrecommended) `SRTO_LATENCY` should be used instead.
>
> I don't understand. We should use it or it's not recommended ?
I'm just quoting the comments of the SRC source code:

SRTO_LATENCY = 23,        // NOT RECOMMENDED. SET: to both SRTO_RCVLATENCY and SRTO_PEERLATENCY. GET: same as SRTO_RCVLATENCY.

I'm very likely not qualified to make the proper fix, i.e. for not using 
SRTO_TSBPDDELAY or SRTO_LATENCY all together. This is just to restore 
compatibility with the new SRT.

>
>> See the corresponding SRT commit 
>> 0e2201aff6b379979cec43fee5e8f162717f6346.
>>
>> NOTE: I was not able to find the SRT version officially supported by VLC
>> on the [contrib status wiki](https://wiki.videolan.org/Contrib_Status/).
>> The entry should probably be added.
>
> We support 1.3.0+ 
> https://code.videolan.org/videolan/vlc/-/blob/master/configure.ac#L4267
> And build 1.3.1 with a lot of patching
> https://code.videolan.org/videolan/vlc/-/blob/master/contrib/src/srt/rules.mak#L3 
>
>
OK, then the backward compatibility would not be broken by the change of 
macro since SRTO_LATENCY is around since at least SRT v.1.2.0.

As a user I read the wiki to check the supported version. I think an 
entry should be added for SRT.

>> ---
>>   modules/access/srt.c        | 2 +-
>>   modules/access_output/srt.c | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/modules/access/srt.c b/modules/access/srt.c
>> index 499a300196..d7ef51fccf 100644
>> --- a/modules/access/srt.c
>> +++ b/modules/access/srt.c
>> @@ -164,7 +164,7 @@ static bool srt_schedule_reconnect(stream_t 
>> *p_stream)
>>         /* Set latency */
>>       srt_set_socket_option( strm_obj, SRT_PARAM_LATENCY, p_sys->sock,
>> -            SRTO_TSBPDDELAY, &i_latency, sizeof(i_latency) );
>> +            SRTO_LATENCY, &i_latency, sizeof(i_latency) );
>>         /* set passphrase */
>>       if (psz_passphrase != NULL && psz_passphrase[0] != '\0') {
>> diff --git a/modules/access_output/srt.c b/modules/access_output/srt.c
>> index 0b66f24a8a..3d579eb1bd 100644
>> --- a/modules/access_output/srt.c
>> +++ b/modules/access_output/srt.c
>> @@ -155,7 +155,7 @@ static bool 
>> srt_schedule_reconnect(sout_access_out_t *p_access)
>>         /* Set latency */
>>       srt_set_socket_option( access_obj, SRT_PARAM_LATENCY, p_sys->sock,
>> -            SRTO_TSBPDDELAY, &i_latency, sizeof(i_latency) );
>> +            SRTO_LATENCY, &i_latency, sizeof(i_latency) );
>>         /* set passphrase */
>>       if (psz_passphrase != NULL && psz_passphrase[0] != '\0') {
>> -- 
>> 2.28.0
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20201016/6e6f7b63/attachment.html>


More information about the vlc-devel mailing list