[vlc-devel] [vlc-commits] video_output/decoder: rename opaque to mouse_opaque

Steve Lhomme robux4 at ycbcr.xyz
Thu Jan 31 08:53:50 CET 2019


On 30/01/2019 16:46, Rémi Denis-Courmont wrote:
> Err, IIRC, the idea was that it was the owner opaque data, but it just 
> so happens that the only owner callback is for mouse handling at this 
> point.

The vout doesn't have a notion of owner. For decoder it's debatable if 
this is ever going to be used for something else.

>
> Le 30 janvier 2019 15:34:49 GMT+02:00, Steve Lhomme <git at videolan.org> 
> a écrit :
>
>     vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jan 30 14:09:50 2019 +0100| [d4a5d48af440f14937480d773076e5919e48bde8] | committer: Steve Lhomme
>
>     video_output/decoder: rename opaque to mouse_opaque
>
>     The opaque value is for the mouse_event callback.
>
>         http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d4a5d48af440f14937480d773076e5919e48bde8
>
>
>     ------------------------------------------------------------------------
>       src/input/decoder.c              | 10 +++++-----
>       src/video_output/video_output.c  |  8 ++++----
>       src/video_output/vout_internal.h |  4 ++--
>       3 files changed, 11 insertions(+), 11 deletions(-)
>
>     diff --git a/src/input/decoder.c b/src/input/decoder.c
>     index 1f5baf4c75..855b4cc8d7 100644
>     --- a/src/input/decoder.c
>     +++ b/src/input/decoder.c
>     @@ -147,7 +147,7 @@ struct decoder_owner
>           /* Mouse event */
>           vlc_mutex_t     mouse_lock;
>           vlc_mouse_event mouse_event;
>     -    void           *opaque;
>     +    void           *mouse_opaque;
>       };
>       
>       /* Pictures which are DECODER_BOGUS_VIDEO_DELAY or more in advance probably have
>     @@ -294,7 +294,7 @@ static void MouseEvent( const vlc_mouse_t *newmouse, void *user_data )
>       
>           vlc_mutex_lock( &owner->mouse_lock );
>           if( owner->mouse_event )
>     -        owner->mouse_event( newmouse, owner->opaque);
>     +        owner->mouse_event( newmouse, owner->mouse_opaque);
>           vlc_mutex_unlock( &owner->mouse_lock );
>       }
>       
>     @@ -571,7 +571,7 @@ static int vout_update_format( decoder_t *p_dec )
>                   &(vout_configuration_t) {
>                       .vout = p_vout, .fmt = &fmt,
>                       .dpb_size = dpb_size + p_dec->i_extra_picture_buffers + 1,
>     -                .mouse_event = MouseEvent, .opaque = p_dec
>     +                .mouse_event = MouseEvent, .mouse_opaque = p_dec
>                   } );
>       
>               vlc_mutex_lock( &p_owner->lock );
>     @@ -1870,7 +1870,7 @@ static decoder_t * CreateDecoder( vlc_object_t *p_parent,
>           p_owner->b_idle = false;
>       
>           p_owner->mouse_event = NULL;
>     -    p_owner->opaque = NULL;
>     +    p_owner->mouse_opaque = NULL;
>       
>           es_format_Init( &p_owner->fmt, fmt->i_cat, 0 );
>       
>     @@ -2598,7 +2598,7 @@ void input_DecoderSetVoutMouseEvent( decoder_t *dec, vlc_mouse_event mouse_event
>           vlc_mutex_lock( &owner->mouse_lock );
>       
>           owner->mouse_event = mouse_event;
>     -    owner->opaque = user_data;
>     +    owner->mouse_opaque = user_data;
>       
>           vlc_mutex_unlock( &owner->mouse_lock );
>       }
>     diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
>     index b3fe1faf14..dedba0cf05 100644
>     --- a/src/video_output/video_output.c
>     +++ b/src/video_output/video_output.c
>     @@ -1323,7 +1323,7 @@ static void ThreadProcessMouseState(vout_thread_t *vout,
>           vout->p->mouse = *m;
>       
>           if (vout->p->mouse_event)
>     -        vout->p->mouse_event(m, vout->p->opaque);
>     +        vout->p->mouse_event(m, vout->p->mouse_opaque);
>       }
>       
>       static int vout_Start(vout_thread_t *vout)
>     @@ -1460,7 +1460,7 @@ static void ThreadStop(vout_thread_t *vout)
>           assert(!vout->p->decoder_pool);
>       
>           if (vout->p->mouse_event)
>     -        vout->p->mouse_event(NULL, vout->p->opaque);
>     +        vout->p->mouse_event(NULL, vout->p->mouse_opaque);
>       }
>       
>       void vout_Cancel(vout_thread_t *vout, bool canceled)
>     @@ -1691,7 +1691,7 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
>           sys->is_late_dropped = var_InheritBool(vout, "drop-late-frames");
>       
>           sys->mouse_event = cfg->mouse_event;
>     -    sys->opaque = cfg->opaque;
>     +    sys->mouse_opaque = cfg->mouse_opaque;
>       
>           vlc_mutex_init(&sys->filter.lock);
>       
>     @@ -1780,7 +1780,7 @@ vout_thread_t *vout_Request(vlc_object_t *object,
>               vlc_join(sys->thread, NULL);
>       
>               sys->mouse_event = cfg->mouse_event;
>     -        sys->opaque = cfg->opaque;
>     +        sys->mouse_opaque = cfg->mouse_opaque;
>               sys->pause.is_on = false;
>               sys->pause.date  = VLC_TICK_INVALID;
>       
>     diff --git a/src/video_output/vout_internal.h b/src/video_output/vout_internal.h
>     index c4c1ffcd71..ee4ce67463 100644
>     --- a/src/video_output/vout_internal.h
>     +++ b/src/video_output/vout_internal.h
>     @@ -47,7 +47,7 @@ typedef struct {
>           const video_format_t *fmt;
>           unsigned             dpb_size;
>           vlc_mouse_event      mouse_event;
>     -    void                 *opaque;
>     +    void                 *mouse_opaque;
>       } vout_configuration_t;
>       #include "control.h"
>       
>     @@ -160,7 +160,7 @@ struct vout_thread_sys_t
>           /* */
>           vlc_mouse_t     mouse;
>           vlc_mouse_event mouse_event;
>     -    void            *opaque;
>     +    void            *mouse_opaque;
>       
>           /* Video output window */
>           vlc_mutex_t     window_lock;
>     ------------------------------------------------------------------------
>     vlc-commits mailing list
>     vlc-commits at videolan.org
>     https://mailman.videolan.org/listinfo/vlc-commits
>
>
> -- 
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez 
> excuser ma brièveté.
>
> _______________________________________________
> 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