[vlc-devel] [PATCH] vout: add an OpenGL ES 2.0 vout display module for Android.

Rémi Denis-Courmont remi at remlab.net
Wed Jan 15 12:09:11 CET 2014


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.

Rémi Denis-Courmont
Sent from my NVIDIA Tegra-powered device

----- Reply message -----
De : "Felix Abecassis" <felix.abecassis at gmail.com>
Pour : "Mailing list for VLC media player developers" <vlc-devel at videolan.org>
Objet : [vlc-devel] [PATCH] vout: add an OpenGL ES 2.0 vout display module for Android.
Date : mer., janv. 15, 2014 18:32

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
+    if (window->manage)
+        window->manage(window, display);

2014/1/9 Felix Abecassis <felix.abecassis at gmail.com>:
> 2014/1/9 Rémi Denis-Courmont <remi at 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
> http://felix.abecassis.me

Félix Abecassis
vlc-devel mailing list
To unsubscribe or modify your subscription options:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140115/593100e6/attachment.html>

More information about the vlc-devel mailing list