[vlc-devel] [vlc-commits] aout: do not use input resource for visualization

Thomas Guillem thomas at gllm.fr
Mon Jan 21 10:35:54 CET 2019


On Fri, Jan 18, 2019, at 22:12, Rémi Denis-Courmont wrote:
> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jan 
> 18 21:13:25 2019 +0200| [abc6132f802ed64cb35d3af74377194e2fd6ea2d] | 
> committer: Rémi Denis-Courmont
> 
> aout: do not use input resource for visualization
> 
> Since the recycle flag is always false, the video output is never
> preserved, so tracking it in input resources is vain.
> 
> Creating and destroying the video output directly instead of
> deferring to decoder callbacks is also more consistent with the
> behaviour of the newer OpenGL-based visualizations.

Hello Rémi,
Your commit seems a good idea but it breaks my "clock" local branch.
cf. https://code.videolan.org/jbk/vlc/commit/5a7b9230ec4912205877f9ffcd7dc690866ab8ee

I need the audio filters to pass by the decoder in order to share the same master clock.
That way, delay and synchronization are easily applied for all audio filters (what my commit is doing).

Do you have an idea how to achieve this with your recent changes ? I'll need a way to get access to the decoder, input or es_out somehow.

PS: This is a WIP commit.



> 
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=abc6132f802ed64cb35d3af74377194e2fd6ea2d
> ---
> 
>  src/audio_output/filters.c | 17 ++++++-----------
>  1 file changed, 6 insertions(+), 11 deletions(-)
> 
> diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
> index d1b9dbecf7..3fdb68ca0b 100644
> --- a/src/audio_output/filters.c
> +++ b/src/audio_output/filters.c
> @@ -36,10 +36,9 @@
>  #include <vlc_modules.h>
>  #include <vlc_aout.h>
>  #include <vlc_filter.h>
> -#include <vlc_vout.h>                  /* for vout_Request */
> -
>  #include <libvlc.h>
>  #include "aout_internal.h"
> +#include "../video_output/vout_internal.h" /* for vout_Request */
>  
>  static filter_t *CreateFilter (vlc_object_t *obj, const char *type,
>                                 const char *name, void *sys,
> @@ -384,22 +383,18 @@ static int VisualizationCallback (vlc_object_t 
> *obj, const char *var,
>  
>  vout_thread_t *aout_filter_GetVout(filter_t *filter, const video_format_t *fmt)
>  {
> -    /* NOTE: This only works from aout_filters_t.
> -     * If you want to use visualization filters from another place, you will
> -     * need to add a new pf_aout_request_vout callback or store a pointer
> -     * to aout_request_vout_t inside filter_t (i.e. a level of indirection). */
> -    const aout_request_vout_t *req = filter->owner.sys;
>      video_format_t adj_fmt = *fmt;
> +    vout_configuration_t cfg = { .fmt = &adj_fmt, .dpb_size = 1 };
>  
>      video_format_AdjustColorSpace(&adj_fmt);
> -    return req->pf_request_vout(req->p_private, NULL, &adj_fmt);
> +
> +    return vout_Request(VLC_OBJECT(filter), &cfg, NULL);
>  }
>  
>  void aout_filter_PutVout(filter_t *filter, vout_thread_t *vout)
>  {
> -    const aout_request_vout_t *req = filter->owner.sys;
> -
> -    req->pf_request_vout(req->p_private, vout, NULL);
> +    assert(vout->obj.parent == VLC_OBJECT(filter));
> +    vout_CloseAndRelease(vout);
>  }
>  
>  static int AppendFilter(vlc_object_t *obj, const char *type, const char *name,
> 
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits
>


More information about the vlc-devel mailing list