[vlc-commits] qt: use VBI page input event
Rémi Denis-Courmont
git at videolan.org
Sat Mar 16 11:07:50 CET 2019
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" );
}
More information about the vlc-commits
mailing list