[vlc-devel] commit: access_filter_dump: use key-action ( Rémi Denis-Courmont )
git version control
git at videolan.org
Thu Mar 27 21:42:50 CET 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Wed Mar 26 22:23:19 2008 +0200| [e59d7e85b4f4a780a19c15a641fb275170de0c2e]
access_filter_dump: use key-action
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e59d7e85b4f4a780a19c15a641fb275170de0c2e
---
modules/access_filter/dump.c | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/modules/access_filter/dump.c b/modules/access_filter/dump.c
index b0626c5..24e656d 100644
--- a/modules/access_filter/dump.c
+++ b/modules/access_filter/dump.c
@@ -121,7 +121,7 @@ static int Open (vlc_object_t *obj)
}
p_sys->tmp_max = ((int64_t)var_CreateGetInteger (access, "dump-margin")) << 20;
- var_AddCallback (access->p_libvlc, "key-pressed", KeyHandler, access);
+ var_AddCallback (access->p_libvlc, "key-action", KeyHandler, access);
return VLC_SUCCESS;
}
@@ -135,7 +135,7 @@ static void Close (vlc_object_t *obj)
access_t *access = (access_t *)obj;
access_sys_t *p_sys = access->p_sys;
- var_DelCallback (access->p_libvlc, "key-pressed", KeyHandler, access);
+ var_DelCallback (access->p_libvlc, "key-action", KeyHandler, access);
if (p_sys->stream != NULL)
fclose (p_sys->stream);
@@ -327,16 +327,7 @@ static int KeyHandler (vlc_object_t *obj, char const *varname,
(void)oldval;
(void)obj;
- for (struct hotkey *key = access->p_libvlc->p_hotkeys;
- key->psz_action != NULL; key++)
- {
- if (key->i_key == newval.i_int)
- {
- if (key->i_action == ACTIONID_DUMP)
- Trigger ((access_t *)data);
- break;
- }
- }
-
+ if (newval.i_int == ACTIONID_DUMP)
+ Trigger (access);
return VLC_SUCCESS;
}
More information about the vlc-devel
mailing list