[vlc-devel] [vlc-commits] qt: use VBI page input event

Thomas Guillem thomas at gllm.fr
Sun Mar 17 09:47:30 CET 2019


I don't know if such commits are useful.  This will be done completely differently when qt use the new player API.

On Sat, Mar 16, 2019, at 11:08, Rémi Denis-Courmont wrote:
> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Mar 
> 15 11:07:22 2019 +0200| [d1edf2f995342f4b20a42dd34e9515868184af9a] | 
> committer: Rémi Denis-Courmont
> 
> qt: use VBI page input event
> 
> ...instead of flakily adding a callback on the decoder.
> 
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d1edf2f995342f4b20a42dd34e9515868184af9a
> ---
> 
>  modules/gui/qt/input_manager.cpp | 18 +-----------------
>  1 file changed, 1 insertion(+), 17 deletions(-)
> 
> diff --git a/modules/gui/qt/input_manager.cpp b/modules/gui/qt/input_manager.cpp
> index 595b96248f..7ae94ded59 100644
> --- a/modules/gui/qt/input_manager.cpp
> +++ b/modules/gui/qt/input_manager.cpp
> @@ -44,8 +44,6 @@
>  
>  static int InputEvent( vlc_object_t *, const char *,
>                         vlc_value_t, vlc_value_t, void * );
> -static int VbiEvent( vlc_object_t *, const char *,
> -                     vlc_value_t, vlc_value_t, void * );
>  
>  /* Ensure arbitratry (not dynamically allocated) event IDs are not in use */
>  static inline void registerAndCheckEventIds( int start, int end )
> @@ -349,6 +347,7 @@ static int InputEvent( vlc_object_t *, const char *,
>          break;
>  
>      case INPUT_EVENT_ES:
> +    case INPUT_EVENT_VBI_PAGE:
>          event = new IMEvent( IMEvent::ItemEsChanged );
>          break;
>  
> @@ -408,16 +407,6 @@ static int InputEvent( vlc_object_t *, const char *,
>      return VLC_SUCCESS;
>  }
>  
> -static int VbiEvent( vlc_object_t *, const char *,
> -                     vlc_value_t, vlc_value_t, void *param )
> -{
> -    InputManager *im = (InputManager*)param;
> -    IMEvent *event = new IMEvent( IMEvent::ItemEsChanged );
> -
> -    QApplication::postEvent( im, event );
> -    return VLC_SUCCESS;
> -}
> -
>  void InputManager::UpdatePosition()
>  {
>      /* Update position */
> @@ -591,7 +580,6 @@ void InputManager::UpdateTeletext()
>  
>          if( p_input_vbi )
>          {
> -            var_DelCallback( p_input_vbi, "vbi-page", VbiEvent, this );
>              vlc_object_release( p_input_vbi );
>          }
>  
> @@ -600,10 +588,6 @@ void InputManager::UpdateTeletext()
>  
>          if( p_input_vbi )
>          {
> -            /* This callback is not remove explicitly, but interfaces
> -             * are guaranted to outlive input */
> -            var_AddCallback( p_input_vbi, "vbi-page", VbiEvent, this );
> -
>              i_page = var_GetInteger( p_input_vbi, "vbi-page" );
>              b_transparent = !var_GetBool( p_input_vbi, "vbi-opaque" );
>          }
> 
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits
>


More information about the vlc-devel mailing list