[vlc-devel] [PATCH] filter: don't create blending filters for fake fmt

Thomas Guillem thomas at gllm.fr
Thu Apr 23 09:40:30 CEST 2015


On Thu, Apr 23, 2015, at 09:22, Rémi Denis-Courmont wrote:
> Le 2015-04-23 10:06, Thomas Guillem a écrit :
> > Since we know the filter configure will fail.
> 
> Why do you want this for? I think at least VDPAU blend could be 
> implemented - I just did not see a use for it so far.

If I use an android opaque surface for video but don't have a surface
for subtitles (case that won't happen from the android app, but that may
be happen when using libvlc), filter_ConfigureBlend will fail to find a
filter that do ANOP->RGBA for each frames. I guess it can happen for
others vout/hwdec when the vout can't find a subpicture surface.

I was not sure that VDPAU blending would be possible. I don't know if
it's worth the case to add a boolean b_blendable in chroma descriptions.

> 
> > ---
> >  src/misc/filter.c | 12 +++++++++++-
> >  1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/misc/filter.c b/src/misc/filter.c
> > index 36f1ba4..fd2f362 100644
> > --- a/src/misc/filter.c
> > +++ b/src/misc/filter.c
> > @@ -33,7 +33,17 @@
> >  filter_t *filter_NewBlend( vlc_object_t *p_this,
> >                             const video_format_t *p_dst_chroma )
> >  {
> > -    filter_t *p_blend = vlc_custom_create( p_this, sizeof(*p_blend),
> > "blend" );
> > +    filter_t *p_blend;
> > +    const vlc_chroma_description_t *p_desc;
> > +
> > +    p_desc = vlc_fourcc_GetChromaDescription( p_dst_chroma->i_chroma 
> > );
> > +    if( !p_desc || p_desc->plane_count == 0 )
> > +    {
> > +        msg_Err( p_this, "Could not create blending filter for fake 
> > fmt" );
> > +        return NULL;
> > +    }
> > +
> > +    p_blend = vlc_custom_create( p_this, sizeof(*p_blend), "blend" 
> > );
> >      if( !p_blend )
> >          return NULL;
> 
> -- 
> Rémi Denis-Courmont
> _______________________________________________
> 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