[vlc-devel] [PATCH 1/7] transcode: video: factorize the code to clean the filter chains

Alexandre Janniaux ajanni at videolabs.io
Sat Aug 15 10:40:06 CEST 2020


Hi,

I have the feeling that this patchset would breaks many
points in my work and would break draining too. I'm still
unavailable until Monday, can I defer the more in-depth
review later?

Regards,
--
Alexandre Janniaux
Videolabs

On Fri, Aug 14, 2020 at 04:00:23PM +0200, Steve Lhomme wrote:
> ---
>  modules/stream_out/transcode/video.c | 27 ++++++++++++---------------
>  1 file changed, 12 insertions(+), 15 deletions(-)
>
> diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
> index ed004363497..f5100184c35 100644
> --- a/modules/stream_out/transcode/video.c
> +++ b/modules/stream_out/transcode/video.c
> @@ -402,6 +402,15 @@ static int transcode_video_filters_init( sout_stream_t *p_stream,
>      return VLC_SUCCESS;
>  }
>
> +static void transcode_video_filters_clean( sout_stream_id_sys_t *id )
> +{
> +    transcode_remove_filters( &id->p_f_chain );
> +    transcode_remove_filters( &id->p_conv_nonstatic );
> +    transcode_remove_filters( &id->p_conv_static );
> +    transcode_remove_filters( &id->p_uf_chain );
> +    transcode_remove_filters( &id->p_final_conv_static );
> +}
> +
>  void transcode_video_clean( sout_stream_id_sys_t *id )
>  {
>      /* Close encoder */
> @@ -411,11 +420,7 @@ void transcode_video_clean( sout_stream_id_sys_t *id )
>      es_format_Clean( &id->decoder_out );
>
>      /* Close filters */
> -    transcode_remove_filters( &id->p_f_chain );
> -    transcode_remove_filters( &id->p_conv_nonstatic );
> -    transcode_remove_filters( &id->p_conv_static );
> -    transcode_remove_filters( &id->p_uf_chain );
> -    transcode_remove_filters( &id->p_final_conv_static );
> +    transcode_video_filters_clean( id );
>      if( id->p_spu_blender )
>          filter_DeleteBlend( id->p_spu_blender );
>      if( id->p_spu )
> @@ -555,11 +560,7 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
>                              id->decoder_out.video.i_sar_den, p_pic->format.i_sar_den
>                          );
>                  /* Close filters, encoder format input can't change */
> -                transcode_remove_filters( &id->p_f_chain );
> -                transcode_remove_filters( &id->p_conv_nonstatic );
> -                transcode_remove_filters( &id->p_conv_static );
> -                transcode_remove_filters( &id->p_uf_chain );
> -                transcode_remove_filters( &id->p_final_conv_static );
> +                transcode_video_filters_clean( id );
>                  if( id->p_spu_blender )
>                      filter_DeleteBlend( id->p_spu_blender );
>                  id->p_spu_blender = NULL;
> @@ -693,11 +694,7 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
>                  goto error;
>              transcode_encoder_close( id->encoder );
>              /* Close filters */
> -            transcode_remove_filters( &id->p_f_chain );
> -            transcode_remove_filters( &id->p_conv_nonstatic );
> -            transcode_remove_filters( &id->p_conv_static );
> -            transcode_remove_filters( &id->p_uf_chain );
> -            transcode_remove_filters( &id->p_final_conv_static );
> +            transcode_video_filters_clean( id );
>              tag_last_block_with_flag( out, BLOCK_FLAG_END_OF_SEQUENCE );
>              b_eos = false;
>          }
> --
> 2.26.2
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list