[vlc-commits] commit: AA: use key thread (partially fix #3661) - untested ( Rémi Denis-Courmont )
git at videolan.org
git at videolan.org
Sun May 30 13:48:34 CEST 2010
vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 30 14:46:27 2010 +0300| [e5a310b49c798d409e8233f7034289bb22f55ae8] | committer: Rémi Denis-Courmont
AA: use key thread (partially fix #3661) - untested
(cherry picked from commit 4b4350938d98feb676cc0f0573780449ff9125cb)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=e5a310b49c798d409e8233f7034289bb22f55ae8
---
modules/video_output/Modules.am | 2 +-
modules/video_output/aa.c | 18 +++++++++++-------
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/modules/video_output/Modules.am b/modules/video_output/Modules.am
index bbd5f2e..9034b71 100644
--- a/modules/video_output/Modules.am
+++ b/modules/video_output/Modules.am
@@ -4,7 +4,7 @@ SUBDIRS = msw
# obviously does not. Here is a fix for that.
LIBTOOL=@LIBTOOL@ --tag=CC
-SOURCES_aa = aa.c
+SOURCES_aa = aa.c keythread.h keythread.c
SOURCES_caca = caca.c keythread.h keythread.c
SOURCES_fb = fb.c
SOURCES_omapfb = omapfb.c
diff --git a/modules/video_output/aa.c b/modules/video_output/aa.c
index 925ecb3..5a396dd 100644
--- a/modules/video_output/aa.c
+++ b/modules/video_output/aa.c
@@ -32,6 +32,7 @@
#include <vlc_plugin.h>
#include <vlc_vout_display.h>
#include <vlc_picture_pool.h>
+#include "keythread.h"
#include <assert.h>
#include <aalib.h>
@@ -73,6 +74,7 @@ struct vout_display_sys_t {
vout_display_cfg_t state;
picture_pool_t *pool;
+ key_thread_t *keys;
};
/**
@@ -128,6 +130,7 @@ static int Open(vlc_object_t *object)
vout_display_SendEventFullscreen(vd, false);
vout_display_SendEventDisplaySize(vd, fmt.i_width, fmt.i_height, false);
+ sys->keys = vlc_CreateKeyThread(vd);
return VLC_SUCCESS;
error:
@@ -145,6 +148,7 @@ static void Close(vlc_object_t *object)
vout_display_t *vd = (vout_display_t *)object;
vout_display_sys_t *sys = vd->sys;
+ vlc_DestroyKeyTread(sys->keys);
if (sys->pool)
picture_pool_Delete(sys->pool);
aa_close(sys->aa_context);
@@ -287,26 +291,26 @@ static void Manage(vout_display_t *vd)
/* TODO keys support to complete */
case AA_UP:
- vout_display_SendEventKey(vd, KEY_UP);
+ vlc_EmitKey(sys->keys, KEY_UP);
break;
case AA_DOWN:
- vout_display_SendEventKey(vd, KEY_DOWN);
+ vlc_EmitKey(sys->keys, KEY_DOWN);
break;
case AA_RIGHT:
- vout_display_SendEventKey(vd, KEY_RIGHT);
+ vlc_EmitKey(sys->keys, KEY_RIGHT);
break;
case AA_LEFT:
- vout_display_SendEventKey(vd, KEY_LEFT);
+ vlc_EmitKey(sys->keys, KEY_LEFT);
break;
case AA_BACKSPACE:
- vout_display_SendEventKey(vd, KEY_BACKSPACE);
+ vlc_EmitKey(sys->keys, KEY_BACKSPACE);
break;
case AA_ESC:
- vout_display_SendEventKey(vd, KEY_ESC);
+ vlc_EmitKey(sys->keys, KEY_ESC);
break;
default:
if (event >= 0x20 && event <= 0x7f)
- vout_display_SendEventKey(vd, event);
+ vlc_EmitKey(sys->keys, event);
break;
}
}
More information about the vlc-commits
mailing list