[vlc-devel] [PATCH] amt: schedule timer w/interval once UDP received
thomas at gllm.fr
Fri Feb 12 07:38:05 UTC 2021
On Wed, Feb 10, 2021, at 20:21, Natalie Landsberg wrote:
> Currently streaming using AMT times out after approximately 4mins for a
> stream due to the timer not arming properly with an interval.
> The timer for refreshing the membership update message every QQIC is
> never actually armed aside from
> scenarios where a one-shot timer is used. This will only arm the timer
> once a valid relay is found
> and sets it on the interval received in the igmp query.
> I don't recall if I was the one who added in the single shots of the
> timer, but I'm wondering if we even need them.
> We most definitely need the periodic update.
> If I'm using vlc_timer_schedule wrong please do let me know.
> modules/access/amt.c | 3 +++
> 1 file changed, 3 insertions(+)
> diff --git a/modules/access/amt.c b/modules/access/amt.c
> index 52bf0271ef..08aef94e42 100644
> --- a/modules/access/amt.c
> +++ b/modules/access/amt.c
> @@ -746,6 +746,9 @@ static bool open_amt_tunnel( stream_t *p_access )
> block_Release( pkt );
> msg_Dbg( p_access, "Got UDP packet from multicast group
> via AMT relay %s, continuing...", relay_ip );
> + /* Start the timer for when the membership update to keep
> stream alive needs to be sent. */
> + vlc_timer_schedule( sys->updateTimer, false,
> + VLC_TICK_FROM_SEC(
> sys->relay_igmp_query.qqic ), VLC_TICK_FROM_SEC(
> sys->relay_igmp_query.qqic ) );
I do think that the interval parameter (the last one) should be 0 to fire this timer only once.
Indeed, you can see from the timer callback, amt_update_timer_cb the following code:
/* Arms the timer again for a single shot from this callback. That way, the
* time spent in amt_send_mem_update() is taken into consideration. */
vlc_timer_schedule( sys->updateTimer, false,
VLC_TICK_FROM_SEC( sys->relay_igmp_query.qqic ), 0 );
> break; /* found an active server sending UDP packets, so
> exit loop */
> 2.24.3 (Apple Git-128)
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel