[vlc-commits] commit: CACA: use key thread (partially fix #3661) ( 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:43:54 2010 +0300| [c80dac6550bb81e99efb216aab526a2e122071b3] | committer: Rémi Denis-Courmont 

CACA: use key thread (partially fix #3661)

(cherry picked from commit 031dec33fbe1cde74e6ef1680638435d335daafe)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=c80dac6550bb81e99efb216aab526a2e122071b3
---

 modules/video_output/Modules.am |    2 +-
 modules/video_output/caca.c     |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/Modules.am b/modules/video_output/Modules.am
index 92e1039..bbd5f2e 100644
--- a/modules/video_output/Modules.am
+++ b/modules/video_output/Modules.am
@@ -5,7 +5,7 @@ SUBDIRS = msw
 LIBTOOL=@LIBTOOL@ --tag=CC
 
 SOURCES_aa = aa.c
-SOURCES_caca = caca.c
+SOURCES_caca = caca.c keythread.h keythread.c
 SOURCES_fb = fb.c
 SOURCES_omapfb = omapfb.c
 SOURCES_ggi = ggi.c
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index 63a0d0f..82a2a54 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -34,6 +34,7 @@
 #include <vlc_plugin.h>
 #include <vlc_vout_display.h>
 #include <vlc_picture_pool.h>
+#include "keythread.h"
 
 #include <caca.h>
 
@@ -72,6 +73,7 @@ struct vout_display_sys_t {
     cucul_dither_t *dither;
 
     picture_pool_t *pool;
+    key_thread_t   *keys;
 };
 
 /**
@@ -187,6 +189,7 @@ static int Open(vlc_object_t *object)
     vout_display_SendEventFullscreen(vd, false);
     Refresh(vd);
 
+    sys->keys = vlc_CreateKeyThread(vd);
     return VLC_SUCCESS;
 
 error:
@@ -216,6 +219,7 @@ static void Close(vlc_object_t *object)
     vout_display_t *vd = (vout_display_t *)object;
     vout_display_sys_t *sys = vd->sys;
 
+    vlc_DestroyKeyThread(sys->keys);
     if (sys->pool)
         picture_pool_Delete(sys->pool);
     if (sys->dither)
@@ -476,7 +480,7 @@ static void Manage(vout_display_t *vd)
                     const int vlc = keys[i].vlc;
 
                     if (vlc >= 0)
-                        vout_display_SendEventKey(vd, vlc);
+                        vlc_EmitKey(sys->keys, vlc);
                     return;
                 }
             }



More information about the vlc-commits mailing list