<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head></head><body><div style="font-size: 12pt; font-family: Calibri,sans-serif;"><div>  Hello,</div><div><br></div><div>No please. This requires polling, and for no good reasons. There is even a complaint from Android porters that the vout thread polls... And it adds latency. All sanely implemented vout window provider plugins (xcb, qt4, skins2) already have a thread or a main loop from which they fire events, at this point key presses only.</div><div><br></div><div>-- </div><div>Rémi Denis-Courmont</div><div>Sent from my NVIDIA Tegra-powered device</div><br><div id="htc_header">----- Reply message -----<br>De : "Felix Abecassis" <felix.abecassis@gmail.com><br>Pour : "Mailing list for VLC media player developers" <vlc-devel@videolan.org><br>Objet : [vlc-devel] [PATCH] vout: add an OpenGL ES 2.0 vout display module for Android.<br>Date : mer., janv. 15, 2014 18:32</div></div><br><pre style="word-wrap: break-word; white-space: pre-wrap;">I suggest adding a Manage function to the vout window module similar
to the Manage function we currently have for handling events for the
vout display module:

diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index ed7d42c..18e6b93 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -35,7 +35,7 @@
 /* */
 typedef struct vout_window_t vout_window_t;
 typedef struct vout_window_sys_t vout_window_sys_t;
-
+typedef struct vout_display_t vout_display_t;

 /**
  * Window handle type
@@ -104,6 +104,7 @@ struct vout_window_t {
      * Do not use it directly; use vout_window_Control instead.
      */
     int (*control)(vout_window_t *, int query, va_list);
+    void (*manage)(vout_window_t *, vout_display_t *);

     /* Private place holder for the vout_window_t module (optional)
      *
@@ -139,6 +140,8 @@ VLC_API void vout_window_Delete(vout_window_t *);
  */
 VLC_API int vout_window_Control(vout_window_t *, int query, ...);

+VLC_API void vout_window_Manage(vout_window_t *, vout_display_t *);
+
 /**
  * Configures the window manager state for this window.
  */
diff --git a/src/video_output/window.c b/src/video_output/window.c
index bc45bc2..9d36469 100644
--- a/src/video_output/window.c
+++ b/src/video_output/window.c
@@ -144,3 +144,8 @@ int vout_window_Control(vout_window_t *window, int
query, ...)
     return ret;
 }

+void vout_window_Manage(vout_window_t *window, vout_display_t
*display)
+{
+    if (window->manage)
+        window->manage(window, display);
+}

2014/1/9 Felix Abecassis <felix.abecassis@gmail.com>:
> 2014/1/9 Rémi Denis-Courmont <remi@remlab.net>:
>> Le jeudi 9 janvier 2014, 10:44:32 Felix Abecassis a écrit :
>>> However I don't understand why we cannot simply pass a pointer to the
>>> vout display to the vout window plugin and have a Manage function in
>>> the vout window translating events to vout_display_SendEvent() calls.
>>> You said above this won't work out of the box, why?
>>
>> Uh? Someone needs to write the code; that is all. I foresee no fundamental
>> problems.
> I thought you said otherwise, sorry if I've misunderstood you.
>
>>
>> Note however that since the vout_window life cycle is "longer" than that of
>> the vout_display, it is not *completely* straightforward.
> Thanks for pointing this out, I was not aware of this, I need to
> investigate how to solve this issue before writing the code.
>
> --
> Félix Abecassis
> <a href="http://felix.abecassis.me">http://felix.abecassis.me</a>



-- 
Félix Abecassis
<a href="http://felix.abecassis.me">http://felix.abecassis.me</a>
_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
<a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a>

</pre></body></html>