[vlc-commits] aa: use new event thread helper

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sat Aug  5 
23:48:14 2017 +0300| [0fb319df46e35d23e6c59aec813dc15e1f6a57f0] | committer: 
Rémi Denis-Courmont

aa: use new event thread helper

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

 modules/video_output/Makefile.am | 2 +-
 modules/video_output/aa.c| 7 ++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index a6f4acfaff..0bc69a8a42 100644
--- a/modules/video_output/Makefile.am
+++ b/modules/video_output/Makefile.am
@@ -407,7 +407,7 @@ vout_LTLIBRARIES += $(LTLIBfb)
 
 ### ASCII Art ###
 libaa_plugin_la_SOURCES = video_output/aa.c
-libaa_plugin_la_LIBADD = -laa
+libaa_plugin_la_LIBADD = libevent_thread.la -laa
 if !HAVE_WIN32
 libaa_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIBS) -lX11
 endif
diff --git a/modules/video_output/aa.c b/modules/video_output/aa.c
index e4ff1391c3..6210aeefc5 100644
--- a/modules/video_output/aa.c
+++ b/modules/video_output/aa.c
@@ -43,6 +43,8 @@
 # include 
 #endif
 
+#include "event_thread.h"
+
 /* TODO
  * - what about RGB palette ?
  */
@@ -79,6 +81,7 @@ struct vout_display_sys_t {
 aa_palette  palette;
 
 picture_pool_t  *pool;
+vout_display_event_thread_t *et;
 };
 
 /**
@@ -110,6 +113,8 @@ static int Open(vlc_object_t *object)
 }
 vout_display_DeleteWindow(vd, NULL);
 
+sys->et = VoutDisplayEventCreateThread(vd);
+
 aa_autoinitkbd(sys->aa_context, 0);
 aa_autoinitmouse(sys->aa_context, AA_MOUSEALLMASK);
 
@@ -124,7 +129,6 @@ static int Open(vlc_object_t *object)
 /* Setup vout_display now that everything is fine */
 vd->fmt = fmt;
 vd->info.has_pictures_invalid = true;
-vd->info.needs_event_thread = true;
 
 vd->pool= Pool;
 vd->prepare = Prepare;
@@ -155,6 +159,7 @@ static void Close(vlc_object_t *object)
 
 if (sys->pool)
 picture_pool_Release(sys->pool);
+VoutDisplayEventKillThread(sys->et);
 aa_close(sys->aa_context);
 free(sys);
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] caca: use new event thread helper

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sat Aug  5 
23:48:14 2017 +0300| [154505f090019bbf1514abde22e3b05943554335] | committer: 
Rémi Denis-Courmont

caca: use new event thread helper

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

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

diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index 0bc69a8a42..ce6ce877c0 100644
--- a/modules/video_output/Makefile.am
+++ b/modules/video_output/Makefile.am
@@ -419,7 +419,7 @@ vout_LTLIBRARIES += $(LTLIBaa)
 ### Coloured ASCII art ###
 libcaca_plugin_la_SOURCES = video_output/caca.c
 libcaca_plugin_la_CFLAGS = $(AM_CFLAGS) $(CACA_CFLAGS)
-libcaca_plugin_la_LIBADD = $(CACA_LIBS)
+libcaca_plugin_la_LIBADD = libevent_thread.la $(CACA_LIBS)
 if !HAVE_WIN32
 if !HAVE_DARWIN
 libcaca_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIBS) -lX11
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index b9d0cf83f0..65d317cedc 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -42,6 +42,7 @@
 #endif
 
 #include 
+#include "event_thread.h"
 
 /*
  * Module descriptor
@@ -78,6 +79,7 @@ struct vout_display_sys_t {
 cucul_dither_t *dither;
 
 picture_pool_t *pool;
+vout_display_event_thread_t *et;
 };
 
 /**
@@ -176,6 +178,8 @@ static int Open(vlc_object_t *object)
 caca_set_display_title(sys->dp,
VOUT_TITLE "(Colour AsCii Art)");
 
+sys->et = VoutDisplayEventCreateThread(vd);
+
 /* Fix format */
 video_format_t fmt = vd->fmt;
 if (fmt.i_chroma != VLC_CODEC_RGB32) {
@@ -187,7 +191,6 @@ static int Open(vlc_object_t *object)
 
 /* Setup vout_display now that everything is fine */
 vd->fmt = fmt;
-vd->info.needs_event_thread = true;
 
 vd->pool= Pool;
 vd->prepare = Prepare;
@@ -227,6 +230,7 @@ static void Close(vlc_object_t *object)
 vout_display_t *vd = (vout_display_t *)object;
 vout_display_sys_t *sys = vd->sys;
 
+VoutDisplayEventKillThread(sys->et);
 if (sys->pool)
 picture_pool_Release(sys->pool);
 if (sys->dither)

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vout: add legacy event thread helper outside core

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sat Aug  5 
23:47:32 2017 +0300| [b24bd2c007b86a42dbf6e16c772622564f08eb02] | committer: 
Rémi Denis-Courmont

vout: add legacy event thread helper outside core

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

 modules/video_output/Makefile.am|   4 ++
 modules/video_output/event_thread.c | 103 
 modules/video_output/event_thread.h |  30 +++
 3 files changed, 137 insertions(+)

diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index e25fc40a99..a6f4acfaff 100644
--- a/modules/video_output/Makefile.am
+++ b/modules/video_output/Makefile.am
@@ -454,3 +454,7 @@ vout_LTLIBRARIES += \
libvdummy_plugin.la \
libvmem_plugin.la \
libyuv_plugin.la
+
+libevent_thread_la_SOURCES = \
+   video_output/event_thread.c video_output/event_thread.h
+noinst_LTLIBRARIES += libevent_thread.la
diff --git a/modules/video_output/event_thread.c 
b/modules/video_output/event_thread.c
new file mode 100644
index 00..817de309a8
--- /dev/null
+++ b/modules/video_output/event_thread.c
@@ -0,0 +1,103 @@
+/*
+ * event.c: event thread for broken old video output display plugins
+ *
+ * Copyright (C) 2009 Laurent Aimar
+ * $Id$
+ *
+ * Authors: Laurent Aimar 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include 
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "event_thread.h"
+
+struct vout_display_event_thread {
+vout_display_t *vd;
+block_fifo_t *fifo;
+vlc_thread_t thread;
+};
+
+noreturn static void *VoutDisplayEventKeyDispatch(void *data)
+{
+vout_display_event_thread_t *vdet = data;
+vout_display_t *vd = vdet->vd;
+block_fifo_t *fifo = vdet->fifo;
+
+for (;;) {
+block_t *event = block_FifoGet(fifo);
+
+int cancel = vlc_savecancel();
+int key;
+
+memcpy(, event->p_buffer, sizeof (key));
+block_Release(event);
+vout_display_SendEventKey(vd, key);
+vlc_restorecancel(cancel);
+}
+}
+
+void VoutDisplayEventKey(vout_display_event_thread_t *vdet, int key)
+{
+if (unlikely(vdet == NULL))
+return;
+
+block_t *event = block_Alloc(sizeof (key));
+if (likely(event != NULL)) {
+memcpy(event->p_buffer, , sizeof (key));
+block_FifoPut(vdet->fifo, event);
+}
+}
+
+struct vout_display_event_thread *
+VoutDisplayEventCreateThread(vout_display_t *vd)
+{
+vout_display_event_thread_t *vdet = malloc(sizeof (*vdet));
+if (unlikely(vdet == NULL))
+return NULL;
+
+vdet->vd = vd;
+vdet->fifo = block_FifoNew();
+if (unlikely(vdet->fifo == NULL)) {
+free(vdet);
+return NULL;
+}
+
+if (vlc_clone(>thread, VoutDisplayEventKeyDispatch, vdet,
+  VLC_THREAD_PRIORITY_LOW)) {
+block_FifoRelease(vdet->fifo);
+free(vdet);
+return NULL;
+}
+return vdet;
+}
+
+void VoutDisplayEventKillThread(vout_display_event_thread_t *vdet)
+{
+vlc_cancel(vdet->thread);
+vlc_join(vdet->thread, NULL);
+block_FifoRelease(vdet->fifo);
+free(vdet);
+}
diff --git a/modules/video_output/event_thread.h 
b/modules/video_output/event_thread.h
new file mode 100644
index 00..8dd9ff1b99
--- /dev/null
+++ b/modules/video_output/event_thread.h
@@ -0,0 +1,30 @@
+/*
+ * event_thread.h: event thread for legacy video output display plugins
+ *
+ * Copyright (C) 2009 Laurent Aimar
+ * $Id$
+ *
+ * Authors: Laurent Aimar 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * 

[vlc-commits] window: deinhibit the screensaver on pause (fixes #3724)

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
18:47:16 2017 +0300| [e0a109bcdfcdd0cb6f37affa73f49ebc06dfc3c3] | committer: 
Rémi Denis-Courmont

window: deinhibit the screensaver on pause (fixes #3724)

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

 include/vlc_vout_window.h   |  2 ++
 src/video_output/video_output.c |  4 
 src/video_output/window.c   | 10 +-
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index f9a2a7dfa3..3a613d4e47 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -216,6 +216,8 @@ VLC_API vout_window_t * vout_window_New(vlc_object_t *, 
const char *module, cons
  */
 VLC_API void vout_window_Delete(vout_window_t *);
 
+void vout_window_SetInhibition(vout_window_t *window, bool enabled);
+
 static inline int vout_window_vaControl(vout_window_t *window, int query,
 va_list ap)
 {
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 471dfcf7e1..be1249a2b2 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1225,6 +1225,10 @@ static void ThreadChangePause(vout_thread_t *vout, bool 
is_paused, mtime_t date)
 }
 vout->p->pause.is_on = is_paused;
 vout->p->pause.date  = date;
+
+vout_window_t *window = vout->p->window;
+if (window != NULL)
+vout_window_SetInhibition(window, !is_paused);
 }
 
 static void ThreadFlush(vout_thread_t *vout, bool below, mtime_t date)
diff --git a/src/video_output/window.c b/src/video_output/window.c
index bd43592edb..c5e8bef33b 100644
--- a/src/video_output/window.c
+++ b/src/video_output/window.c
@@ -82,7 +82,6 @@ vout_window_t *vout_window_New(vlc_object_t *obj, const char 
*module,
 w->inhibit = vlc_inhibit_Create(VLC_OBJECT (window));
 if (w->inhibit != NULL)
 vlc_inhibit_Set(w->inhibit, VLC_INHIBIT_VIDEO);
-/* FIXME: ^ wait for vout activation, pause */
 }
 else
 w->inhibit = NULL;
@@ -113,6 +112,15 @@ void vout_window_Delete(vout_window_t *window)
 vlc_object_release(window);
 }
 
+void vout_window_SetInhibition(vout_window_t *window, bool enabled)
+{
+window_t *w = (window_t *)window;
+unsigned flags = enabled ? VLC_INHIBIT_VIDEO : VLC_INHIBIT_NONE;
+
+if (w->inhibit != NULL)
+vlc_inhibit_Set(w->inhibit, flags);
+}
+
 /* Video output display integration */
 #include 
 #include 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] extras/macosx: Disable sdl-image in configure.sh

2017-08-06 Thread Marvin Scholz
vlc | branch: master | Marvin Scholz  | Sun Aug  6 21:29:17 
2017 +0200| [2e325daaad04480d9aa4445f80f4871cdc08dc64] | committer: Marvin 
Scholz

extras/macosx: Disable sdl-image in configure.sh

Previously SDL and SDL Image was disabled with the --disable-sdl flag,
with that flag gone, SDL Image needs to be disabled explicitly instead.

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

 extras/package/macosx/configure.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extras/package/macosx/configure.sh 
b/extras/package/macosx/configure.sh
index 00e8317680..2ba0c75769 100755
--- a/extras/package/macosx/configure.sh
+++ b/extras/package/macosx/configure.sh
@@ -33,7 +33,7 @@ OPTIONS="
 --disable-xcb
 --disable-caca
 --disable-pulse
---disable-sdl
+--disable-sdl-image
 --disable-vnc
 --with-macosx-version-min=10.7
 "

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vout: make has_hide_mouse true by default

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
10:37:34 2017 +0300| [733677402b40df9a26d15dfb5e3c5884019f3da2] | committer: 
Rémi Denis-Courmont

vout: make has_hide_mouse true by default

Most video output displays either defer mouse hiding to the window
provider plugin, or do not handle the mouse events at all.
So that ought to be the default.

Also kepe the default in those display plugins that don´t handle
cursor hiding (notably X11 ones).

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

 modules/hw/mmal/vout.c   | 1 -
 modules/video_output/aa.c| 1 +
 modules/video_output/caca.c  | 1 +
 modules/video_output/caopengllayer.m | 1 -
 modules/video_output/decklink.cpp| 1 -
 modules/video_output/fb.c| 5 -
 modules/video_output/macosx.m| 1 -
 modules/video_output/vmem.c  | 5 -
 modules/video_output/yuv.c   | 5 -
 src/video_output/display.c   | 2 +-
 10 files changed, 3 insertions(+), 20 deletions(-)

diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index 1d378e3aa1..edd2b767af 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -196,7 +196,6 @@ static int Open(vlc_object_t *object)
 sys->layer = var_InheritInteger(vd, MMAL_LAYER_NAME);
 bcm_host_init();
 
-vd->info.has_hide_mouse = true;
 sys->opaque = vd->fmt.i_chroma == VLC_CODEC_MMAL_OPAQUE;
 
 status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, 
>component);
diff --git a/modules/video_output/aa.c b/modules/video_output/aa.c
index 6210aeefc5..b69ca15be7 100644
--- a/modules/video_output/aa.c
+++ b/modules/video_output/aa.c
@@ -129,6 +129,7 @@ static int Open(vlc_object_t *object)
 /* Setup vout_display now that everything is fine */
 vd->fmt = fmt;
 vd->info.has_pictures_invalid = true;
+vd->info.has_hide_mouse = false;
 
 vd->pool= Pool;
 vd->prepare = Prepare;
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index 65d317cedc..5e3579e734 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -191,6 +191,7 @@ static int Open(vlc_object_t *object)
 
 /* Setup vout_display now that everything is fine */
 vd->fmt = fmt;
+vd->info.has_hide_mouse = false;
 
 vd->pool= Pool;
 vd->prepare = Prepare;
diff --git a/modules/video_output/caopengllayer.m 
b/modules/video_output/caopengllayer.m
index 7d129a9fc6..4232d29441 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -198,7 +198,6 @@ static int Open (vlc_object_t *p_this)
 /* setup vout display */
 vout_display_info_t info = vd->info;
 info.subpicture_chromas = subpicture_chromas;
-info.has_hide_mouse = true;
 vd->info = info;
 
 vd->pool= Pool;
diff --git a/modules/video_output/decklink.cpp 
b/modules/video_output/decklink.cpp
index 2ec4126a54..7992b344c3 100644
--- a/modules/video_output/decklink.cpp
+++ b/modules/video_output/decklink.cpp
@@ -1066,7 +1066,6 @@ static int OpenVideo(vlc_object_t *p_this)
 video_format_Clean( >fmt );
 video_format_Copy( >fmt, >video.currentfmt );
 
-vd->info.has_hide_mouse = true;
 vd->pool= PoolVideo;
 vd->prepare = PrepareVideo;
 vd->display = DisplayVideo;
diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c
index 615b2c7663..765e01b1b7 100644
--- a/modules/video_output/fb.c
+++ b/modules/video_output/fb.c
@@ -300,12 +300,7 @@ static int Open(vlc_object_t *object)
 fmt.i_visible_height = sys->height;
 
 /* */
-vout_display_info_t info = vd->info;
-info.has_hide_mouse = true;
-
-/* */
 vd->fmt = fmt;
-vd->info= info;
 vd->pool= Pool;
 vd->prepare = NULL;
 vd->display = Display;
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 2770c44305..9823809a97 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -237,7 +237,6 @@ static int Open (vlc_object_t *this)
 vout_display_info_t info = vd->info;
 info.has_pictures_invalid = false;
 info.subpicture_chromas = subpicture_chromas;
-info.has_hide_mouse = true;
 
 /* Setup vout_display_t once everything is fine */
 vd->info = info;
diff --git a/modules/video_output/vmem.c b/modules/video_output/vmem.c
index 1c57a82880..a046d7c33e 100644
--- a/modules/video_output/vmem.c
+++ b/modules/video_output/vmem.c
@@ -208,13 +208,8 @@ static int Open(vlc_object_t *object)
 }
 
 /* */
-vout_display_info_t info = vd->info;
-info.has_hide_mouse = true;
-
-/* */
 vd->sys = sys;
 vd->fmt = fmt;
-vd->info= info;
 vd->pool= Pool;
 vd->prepare = Prepare;
 vd->display = Display;
diff --git a/modules/video_output/yuv.c b/modules/video_output/yuv.c
index 

[vlc-commits] vout: remove dummy dead VOUT_DISPLAY_HIDE_MOUSE controls

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
10:38:37 2017 +0300| [46a327ff5c2564e8bc7f81e419e456e8832a49a3] | committer: 
Rémi Denis-Courmont

vout: remove dummy dead VOUT_DISPLAY_HIDE_MOUSE controls

Depending on the value of info.has_hide_mouse, the control is never
called. No point in providing a dummy implementation then.

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

 modules/codec/omxil/vout.c | 3 ---
 modules/hw/mmal/vout.c | 4 
 modules/hw/vdpau/display.c | 2 --
 modules/video_output/android/display.c | 2 --
 modules/video_output/caopengllayer.m   | 2 +-
 modules/video_output/evas.c| 1 -
 modules/video_output/flaschen.c| 4 
 modules/video_output/ios.m | 3 ---
 modules/video_output/macosx.m  | 2 +-
 modules/video_output/opengl/display.c  | 2 --
 modules/video_output/wayland/shm.c | 4 
 modules/video_output/xcb/x11.c | 3 ---
 modules/video_output/xcb/xvideo.c  | 2 --
 13 files changed, 2 insertions(+), 32 deletions(-)

diff --git a/modules/codec/omxil/vout.c b/modules/codec/omxil/vout.c
index 3e659f2ced..a735466d5e 100644
--- a/modules/codec/omxil/vout.c
+++ b/modules/codec/omxil/vout.c
@@ -442,9 +442,6 @@ static int Control(vout_display_t *vd, int query, va_list 
args)
 VLC_UNUSED(args);
 
 switch (query) {
-case VOUT_DISPLAY_HIDE_MOUSE:
-return VLC_SUCCESS;
-
 default:
 msg_Err(vd, "Unknown request in omxil vout display");
 
diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index edd2b767af..782ee48c4f 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -612,10 +612,6 @@ static int vd_control(vout_display_t *vd, int query, 
va_list args)
 int ret = VLC_EGENERIC;
 
 switch (query) {
-case VOUT_DISPLAY_HIDE_MOUSE:
-ret = VLC_SUCCESS;
-break;
-
 case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
 tmp_cfg = va_arg(args, const vout_display_cfg_t *);
 if (tmp_cfg->display.width == sys->display_width &&
diff --git a/modules/hw/vdpau/display.c b/modules/hw/vdpau/display.c
index 767112a9ec..db314586dc 100644
--- a/modules/hw/vdpau/display.c
+++ b/modules/hw/vdpau/display.c
@@ -333,8 +333,6 @@ static int Control(vout_display_t *vd, int query, va_list 
ap)
 
 switch (query)
 {
-case VOUT_DISPLAY_HIDE_MOUSE:
-return VLC_EGENERIC;
 case VOUT_DISPLAY_RESET_PICTURES:
 {
 msg_Dbg(vd, "resetting pictures");
diff --git a/modules/video_output/android/display.c 
b/modules/video_output/android/display.c
index aa0cc94aff..574e91a579 100644
--- a/modules/video_output/android/display.c
+++ b/modules/video_output/android/display.c
@@ -1177,8 +1177,6 @@ static int Control(vout_display_t *vd, int query, va_list 
args)
 vout_display_sys_t *sys = vd->sys;
 
 switch (query) {
-case VOUT_DISPLAY_HIDE_MOUSE:
-return VLC_SUCCESS;
 case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
 case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
 {
diff --git a/modules/video_output/caopengllayer.m 
b/modules/video_output/caopengllayer.m
index 4232d29441..430531b2c4 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -364,7 +364,7 @@ static int Control (vout_display_t *vd, int query, va_list 
ap)
 return VLC_SUCCESS;
 }
 
-case VOUT_DISPLAY_HIDE_MOUSE:
+case VOUT_DISPLAY_HIDE_MOUSE: /* FIXME: dead code */
 {
 [NSCursor setHiddenUntilMouseMoves: YES];
 return VLC_SUCCESS;
diff --git a/modules/video_output/evas.c b/modules/video_output/evas.c
index 66daaea86b..36afcfd3e3 100644
--- a/modules/video_output/evas.c
+++ b/modules/video_output/evas.c
@@ -782,7 +782,6 @@ Control( vout_display_t *vd, int i_query, va_list ap )
 case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
 case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
 case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
-case VOUT_DISPLAY_HIDE_MOUSE:
 return VLC_EGENERIC;
 default:
 msg_Warn( vd, "Unknown request in evas_output" );
diff --git a/modules/video_output/flaschen.c b/modules/video_output/flaschen.c
index 795e02d4db..cf4c79b61c 100644
--- a/modules/video_output/flaschen.c
+++ b/modules/video_output/flaschen.c
@@ -239,10 +239,6 @@ static int Control(vout_display_t *vd, int query, va_list 
args)
 case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
 return VLC_EGENERIC;
 
-case VOUT_DISPLAY_HIDE_MOUSE:
-/* not really working */
-return VLC_SUCCESS;
-
 default:
 msg_Err(vd, "Unsupported query in vout display flaschen");
 return VLC_EGENERIC;
diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index b0333800ab..81b42c7cd0 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -283,9 +283,6 @@ static int Control(vout_display_t *vd, int query, va_list 

[vlc-commits] display: always compute mouse hide timeout

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
22:59:25 2017 +0300| [0434a322f864c7da0c05403639b48854a2e58002] | committer: 
Rémi Denis-Courmont

display: always compute mouse hide timeout

Cursor management should eventually be moved from display to the window.
(The video output core still needs to take care of the window to video
translation, and the mouse event filtering, as it already does.)
And cursor hiding should be left entirely within the window plugins.

But in the mean time, compute the correct timestamps regardless of the
cursor hiding support in display plugin, so that it also works if the
cursor is hidden by the window plugin.

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

 src/video_output/display.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/video_output/display.c b/src/video_output/display.c
index 2d91dad1a4..67b841c948 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -566,8 +566,7 @@ static void VoutDisplayEventMouse(vout_display_t *vd, int 
event, va_list args)
 
 /* */
 osys->mouse.ch_activity = true;
-if (!vd->info.has_hide_mouse)
-osys->mouse.last_moved = mdate();
+osys->mouse.last_moved = mdate();
 
 /* */
 vout_SendDisplayEventMouse(osys->vout, );

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vout: rename and invert has_hide_mouse

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
10:48:50 2017 +0300| [40c96414f343d2fd939cf3053d9dc80930891c7e] | committer: 
Rémi Denis-Courmont

vout: rename and invert has_hide_mouse

The name was meant to indicate that the plugin hid the pointer
autonomously. But it was ostensibly confused as implying that the
plugin had a mouse hiding control (basically the exact opposite).
In fact, it really meant that the mouse hiding control would NOT be
used.

This tries to provide a slightly less confusing name, and accordingly
inverts the meaning. This is also realigns with the convention that
false should be the default setting (which was broken in the grand
grand parent of this changeset).

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

 include/vlc_vout_display.h  | 4 ++--
 modules/video_output/aa.c   | 2 +-
 modules/video_output/caca.c | 2 +-
 modules/video_output/kva.c  | 2 +-
 modules/video_output/win32/direct3d11.c | 2 +-
 modules/video_output/win32/direct3d9.c  | 2 +-
 modules/video_output/win32/directdraw.c | 2 +-
 modules/video_output/win32/glwin32.c| 2 +-
 modules/video_output/win32/wingdi.c | 2 +-
 src/video_output/display.c  | 4 ++--
 10 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index d1cc1ba8a7..27566b776e 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -128,7 +128,7 @@ typedef struct {
 typedef struct {
 bool is_slow;   /* The picture memory has slow 
read/write */
 bool has_double_click;  /* Is double-click generated */
-bool has_hide_mouse;/* Is mouse automatically hidden */
+bool needs_hide_mouse;  /* Needs VOUT_DISPLAY_HIDE_MOUSE */
 bool has_pictures_invalid;  /* Will 
VOUT_DISPLAY_EVENT_PICTURES_INVALID be used */
 const vlc_fourcc_t *subpicture_chromas; /* List of supported chromas for 
subpicture rendering. */
 } vout_display_info_t;
@@ -139,7 +139,7 @@ typedef struct {
 enum {
 /* Hide the mouse. It will be sent when
  * vout_display_t::info.b_hide_mouse is false */
-VOUT_DISPLAY_HIDE_MOUSE,
+VOUT_DISPLAY_HIDE_MOUSE VLC_DEPRECATED,
 
 /* Ask to reset the internal buffers after a 
VOUT_DISPLAY_EVENT_PICTURES_INVALID
  * request.
diff --git a/modules/video_output/aa.c b/modules/video_output/aa.c
index b69ca15be7..e9146d082c 100644
--- a/modules/video_output/aa.c
+++ b/modules/video_output/aa.c
@@ -129,7 +129,7 @@ static int Open(vlc_object_t *object)
 /* Setup vout_display now that everything is fine */
 vd->fmt = fmt;
 vd->info.has_pictures_invalid = true;
-vd->info.has_hide_mouse = false;
+vd->info.needs_hide_mouse = true;
 
 vd->pool= Pool;
 vd->prepare = Prepare;
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index 5e3579e734..33a0409820 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -191,7 +191,7 @@ static int Open(vlc_object_t *object)
 
 /* Setup vout_display now that everything is fine */
 vd->fmt = fmt;
-vd->info.has_hide_mouse = false;
+vd->info.needs_hide_mouse = true;
 
 vd->pool= Pool;
 vd->prepare = Prepare;
diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c
index df8803ad88..dbd2a737ed 100644
--- a/modules/video_output/kva.c
+++ b/modules/video_output/kva.c
@@ -158,7 +158,7 @@ static void PMThread( void *arg )
 vout_display_info_t info = vd->info;
 info.is_slow = false;
 info.has_double_click = true;
-info.has_hide_mouse = false;
+info.needs_hide_mouse = true;
 info.has_pictures_invalid = false;
 
 MorphToPM();
diff --git a/modules/video_output/win32/direct3d11.c 
b/modules/video_output/win32/direct3d11.c
index ff1466a857..4fbeeb8d26 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -540,7 +540,7 @@ static int Open(vlc_object_t *object)
 vd->fmt = fmt;
 
 vd->info.has_double_click = true;
-vd->info.has_hide_mouse   = false;
+vd->info.needs_hide_mouse = true;
 vd->info.has_pictures_invalid = vd->info.is_slow;
 
 if (var_InheritBool(vd, "direct3d11-hw-blending") &&
diff --git a/modules/video_output/win32/direct3d9.c 
b/modules/video_output/win32/direct3d9.c
index 407c5e81f0..b6e9c1f79e 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -271,7 +271,7 @@ static int Open(vlc_object_t *object)
 vout_display_info_t info = vd->info;
 info.is_slow = !is_d3d9_opaque(fmt.i_chroma);
 info.has_double_click = true;
-info.has_hide_mouse = false;
+info.needs_hide_mouse = true;
 info.has_pictures_invalid = !is_d3d9_opaque(fmt.i_chroma);
 if (var_InheritBool(vd, "direct3d9-hw-blending") 

[vlc-commits] lua: fix dailymotion parsing

2017-08-06 Thread Nicolas Chauvet
vlc | branch: master | Nicolas Chauvet  | Sun Aug  6 
12:59:15 2017 +0200| [b1afd0d6938196e03c5fd0304bd72fbbe46b31fa] | committer: 
Jean-Baptiste Kempf

lua: fix dailymotion parsing

Current dailymotion html uses "var __PLAYER_CONFIG__" instead of
"var config" to store data such as username, qualities and etc.
Others fields are unchanged.

Signed-off-by: Nicolas Chauvet 
Signed-off-by: Jean-Baptiste Kempf 

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

 share/lua/playlist/dailymotion.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/lua/playlist/dailymotion.lua 
b/share/lua/playlist/dailymotion.lua
index 28bf033c77..f117b0d5de 100644
--- a/share/lua/playlist/dailymotion.lua
+++ b/share/lua/playlist/dailymotion.lua
@@ -47,7 +47,7 @@ function parse()
_,_,arturl = string.find( line, "href=\"(.-)\"" )
end
 
-if string.match( line, "var config = {" ) then
+if string.match( line, "var __PLAYER_CONFIG__ = {" ) then
 artist = string.match( line, '"username":"([^"]+)"' )
 
 local streams = string.match( line, "\"qualities\":{(.-%])}" )

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] ios vout: fix incorrect hide mouse setting

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
10:59:10 2017 +0300| [f208c11ef7253c379382952709aae82420c152ec] | committer: 
Rémi Denis-Courmont

ios vout: fix incorrect hide mouse setting

This vout never had mouse hiding, AFAICT.

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

 modules/video_output/ios.m | 1 -
 1 file changed, 1 deletion(-)

diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 81b42c7cd0..b6331428ed 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -203,7 +203,6 @@ static int Open(vlc_object_t *this)
 vout_display_info_t info = vd->info;
 info.has_pictures_invalid = false;
 info.subpicture_chromas = subpicture_chromas;
-info.has_hide_mouse = false;
 
 /* Setup vout_display_t once everything is fine */
 vd->info = info;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] mmal vout: pictures reset is impossible

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sat Aug  5 
21:23:01 2017 +0300| [018014838387f559309a7d3252020793603697f3] | committer: 
Rémi Denis-Courmont

mmal vout: pictures reset is impossible

Assert that it does not happen, like with all or almost all other
non-resetting video outputs.

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

 modules/hw/mmal/vout.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index 24a4cf73c3..94f3180b4d 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -635,9 +635,10 @@ static int vd_control(vout_display_t *vd, int query, 
va_list args)
 ret = VLC_SUCCESS;
 break;
 
+case VOUT_DISPLAY_RESET_PICTURES:
+vlc_assert_unreachable();
 case VOUT_DISPLAY_CHANGE_FULLSCREEN:
 case VOUT_DISPLAY_CHANGE_ZOOM:
-case VOUT_DISPLAY_RESET_PICTURES:
 msg_Warn(vd, "Unsupported control query %d", query);
 break;
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] display: preserve actual height on A/R or crop change

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sat Aug  5 
22:16:49 2017 +0300| [04dc197d7ac78e85efbb26b9eccc1ce13ba73003] | committer: 
Rémi Denis-Courmont

display: preserve actual height on A/R or crop change

...rather than the last saved height. In practice, this does not make
much if any difference though, as:
- the saved height should equal the actual height in windowed mode,
- the code path has no effects in fullscreen mode.

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

 src/video_output/display.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/video_output/display.c b/src/video_output/display.c
index 0e899065dd..a629423337 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -749,7 +749,6 @@ static void VoutDisplayFitWindow(vout_display_t *vd, bool 
default_size)
 if (default_size) {
 cfg.display.height = 0;
 } else {
-cfg.display.height = osys->height_saved;
 cfg.zoom.num = 1;
 cfg.zoom.den = 1;
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] splitter: wall: fix incorrect sizes

2017-08-06 Thread Victorien Le Couviour--Tuffet
vlc | branch: master | Victorien Le Couviour--Tuffet 
 | Fri Aug  4 19:40:58 2017 +0200| 
[dcc1b6e26eed4716271d62139fdd7389b58d21d3] | committer: Jean-Baptiste Kempf

splitter: wall: fix incorrect sizes

The computations must not be done on the buffer size but on the video one.
Otherwise, we might end up with the sum of all output sizes bigger than the
video itself, which results in a green strip at the bottom of the lowest
outputs, and potentially incorrect display for all of them (with bad width).

Signed-off-by: Jean-Baptiste Kempf 

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

 modules/video_splitter/wall.c | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/modules/video_splitter/wall.c b/modules/video_splitter/wall.c
index e234ca3622..ca19eac4dc 100644
--- a/modules/video_splitter/wall.c
+++ b/modules/video_splitter/wall.c
@@ -191,10 +191,10 @@ static int Open( vlc_object_t *p_this )
 i_aspect = 4 * VOUT_ASPECT_FACTOR / 3;
 
 /* Compute placements/size of the windows */
-const unsigned w1 = ( p_splitter->fmt.i_width / p_sys->i_col ) & ~1;
+const unsigned w1 = ( p_splitter->fmt.i_visible_width / p_sys->i_col ) & 
~1;
 const unsigned h1 = ( w1 * VOUT_ASPECT_FACTOR / i_aspect ) & ~1;
 
-const unsigned h2 = ( p_splitter->fmt.i_height / p_sys->i_row ) & ~1;
+const unsigned h2 = ( p_splitter->fmt.i_visible_height / p_sys->i_row ) & 
~1;
 const unsigned w2 = ( h2 * i_aspect / VOUT_ASPECT_FACTOR ) & ~1;
 
 unsigned i_target_width;
@@ -204,23 +204,23 @@ static int Open( vlc_object_t *p_this )
 bool b_vstart_rounded;
 bool b_hstart_rounded;
 
-if( h1 * p_sys->i_row < p_splitter->fmt.i_height )
+if( h1 * p_sys->i_row < p_splitter->fmt.i_visible_height )
 {
 i_target_width = w2;
 i_target_height = h2;
 
 i_vstart = 0;
 b_vstart_rounded = false;
-i_vend = p_splitter->fmt.i_height;
+i_vend = p_splitter->fmt.i_visible_height;
 
 unsigned i_tmp = i_target_width * p_sys->i_col;
 while( i_tmp < p_splitter->fmt.i_width )
 i_tmp += p_sys->i_col;
 
-i_hstart = (( i_tmp - p_splitter->fmt.i_width ) / 2)&~1;
-b_hstart_rounded  = ( ( i_tmp - p_splitter->fmt.i_width ) % 2 ) ||
-( ( ( i_tmp - p_splitter->fmt.i_width ) / 2 ) & 1 );
-i_hend = i_hstart + p_splitter->fmt.i_width;
+i_hstart = (( i_tmp - p_splitter->fmt.i_visible_width ) / 2)&~1;
+b_hstart_rounded  = ( ( i_tmp - p_splitter->fmt.i_visible_width ) % 2 
) ||
+( ( ( i_tmp - p_splitter->fmt.i_visible_width ) / 2 ) & 1 );
+i_hend = i_hstart + p_splitter->fmt.i_visible_width;
 }
 else
 {
@@ -229,16 +229,16 @@ static int Open( vlc_object_t *p_this )
 
 i_hstart = 0;
 b_hstart_rounded = false;
-i_hend = p_splitter->fmt.i_width;
+i_hend = p_splitter->fmt.i_visible_width;
 
 unsigned i_tmp = i_target_height * p_sys->i_row;
-while( i_tmp < p_splitter->fmt.i_height )
+while( i_tmp < p_splitter->fmt.i_visible_height )
 i_tmp += p_sys->i_row;
 
-i_vstart = ( ( i_tmp - p_splitter->fmt.i_height ) / 2 ) & ~1;
-b_vstart_rounded  = ( ( i_tmp - p_splitter->fmt.i_height ) % 2 ) ||
-( ( ( i_tmp - p_splitter->fmt.i_height ) / 2 ) & 1 );
-i_vend = i_vstart + p_splitter->fmt.i_height;
+i_vstart = ( ( i_tmp - p_splitter->fmt.i_visible_height ) / 2 ) & ~1;
+b_vstart_rounded  = ( ( i_tmp - p_splitter->fmt.i_visible_height ) % 2 
) ||
+( ( ( i_tmp - p_splitter->fmt.i_visible_height ) / 2 ) & 1 );
+i_vend = i_vstart + p_splitter->fmt.i_visible_height;
 }
 msg_Dbg( p_splitter, "target resolution %dx%d", i_target_width, 
i_target_height );
 msg_Dbg( p_splitter, "target window (%d,%d)-(%d,%d)", 
i_hstart,i_vstart,i_hend,i_vend );

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vout_display: mark CHANGE_WINDOW_STATE deprecated

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sat Aug  5 
23:03:23 2017 +0300| [c900e39cf935b77f0f47383eb95936297c650651] | committer: 
Rémi Denis-Courmont

vout_display: mark CHANGE_WINDOW_STATE deprecated

This was moved from display to window eight years ago.

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

 include/vlc_vout_display.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index f02272a3d7..1723a5b451 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -151,7 +151,7 @@ enum {
 #if defined(_WIN32) || defined(__OS2__)
 /* Ask the module to acknowledge/refuse the window management state change
  * after being requested externally or by VOUT_DISPLAY_WINDOW_STATE */
-VOUT_DISPLAY_CHANGE_WINDOW_STATE, /* unsigned state */
+VOUT_DISPLAY_CHANGE_WINDOW_STATE VLC_DEPRECATED,   /* unsigned state */
 #endif
 /* Ask the module to acknowledge/refuse the display size change requested
  * (externally or by VOUT_DISPLAY_EVENT_DISPLAY_SIZE) */

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] demux: adaptive: fix warning of reorder

2017-08-06 Thread Zhao Zhili
vlc | branch: master | Zhao Zhili  | Sat Aug  5 01:25:49 
2017 +0800| [bc80566d95b213498978b92a1fd377ae4817c933] | committer: Rémi 
Denis-Courmont

demux: adaptive: fix warning of reorder

Signed-off-by: Rémi Denis-Courmont 

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

 modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp 
b/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
index 2a3a829530..ed54d15f0d 100644
--- a/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
+++ b/modules/demux/adaptive/logic/NearOptimalAdaptationLogic.cpp
@@ -52,9 +52,9 @@ NearOptimalContext::NearOptimalContext()
 
 NearOptimalAdaptationLogic::NearOptimalAdaptationLogic( vlc_object_t *p_obj )
 : AbstractAdaptationLogic()
-, p_obj( p_obj )
-, usedBps( 0 )
 , currentBps( 0 )
+, usedBps( 0 )
+, p_obj( p_obj )
 {
 vlc_mutex_init();
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] window: report all double clicks

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
16:53:16 2017 +0300| [8bf2942e5d19f2759a2867bcb75f73bf3b9f6f59] | committer: 
Rémi Denis-Courmont

window: report all double clicks

Because we can.

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

 include/vlc_vout_window.h   | 5 +++--
 modules/gui/qt/components/interface_widgets.cpp | 5 +++--
 src/video_output/video_output.c | 3 ++-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index f38ef15cb7..f9a2a7dfa3 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -358,10 +358,11 @@ static inline void 
vout_window_ReportMouseReleased(vout_window_t *window,
 /**
  * Send a mouse double click event
  */
-static inline void vout_window_ReportMouseDoubleClick(vout_window_t *window)
+static inline void vout_window_ReportMouseDoubleClick(vout_window_t *window,
+  int button)
 {
 const vout_window_mouse_event_t mouse = {
-VOUT_WINDOW_MOUSE_DOUBLE_CLICK, 0, 0, 0,
+VOUT_WINDOW_MOUSE_DOUBLE_CLICK, 0, 0, button,
 };
 vout_window_SendMouseEvent(window, );
 }
diff --git a/modules/gui/qt/components/interface_widgets.cpp 
b/modules/gui/qt/components/interface_widgets.cpp
index d483461cb5..ea0b209db3 100644
--- a/modules/gui/qt/components/interface_widgets.cpp
+++ b/modules/gui/qt/components/interface_widgets.cpp
@@ -349,9 +349,10 @@ void VideoWidget::mouseMoveEvent( QMouseEvent *event )
 
 void VideoWidget::mouseDoubleClickEvent( QMouseEvent *event )
 {
-if( qtMouseButton2VLC( event->button() ) == 0 )
+int vlc_button = qtMouseButton2VLC( event->button() );
+if( vlc_button >= 0 )
 {
-vout_window_ReportMouseDoubleClick( p_window );
+vout_window_ReportMouseDoubleClick( p_window, vlc_button );
 event->accept();
 }
 else
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 6b6dc8e028..471dfcf7e1 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1335,7 +1335,8 @@ static void ThreadChangeWindowMouse(vout_thread_t *vout,
 vout_display_SendEventMouseReleased(vd, mouse->button_mask);
 break;
 case VOUT_WINDOW_MOUSE_DOUBLE_CLICK:
-vout_display_SendEventMouseDoubleClick(vd);
+if (mouse->button_mask == 0)
+vout_display_SendEventMouseDoubleClick(vd);
 break;
 default: vlc_assert_unreachable();
 break;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] window: improve doxygen

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
16:44:22 2017 +0300| [ca39ff334e265e8ac7afa158acb732fe1049f7a4] | committer: 
Rémi Denis-Courmont

window: improve doxygen

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

 include/vlc_vout_window.h | 86 ++-
 1 file changed, 62 insertions(+), 24 deletions(-)

diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index 4081a0b856..f38ef15cb7 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -46,23 +46,23 @@ struct wl_surface;
 /**
  * Window handle type
  */
-enum {
-VOUT_WINDOW_TYPE_INVALID=0,
-VOUT_WINDOW_TYPE_XID,
-VOUT_WINDOW_TYPE_HWND,
-VOUT_WINDOW_TYPE_NSOBJECT,
-VOUT_WINDOW_TYPE_ANDROID_NATIVE,
-VOUT_WINDOW_TYPE_WAYLAND,
+enum vout_window_type {
+VOUT_WINDOW_TYPE_INVALID=0 /**< Invalid or unspecified window type */,
+VOUT_WINDOW_TYPE_XID /**< X11 window */,
+VOUT_WINDOW_TYPE_HWND /**< Win32 or OS/2 window */,
+VOUT_WINDOW_TYPE_NSOBJECT /**< MacOS X view */,
+VOUT_WINDOW_TYPE_ANDROID_NATIVE /**< Android native window */,
+VOUT_WINDOW_TYPE_WAYLAND /**< Wayland surface */,
 };
 
 /**
  * Control query for vout_window_t
  */
-enum {
+enum vout_window_control {
 VOUT_WINDOW_SET_STATE, /* unsigned state */
 VOUT_WINDOW_SET_SIZE,   /* unsigned i_width, unsigned i_height */
 VOUT_WINDOW_SET_FULLSCREEN, /* int b_fullscreen */
-VOUT_WINDOW_HIDE_MOUSE, /* bool b_hide */
+VOUT_WINDOW_HIDE_MOUSE, /* int b_hide */
 };
 
 /**
@@ -115,35 +115,73 @@ typedef struct vout_window_owner {
 } vout_window_owner_t;
 
 /**
- * FIXME do we need an event system in the window too ?
- * or the window user will take care of it ?
+ * Graphical window
+ *
+ * This structure is an abstract interface to the windowing system.
+ * The window is normally used to draw video (and subpictures) into, but it
+ * can also be used for other purpose (e.g. OpenGL visualization).
+ *
+ * The window is responsible for providing a window handle, whose exact
+ * meaning depends on the windowing system. It also must report some events
+ * such as user input (keyboard, mouse) and window resize.
+ *
+ * Finally, it must support some control requests such as for fullscreen mode.
  */
 struct vout_window_t {
 VLC_COMMON_MEMBERS
 
-unsigned type; /**< Window handle type */
+ /**
+  * Window handle type
+  *
+  * This identified the windowing system and protocol that the window
+  * needs to use. This also selects which member of the \ref handle union
+  * and the \ref display union are to be set.
+  *
+  * The possible values are defined in \ref vout_window_type.
+  *
+  * VOUT_WINDOW_TYPE_INVALID is a special placeholder type. It means that
+  * any windowing system is acceptable. In that case, the plugin must set
+  * its actual type during activation.
+  */
+unsigned type;
 
-/* window handle (mandatory)
+/**
+ * Window handle (mandatory)
+ *
+ * This must be filled by the plugin upon activation.
  *
- * It must be filled in the open function.
+ * Depending on the \ref type above, a different member of this union is
+ * used.
  */
 union {
-void *hwnd;  /* Win32 window handle */
-uint32_t xid;/* X11 windows ID */
-void *nsobject;  /* Mac OSX view object */
-void *anativewindow; /* Android native window. */
-struct wl_surface *wl;   /* Wayland surface */
+void *hwnd;  /**< Win32 window handle */
+uint32_t xid;/**< X11 windows ID */
+void *nsobject;  /**< Mac OSX view object */
+void *anativewindow; /**< Android native window */
+struct wl_surface *wl;   /**< Wayland surface (client pointer) */
 } handle;
 
-/* display server (mandatory) */
+/** Display server (mandatory)
+ *
+ * This must be filled by the plugin upon activation.
+ *
+ * The window handle is relative to the display server. The exact meaning
+ * of the display server depends on the window handle type. Not all window
+ * handle type provide a display server field.
+ */
 union {
-char *x11; /* X11 display (NULL = use default) */
-struct wl_display *wl;   /* Wayland struct wl_display pointer */
+char *x11; /**< X11 display string (NULL = use default) */
+struct wl_display *wl; /**< Wayland display (client pointer) */
 } display;
 
-/* Control on the module (mandatory)
+/**
+ * Control callback (mandatory)
+ *
+ * This callback handles some control request regarding the window.
+ * See \ref vout_window_control.
  *
- * Do not use it directly; use vout_window_Control instead.
+ * This field should not be used directly when manipulating a 

[vlc-commits] sdl: remove video output

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sat Aug  5 
21:08:45 2017 +0300| [4b8a2755fe8c0e3e1e9c52483b22c26e24fd5527] | committer: 
Rémi Denis-Courmont

sdl: remove video output

The SDL video output has been forcefully disabled on MacOS X for 12
years. It has also been disabled in Windows builds for over 6 years.
Finally, it has been broken on X11 due to lack of windowing
integration, for several years, cannot be fixed without changes to
the SDL API, and is completely useless.

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

 NEWS |   1 +
 configure.ac |  30 +-
 modules/MODULES_LIST |   1 -
 modules/video_output/Makefile.am |  15 -
 modules/video_output/sdl.c   | 713 ---
 po/POTFILES.in   |   1 -
 6 files changed, 9 insertions(+), 752 deletions(-)

diff --git a/NEWS b/NEWS
index a7afe59609..ef31c19a83 100644
--- a/NEWS
+++ b/NEWS
@@ -298,6 +298,7 @@ Removed modules
  * Rar access and stream filter: use libarchive
  * VDA decoder: use VT
  * Audioqueue: use audiounit
+ * SDL video output module
  * DirectFB video output module
 
 
diff --git a/configure.ac b/configure.ac
index 7501bee1ba..8487fea895 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3118,31 +3118,17 @@ AM_CONDITIONAL([HAVE_WAYLAND_EGL], [test 
"${have_wayland_egl}" = "yes"])
 
 
 dnl
-dnl  SDL module
+dnl  SDL image decoder module
 dnl
-AC_ARG_ENABLE(sdl,
-  [  --enable-sdlSDL support (default enabled)])
 AC_ARG_ENABLE(sdl-image,
   [  --enable-sdl-image  SDL image support (default enabled)])
-if test "${enable_sdl}" != "no"
-then
-   PKG_CHECK_MODULES(SDL, [sdl >= 1.2.10], [
-  # SDL on Darwin is heavily patched and can only run SDL_image
-  if test "${SYS}" != "darwin"; then
-VLC_ADD_PLUGIN([vout_sdl])
-  fi
-
-  # SDL_image
-  AS_IF([ test "${enable_sdl_image}" != "no"],[
-PKG_CHECK_MODULES(SDL_IMAGE, [SDL_image >= 1.2.10], [
-  VLC_ADD_PLUGIN([sdl_image])],
-  [ AC_MSG_WARN([${SDL_IMAGE_PKG_ERRORS}. You should install it 
alongside your SDL package.])
-  ])
-  ])
-   ],[
- AC_MSG_WARN([${SDL_PKG_ERRORS}.])
-   ])
-fi
+AS_IF([test "${enable_sdl_image}" != "no"],[
+  PKG_CHECK_MODULES(SDL_IMAGE, [SDL_image >= 1.2.10], [
+VLC_ADD_PLUGIN([sdl_image])
+  ], [
+AC_MSG_WARN([${SDL_IMAGE_PKG_ERRORS}. You should install it alongside your 
SDL package.])
+  ])
+])
 
 dnl
 dnl  freetype module
diff --git a/modules/MODULES_LIST b/modules/MODULES_LIST
index d125a999e0..9509eba71d 100644
--- a/modules/MODULES_LIST
+++ b/modules/MODULES_LIST
@@ -447,7 +447,6 @@ $Id$
  * vorbis: a vorbis audio decoder/packetizer using the libvorbis library
  * vout_ios: iOS video provider using OpenGL ES 2
  * vout_macosx: Mac OS X OpenGL provider
- * vout_sdl: video output module using the SDL library
  * vpx: WebM encoder and decoder (VP8/VP9)
  * vsxu: audio visualization using Vovoid VSXu
  * wall: image wall filter
diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index 6c5ee08057..e25fc40a99 100644
--- a/modules/video_output/Makefile.am
+++ b/modules/video_output/Makefile.am
@@ -405,21 +405,6 @@ EXTRA_LTLIBRARIES += libfb_plugin.la
 vout_LTLIBRARIES += $(LTLIBfb)
 
 
-### Simple DirectMedia Layer ###
-libvout_sdl_plugin_la_SOURCES = video_output/sdl.c
-libvout_sdl_plugin_la_CFLAGS = $(AM_CFLAGS) $(SDL_CFLAGS)
-libvout_sdl_plugin_la_LIBADD = $(SDL_LIBS)
-if !HAVE_WIN32
-if !HAVE_OS2
-libvout_sdl_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIBS) -lX11
-endif
-endif
-libvout_sdl_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
-EXTRA_LTLIBRARIES += libvout_sdl_plugin.la
-vout_LTLIBRARIES += $(LTLIBvout_sdl)
-
-
-
 ### ASCII Art ###
 libaa_plugin_la_SOURCES = video_output/aa.c
 libaa_plugin_la_LIBADD = -laa
diff --git a/modules/video_output/sdl.c b/modules/video_output/sdl.c
deleted file mode 100644
index 51c935cbe0..00
--- a/modules/video_output/sdl.c
+++ /dev/null
@@ -1,713 +0,0 @@
-/*
- * sdl.c: SDL video output display method
- *
- * Copyright (C) 1998-2009 VLC authors and VideoLAN
- * $Id$
- *
- * Authors: Samuel Hocevar 
- *  Pierre Baillet 
- *  Arnaud de Bossoreille de Ribou 
- *  Laurent Aimar 
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS 

[vlc-commits] vout: remove unused mouse visible/invisible event

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
17:54:36 2017 +0300| [320a02419a70f8e5804757ed46421f6795f0c3fd] | committer: 
Rémi Denis-Courmont

vout: remove unused mouse visible/invisible event

The window/display already have events/controls for this, and nothing
else cared, cares and probably will ever care.

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

 src/video_output/display.c |  2 --
 src/video_output/event.h   | 10 --
 2 files changed, 12 deletions(-)

diff --git a/src/video_output/display.c b/src/video_output/display.c
index a65dc062c2..2d91dad1a4 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -570,7 +570,6 @@ static void VoutDisplayEventMouse(vout_display_t *vd, int 
event, va_list args)
 osys->mouse.last_moved = mdate();
 
 /* */
-vout_SendEventMouseVisible(osys->vout);
 vout_SendDisplayEventMouse(osys->vout, );
 vlc_mutex_unlock(>lock);
 }
@@ -758,7 +757,6 @@ bool vout_ManageDisplay(vout_display_t *vd, bool 
allow_reset_pictures)
 if (vout_HideWindowMouse(osys->vout, true) != VLC_SUCCESS
  && !vd->info.has_hide_mouse)
 vout_display_Control(vd, VOUT_DISPLAY_HIDE_MOUSE);
-vout_SendEventMouseHidden(osys->vout);
 }
 
 bool reset_render = false;
diff --git a/src/video_output/event.h b/src/video_output/event.h
index ece1042c36..78804c190c 100644
--- a/src/video_output/event.h
+++ b/src/video_output/event.h
@@ -98,16 +98,6 @@ static inline void 
vout_SendEventMouseDoubleClick(vout_thread_t *vout)
 //vout_ControlSetFullscreen(vout, !var_GetBool(vout, "fullscreen"));
 var_ToggleBool(vout, "fullscreen");
 }
-static inline void vout_SendEventMouseVisible(vout_thread_t *vout)
-{
-/* TODO */
-VLC_UNUSED(vout);
-}
-static inline void vout_SendEventMouseHidden(vout_thread_t *vout)
-{
-/* TODO */
-VLC_UNUSED(vout);
-}
 static inline void vout_SendEventViewpointChangeable(vout_thread_t *vout,
  bool b_can_change)
 {

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vout display: deprecate the "manage" callback (refs #17700)

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sat Aug  5 
23:13:43 2017 +0300| [ce0be79b4361d6646e9acb5a1bb3f775bb6a82b6] | committer: 
Rémi Denis-Courmont

vout display: deprecate the "manage" callback (refs #17700)

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

 include/vlc_vout_display.h | 2 +-
 modules/codec/omxil/vout.c | 1 -
 modules/hw/vdpau/display.c | 1 -
 modules/video_output/android/display.c | 1 -
 modules/video_output/decklink.cpp  | 1 -
 modules/video_output/fb.c  | 1 -
 modules/video_output/flaschen.c| 1 -
 modules/video_output/ios.m | 1 -
 modules/video_output/opengl/display.c  | 1 -
 modules/video_output/vdummy.c  | 1 -
 modules/video_output/vmem.c| 1 -
 modules/video_output/wayland/shm.c | 1 -
 modules/video_output/xcb/x11.c | 1 -
 modules/video_output/xcb/xvideo.c  | 1 -
 modules/video_output/yuv.c | 1 -
 15 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index bbe2e9acb8..4dd513ff62 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -329,7 +329,7 @@ struct vout_display_t {
 int(*control)(vout_display_t *, int, va_list);
 
 /* Manage pending event (optional) */
-void   (*manage)(vout_display_t *);
+void   (*manage)(vout_display_t *) VLC_DEPRECATED;
 
 /* Private place holder for the vout_display_t module (optional)
  *
diff --git a/modules/codec/omxil/vout.c b/modules/codec/omxil/vout.c
index 84d79acd46..3e659f2ced 100644
--- a/modules/codec/omxil/vout.c
+++ b/modules/codec/omxil/vout.c
@@ -291,7 +291,6 @@ static int Open(vlc_object_t *p_this)
 vd->display = Display;
 vd->control = Control;
 vd->prepare = NULL;
-vd->manage  = NULL;
 
 /* Create the associated picture */
 pictures = calloc(p_sys->port.i_buffers, sizeof(*pictures));
diff --git a/modules/hw/vdpau/display.c b/modules/hw/vdpau/display.c
index a92ac742e5..767112a9ec 100644
--- a/modules/hw/vdpau/display.c
+++ b/modules/hw/vdpau/display.c
@@ -655,7 +655,6 @@ static int Open(vlc_object_t *obj)
 vd->prepare = Queue;
 vd->display = Wait;
 vd->control = Control;
-vd->manage = NULL;
 
 return VLC_SUCCESS;
 
diff --git a/modules/video_output/android/display.c 
b/modules/video_output/android/display.c
index 6757299e35..aa0cc94aff 100644
--- a/modules/video_output/android/display.c
+++ b/modules/video_output/android/display.c
@@ -759,7 +759,6 @@ static int OpenCommon(vout_display_t *vd)
 vd->prepare = Prepare;
 vd->display = Display;
 vd->control = Control;
-vd->manage  = NULL;
 vd->info.is_slow = !sys->p_window->b_opaque;
 
 return VLC_SUCCESS;
diff --git a/modules/video_output/decklink.cpp 
b/modules/video_output/decklink.cpp
index 13d9a608f6..2ec4126a54 100644
--- a/modules/video_output/decklink.cpp
+++ b/modules/video_output/decklink.cpp
@@ -1071,7 +1071,6 @@ static int OpenVideo(vlc_object_t *p_this)
 vd->prepare = PrepareVideo;
 vd->display = DisplayVideo;
 vd->control = ControlVideo;
-vd->manage  = NULL;
 
 return VLC_SUCCESS;
 }
diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c
index de2c35c77d..615b2c7663 100644
--- a/modules/video_output/fb.c
+++ b/modules/video_output/fb.c
@@ -310,7 +310,6 @@ static int Open(vlc_object_t *object)
 vd->prepare = NULL;
 vd->display = Display;
 vd->control = Control;
-vd->manage  = NULL;
 
 /* */
 vout_display_SendEventDisplaySize(vd, fmt.i_visible_width, 
fmt.i_visible_height);
diff --git a/modules/video_output/flaschen.c b/modules/video_output/flaschen.c
index 4ae5022101..795e02d4db 100644
--- a/modules/video_output/flaschen.c
+++ b/modules/video_output/flaschen.c
@@ -146,7 +146,6 @@ static int Open(vlc_object_t *object)
 vd->prepare = NULL;
 vd->display = Display;
 vd->control = Control;
-vd->manage  = NULL;
 
 vout_display_DeleteWindow(vd, NULL);
 
diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index e4a56cb2cb..b0333800ab 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -212,7 +212,6 @@ static int Open(vlc_object_t *this)
 vd->prepare = PictureRender;
 vd->display = PictureDisplay;
 vd->control = Control;
-vd->manage = NULL;
 
 /* forward our dimensions to the vout core */
 [sys->glESView 
performSelectorOnMainThread:@selector(propagateDimensionsToVoutCore) 
withObject:nil waitUntilDone:YES];
diff --git a/modules/video_output/opengl/display.c 
b/modules/video_output/opengl/display.c
index e72e16005d..c375302efe 100644
--- a/modules/video_output/opengl/display.c
+++ b/modules/video_output/opengl/display.c
@@ -129,7 +129,6 @@ static int Open (vlc_object_t *obj)
 vd->prepare = PictureRender;
 vd->display = 

[vlc-commits] directfb: remove legacy video output

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sat Aug  5 
21:00:06 2017 +0300| [8e1a0e876615da31321203090daa7c8699b6406d] | committer: 
Rémi Denis-Courmont

directfb: remove legacy video output

The DirectFB project has been dead for several years, and is ostensibly
not used. If you really need direct access to the Linux frame buffer,
there is still the raw LinuxFB module for the time being.

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

 NEWS |   2 +
 configure.ac |  64 -
 modules/MODULES_LIST |   1 -
 modules/video_output/Makefile.am |   7 -
 modules/video_output/directfb.c  | 271 ---
 po/POTFILES.in   |   1 -
 6 files changed, 2 insertions(+), 344 deletions(-)

diff --git a/NEWS b/NEWS
index f4ce592e57..a7afe59609 100644
--- a/NEWS
+++ b/NEWS
@@ -298,6 +298,8 @@ Removed modules
  * Rar access and stream filter: use libarchive
  * VDA decoder: use VT
  * Audioqueue: use audiounit
+ * DirectFB video output module
+
 
 Changes between 2.2.5 and 2.2.5.1:
 
diff --git a/configure.ac b/configure.ac
index 3f2cd9342a..7501bee1ba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3310,70 +3310,6 @@ AC_CHECK_HEADER([linux/fb.h], [
 
 
 dnl
-dnl  DirectFB module
-dnl  try to find using: 1 - given location; 2 - directfb-config; 3 - pkg-config
-dnl  TODO: support for static linking
-dnl
-AC_ARG_ENABLE(directfb,
-  [  --enable-directfb   DirectFB support (default disabled)])
-AC_ARG_WITH(directfb,
-  [  --with-directfb=PATHpath to DirectFB headers and libraries])
-
-if test "${enable_directfb}" = "yes"; then
-have_directfb="false"
-CPPFLAGS_mydirectfb=
-LIBS_mydirectfb=
-if test "${with_directfb}" != "no" -a -n "${with_directfb}"; then
-dnl Trying the given location
-VLC_SAVE_FLAGS
-
-CPPFLAGS_new="-I${with_directfb}/include -D_REENTRANT -D_GNU_SOURCE"
-LIBS_new="-L${with_directfb}/lib/fusion/.libs/ 
-L${with_directfb}/lib/direct/.libs/ -L${with_directfb}/src/.libs/"
-
-CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_new}"
-LIBS="${LIBS} ${LIBS_new}"
-
-dnl FIXME: too obscure
-AC_CHECK_HEADER([directfb.h], [
-AC_CHECK_LIB([direct],[direct_initialize], [
-AC_CHECK_LIB([fusion], [fusion_enter], [
-AC_CHECK_LIB([directfb], [DirectFBInit], 
have_directfb="true", have_directfb="false")
-], have_directfb="false")
-], have_directfb="false")
-], have_directfb="false")
-
-VLC_RESTORE_FLAGS
-
-if test "${have_directfb}" = "true"; then
-LIBS_mydirectfb="${LIBS_new} -lz $LIBDL -ldirectfb -lfusion 
-ldirect -lpthread"
-CPPFLAGS_mydirectfb="${CPPFLAGS_new}"
-fi
-else
-dnl Look for directfb-config
-AC_CHECK_PROG(DIRECTFB_CONFIG, [directfb-config], [false])
-AS_IF(["${DIRECTFB_CONFIG}" != "false"], [
-CPPFLAGS_mydirectfb="`${DIRECTFB_CONFIG} --cflags`"
-LIBS_mydirectfb="`${DIRECTFB_CONFIG} --libs`"
-have_directfb="true"
-], [
-dnl Trying with pkg-config
-PKG_CHECK_MODULES(DIRECTFB, directfb, [
-CPPFLAGS_mydirectfb="${DIRECTFB_CFLAGS}"
-LIBS_mydirectfb="${DIRECTFB_LIBS}"
-have_directfb="true"
-], [have_directfb="false"])
-])
-fi
-if test "${have_directfb}" = "true"; then
-VLC_ADD_PLUGIN([directfb])
-VLC_ADD_CPPFLAGS([directfb],[${CPPFLAGS_mydirectfb}])
-VLC_ADD_LIBS([directfb],[${LIBS_mydirectfb}])
-else
-AC_MSG_ERROR([${DIRECTFB_PKG_ERRORS}.])
-fi
-fi
-
-dnl
 dnl  AA plugin
 dnl
 AC_ARG_ENABLE(aa,
diff --git a/modules/MODULES_LIST b/modules/MODULES_LIST
index d4c37a0b0e..d125a999e0 100644
--- a/modules/MODULES_LIST
+++ b/modules/MODULES_LIST
@@ -112,7 +112,6 @@ $Id$
  * direct3d9_adjust: adjust filter for Direct3D9 video decoding
  * direct3d9_deinterlace: deinterlacer for Direct3D9/DxVA video decoding
  * directdraw: video output module using the DirectDraw API
- * directfb: Direct Framebuffer video output
  * directsound: audio output module using the DirectSound API
  * dmo: a DirectMediaObject decoder that uses DirectMedia to decode video 
(WMV3)
  * dolby_surround_decoder: simple decoder for dolby surround encoded streams
diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index 404cbc1427..6c5ee08057 100644
--- a/modules/video_output/Makefile.am
+++ b/modules/video_output/Makefile.am
@@ -399,13 +399,6 @@ endif
 
 ### FrameBuffer ###
 
-libdirectfb_plugin_la_SOURCES = video_output/directfb.c
-libdirectfb_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS_directfb)
-libdirectfb_plugin_la_LIBADD = $(LIBS_directfb)
-libdirectfb_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath 

[vlc-commits] vout: remove core event thread

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sat Aug  5 
23:49:13 2017 +0300| [989e3864d9c9a887e51cb64642f0dca1cb0de449] | committer: 
Rémi Denis-Courmont

vout: remove core event thread

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

 include/vlc_vout_display.h |  1 -
 src/video_output/display.c | 57 +-
 2 files changed, 1 insertion(+), 57 deletions(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 4dd513ff62..d1cc1ba8a7 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -130,7 +130,6 @@ typedef struct {
 bool has_double_click;  /* Is double-click generated */
 bool has_hide_mouse;/* Is mouse automatically hidden */
 bool has_pictures_invalid;  /* Will 
VOUT_DISPLAY_EVENT_PICTURES_INVALID be used */
-bool needs_event_thread VLC_DEPRECATED; /* Will events (key at least) be 
emitted using an independent thread */
 const vlc_fourcc_t *subpicture_chromas; /* List of supported chromas for 
subpicture rendering. */
 } vout_display_info_t;
 
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 79b419ce4d..a65dc062c2 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -94,7 +94,6 @@ static vout_display_t *vout_display_New(vlc_object_t *obj,
 vd->info.has_double_click = false;
 vd->info.has_hide_mouse = false;
 vd->info.has_pictures_invalid = false;
-vd->info.needs_event_thread = false;
 vd->info.subpicture_chromas = NULL;
 
 vd->cfg = cfg;
@@ -400,11 +399,6 @@ typedef struct {
 bool ch_display_size;
 int  display_width;
 int  display_height;
-
-struct {
-vlc_thread_t thread;
-block_fifo_t *fifo;
-} event;
 } vout_display_owner_sys_t;
 
 static int VoutDisplayCreateRender(vout_display_t *vd)
@@ -581,46 +575,6 @@ static void VoutDisplayEventMouse(vout_display_t *vd, int 
event, va_list args)
 vlc_mutex_unlock(>lock);
 }
 
-noreturn static void *VoutDisplayEventKeyDispatch(void *data)
-{
-vout_display_owner_sys_t *osys = data;
-
-for (;;) {
-block_t *event = block_FifoGet(osys->event.fifo);
-
-int cancel = vlc_savecancel();
-
-int key;
-memcpy(, event->p_buffer, sizeof(key));
-vout_SendEventKey(osys->vout, key);
-block_Release(event);
-
-vlc_restorecancel(cancel);
-}
-}
-
-static void VoutDisplayEventKey(vout_display_t *vd, int key)
-{
-vout_display_owner_sys_t *osys = vd->owner.sys;
-
-if (!osys->event.fifo) {
-osys->event.fifo = block_FifoNew();
-if (!osys->event.fifo)
-return;
-if (vlc_clone(>event.thread, VoutDisplayEventKeyDispatch,
-  osys, VLC_THREAD_PRIORITY_LOW)) {
-block_FifoRelease(osys->event.fifo);
-osys->event.fifo = NULL;
-return;
-}
-}
-block_t *event = block_Alloc(sizeof(key));
-if (event) {
-memcpy(event->p_buffer, , sizeof(key));
-block_FifoPut(osys->event.fifo, event);
-}
-}
-
 static void VoutDisplayEvent(vout_display_t *vd, int event, va_list args)
 {
 vout_display_owner_sys_t *osys = vd->owner.sys;
@@ -634,10 +588,7 @@ static void VoutDisplayEvent(vout_display_t *vd, int 
event, va_list args)
 case VOUT_DISPLAY_EVENT_KEY: {
 const int key = (int)va_arg(args, int);
 msg_Dbg(vd, "VoutDisplayEvent 'key' 0x%2.2x", key);
-if (vd->info.needs_event_thread)
-VoutDisplayEventKey(vd, key);
-else
-vout_SendEventKey(osys->vout, key);
+vout_SendEventKey(osys->vout, key);
 break;
 }
 case VOUT_DISPLAY_EVENT_MOUSE_STATE:
@@ -1269,7 +1220,6 @@ static vout_display_t *DisplayNew(vout_thread_t *vout,
 osys->ch_wm_state = true;
 #endif
 osys->fit_window = 0;
-osys->event.fifo = NULL;
 
 osys->source = *source;
 osys->crop.left   = 0;
@@ -1335,11 +1285,6 @@ void vout_DeleteDisplay(vout_display_t *vd, 
vout_display_state_t *state)
 if (osys->is_splitter)
 SplitterClose(vd);
 vout_display_Delete(vd);
-if (osys->event.fifo) {
-vlc_cancel(osys->event.thread);
-vlc_join(osys->event.thread, NULL);
-block_FifoRelease(osys->event.fifo);
-}
 vlc_mutex_destroy(>lock);
 free(osys);
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] window: add info struct and double click flag

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
16:26:55 2017 +0300| [ab6349c924e311c24c156aa6ca8205f975608429] | committer: 
Rémi Denis-Courmont

window: add info struct and double click flag

Like display plugins before, window plugins need to be handled
differently if they emit double click events than not.

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

 include/vlc_vout_window.h | 5 +
 modules/gui/qt/qt.cpp | 1 +
 src/video_output/window.c | 1 +
 3 files changed, 7 insertions(+)

diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
index 69a719bd2a..4081a0b856 100644
--- a/include/vlc_vout_window.h
+++ b/include/vlc_vout_window.h
@@ -147,6 +147,11 @@ struct vout_window_t {
  */
 int (*control)(vout_window_t *, int query, va_list);
 
+struct {
+bool has_double_click; /**< Whether double click events are sent,
+or need to be emulated */
+} info;
+
 /* Private place holder for the vout_window_t module (optional)
  *
  * A module is free to use it as it wishes.
diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp
index 2ad68eb401..f521d04171 100644
--- a/modules/gui/qt/qt.cpp
+++ b/modules/gui/qt/qt.cpp
@@ -755,6 +755,7 @@ static int WindowOpen( vout_window_t *p_wnd, const 
vout_window_cfg_t *cfg )
 if( !p_mi->getVideo( p_wnd, cfg->width, cfg->height, cfg->is_fullscreen ) )
 return VLC_EGENERIC;
 
+p_wnd->info.has_double_click = true;
 p_wnd->control = WindowControl;
 p_wnd->sys = (vout_window_sys_t*)p_mi;
 return VLC_SUCCESS;
diff --git a/src/video_output/window.c b/src/video_output/window.c
index 6d76f12199..bd43592edb 100644
--- a/src/video_output/window.c
+++ b/src/video_output/window.c
@@ -59,6 +59,7 @@ vout_window_t *vout_window_New(vlc_object_t *obj, const char 
*module,
 vout_window_t *window = >wnd;
 
 memset(>handle, 0, sizeof(window->handle));
+window->info.has_double_click = false;
 window->control = NULL;
 window->sys = NULL;
 

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vout_display: remove/deprecate fullscreen state

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sat Aug  5 
23:04:57 2017 +0300| [057e5729c51c693e255c9348046c103b75bdb19c] | committer: 
Rémi Denis-Courmont

vout_display: remove/deprecate fullscreen state

Live window state, this was moved from display to window eight years
ago (minus one week). When the fullscreen state changes, the window
plugin emits a resize event, which triggers any necessary updates in
the display. The display does not need to know about fullscreen state
as such. But it is retained on HWND platforms due to legacy code, just
like window state before.

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

 include/vlc_vout_display.h | 12 ++
 modules/codec/omxil/vout.c |  1 -
 modules/hw/mmal/vout.c |  1 -
 modules/video_output/android/display.c |  1 -
 modules/video_output/caopengllayer.m   |  1 -
 modules/video_output/evas.c|  2 --
 modules/video_output/flaschen.c|  1 -
 modules/video_output/ios.m |  1 -
 src/video_output/display.c | 42 +-
 src/video_output/video_output.c| 16 +++--
 10 files changed, 42 insertions(+), 36 deletions(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 1723a5b451..bbe2e9acb8 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -81,7 +81,9 @@ enum {
  * Initial/Current configuration for a vout_display_t
  */
 typedef struct {
-bool is_fullscreen;  /* Is the display fullscreen */
+#if defined(_WIN32) || defined(__OS2__)
+bool is_fullscreen VLC_DEPRECATED;  /* Is the display fullscreen */
+#endif
 
 /* Display properties */
 struct {
@@ -145,10 +147,10 @@ enum {
  */
 VOUT_DISPLAY_RESET_PICTURES,
 
+#if defined(_WIN32) || defined(__OS2__)
 /* Ask the module to acknowledge/refuse the fullscreen state change after
  * being requested (externally or by VOUT_DISPLAY_EVENT_FULLSCREEN */
-VOUT_DISPLAY_CHANGE_FULLSCREEN, /* bool fs */
-#if defined(_WIN32) || defined(__OS2__)
+VOUT_DISPLAY_CHANGE_FULLSCREEN VLC_DEPRECATED, /* bool fs */
 /* Ask the module to acknowledge/refuse the window management state change
  * after being requested externally or by VOUT_DISPLAY_WINDOW_STATE */
 VOUT_DISPLAY_CHANGE_WINDOW_STATE VLC_DEPRECATED,   /* unsigned state */
@@ -193,8 +195,8 @@ enum {
 /* */
 VOUT_DISPLAY_EVENT_PICTURES_INVALID,/* The buffer are now invalid and 
need to be changed */
 
-VOUT_DISPLAY_EVENT_FULLSCREEN,
 #if defined(_WIN32) || defined(__OS2__)
+VOUT_DISPLAY_EVENT_FULLSCREEN,
 VOUT_DISPLAY_EVENT_WINDOW_STATE,
 #endif
 
@@ -366,12 +368,12 @@ static inline void 
vout_display_SendEventKey(vout_display_t *vd, int key)
 {
 vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_KEY, key);
 }
+#if defined(_WIN32) || defined(__OS2__)
 static inline void vout_display_SendEventFullscreen(vout_display_t *vd, bool 
is_fullscreen,
 bool is_window_fullscreen)
 {
 vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_FULLSCREEN, is_fullscreen, 
is_window_fullscreen);
 }
-#if defined(_WIN32) || defined(__OS2__)
 static inline void vout_display_SendWindowState(vout_display_t *vd, unsigned 
state)
 {
 vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_WINDOW_STATE, state);
diff --git a/modules/codec/omxil/vout.c b/modules/codec/omxil/vout.c
index ffbe4f5b13..84d79acd46 100644
--- a/modules/codec/omxil/vout.c
+++ b/modules/codec/omxil/vout.c
@@ -457,7 +457,6 @@ static int Control(vout_display_t *vd, int query, va_list 
args)
 UpdateDisplaySize(vd, cfg);
 return VLC_SUCCESS;
 }
-case VOUT_DISPLAY_CHANGE_FULLSCREEN:
 case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
 case VOUT_DISPLAY_CHANGE_ZOOM:
 case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index 94f3180b4d..1d378e3aa1 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -637,7 +637,6 @@ static int vd_control(vout_display_t *vd, int query, 
va_list args)
 
 case VOUT_DISPLAY_RESET_PICTURES:
 vlc_assert_unreachable();
-case VOUT_DISPLAY_CHANGE_FULLSCREEN:
 case VOUT_DISPLAY_CHANGE_ZOOM:
 msg_Warn(vd, "Unsupported control query %d", query);
 break;
diff --git a/modules/video_output/android/display.c 
b/modules/video_output/android/display.c
index eb4d89fbca..6757299e35 100644
--- a/modules/video_output/android/display.c
+++ b/modules/video_output/android/display.c
@@ -1179,7 +1179,6 @@ static int Control(vout_display_t *vd, int query, va_list 
args)
 
 switch (query) {
 case VOUT_DISPLAY_HIDE_MOUSE:
-case VOUT_DISPLAY_CHANGE_FULLSCREEN:
 return VLC_SUCCESS;
 case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
 case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
diff --git 

[vlc-commits] demux:mkv: don't overwrite a seekpoint using a lower trusted level

2017-08-06 Thread Steve Lhomme
vlc | branch: master | Steve Lhomme  | Fri Aug  4 14:29:03 
2017 +0200| [6f3e79d176fff00fd765aa76bca91a5ba324fa8e] | committer: 
Jean-Baptiste Kempf

demux:mkv: don't overwrite a seekpoint using a lower trusted level

Signed-off-by: Jean-Baptiste Kempf 

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

 modules/demux/mkv/matroska_segment_seeker.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/mkv/matroska_segment_seeker.cpp 
b/modules/demux/mkv/matroska_segment_seeker.cpp
index c447ae3866..2887e45454 100644
--- a/modules/demux/mkv/matroska_segment_seeker.cpp
+++ b/modules/demux/mkv/matroska_segment_seeker.cpp
@@ -119,6 +119,9 @@ SegmentSeeker::add_seekpoint( track_id_t track_id, 
Seekpoint sp )
 
 if( it != seekpoints.end() && it->pts == sp.pts )
 {
+if (sp.trust_level <= it->trust_level)
+return;
+
 *it = sp;
 }
 else

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vout: rename and invert has_hide_mouse

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
10:48:50 2017 +0300| [fae9d3db8e05fd1d3181ce16924d40dd5f70248b] | committer: 
Jean-Baptiste Kempf

vout: rename and invert has_hide_mouse

The name was meant to indicate that the plugin hid the pointer
autonomously. But it was ostensibly confused as implying that the
plugin had a mouse hiding control (basically the exact opposite).
In fact, it really meant that the mouse hiding control would NOT be
used.

This tries to provide a slightly less confusing name, and accordingly
inverts the meaning. This is also realigns with the convention that
false should be the default setting (which was broken in the grand
grand parent of this changeset).

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

 include/vlc_vout_display.h  | 4 ++--
 modules/video_output/aa.c   | 2 +-
 modules/video_output/caca.c | 2 +-
 modules/video_output/kva.c  | 2 +-
 modules/video_output/win32/direct3d11.c | 2 +-
 modules/video_output/win32/direct3d9.c  | 2 +-
 modules/video_output/win32/directdraw.c | 2 +-
 modules/video_output/win32/glwin32.c| 2 +-
 modules/video_output/win32/wingdi.c | 2 +-
 src/video_output/display.c  | 4 ++--
 10 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index d1cc1ba8a7..27566b776e 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -128,7 +128,7 @@ typedef struct {
 typedef struct {
 bool is_slow;   /* The picture memory has slow 
read/write */
 bool has_double_click;  /* Is double-click generated */
-bool has_hide_mouse;/* Is mouse automatically hidden */
+bool needs_hide_mouse;  /* Needs VOUT_DISPLAY_HIDE_MOUSE */
 bool has_pictures_invalid;  /* Will 
VOUT_DISPLAY_EVENT_PICTURES_INVALID be used */
 const vlc_fourcc_t *subpicture_chromas; /* List of supported chromas for 
subpicture rendering. */
 } vout_display_info_t;
@@ -139,7 +139,7 @@ typedef struct {
 enum {
 /* Hide the mouse. It will be sent when
  * vout_display_t::info.b_hide_mouse is false */
-VOUT_DISPLAY_HIDE_MOUSE,
+VOUT_DISPLAY_HIDE_MOUSE VLC_DEPRECATED,
 
 /* Ask to reset the internal buffers after a 
VOUT_DISPLAY_EVENT_PICTURES_INVALID
  * request.
diff --git a/modules/video_output/aa.c b/modules/video_output/aa.c
index b69ca15be7..e9146d082c 100644
--- a/modules/video_output/aa.c
+++ b/modules/video_output/aa.c
@@ -129,7 +129,7 @@ static int Open(vlc_object_t *object)
 /* Setup vout_display now that everything is fine */
 vd->fmt = fmt;
 vd->info.has_pictures_invalid = true;
-vd->info.has_hide_mouse = false;
+vd->info.needs_hide_mouse = true;
 
 vd->pool= Pool;
 vd->prepare = Prepare;
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index 5e3579e734..33a0409820 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -191,7 +191,7 @@ static int Open(vlc_object_t *object)
 
 /* Setup vout_display now that everything is fine */
 vd->fmt = fmt;
-vd->info.has_hide_mouse = false;
+vd->info.needs_hide_mouse = true;
 
 vd->pool= Pool;
 vd->prepare = Prepare;
diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c
index df8803ad88..dbd2a737ed 100644
--- a/modules/video_output/kva.c
+++ b/modules/video_output/kva.c
@@ -158,7 +158,7 @@ static void PMThread( void *arg )
 vout_display_info_t info = vd->info;
 info.is_slow = false;
 info.has_double_click = true;
-info.has_hide_mouse = false;
+info.needs_hide_mouse = true;
 info.has_pictures_invalid = false;
 
 MorphToPM();
diff --git a/modules/video_output/win32/direct3d11.c 
b/modules/video_output/win32/direct3d11.c
index ff1466a857..4fbeeb8d26 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -540,7 +540,7 @@ static int Open(vlc_object_t *object)
 vd->fmt = fmt;
 
 vd->info.has_double_click = true;
-vd->info.has_hide_mouse   = false;
+vd->info.needs_hide_mouse = true;
 vd->info.has_pictures_invalid = vd->info.is_slow;
 
 if (var_InheritBool(vd, "direct3d11-hw-blending") &&
diff --git a/modules/video_output/win32/direct3d9.c 
b/modules/video_output/win32/direct3d9.c
index 407c5e81f0..b6e9c1f79e 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -271,7 +271,7 @@ static int Open(vlc_object_t *object)
 vout_display_info_t info = vd->info;
 info.is_slow = !is_d3d9_opaque(fmt.i_chroma);
 info.has_double_click = true;
-info.has_hide_mouse = false;
+info.needs_hide_mouse = true;
 info.has_pictures_invalid = !is_d3d9_opaque(fmt.i_chroma);
 if (var_InheritBool(vd, "direct3d9-hw-blending") 

[vlc-commits] demux:mkv: don't invalid the cues just because we don't use the extra information

2017-08-06 Thread Steve Lhomme
vlc | branch: master | Steve Lhomme  | Fri Aug  4 14:29:02 
2017 +0200| [f93e947f0df24e19bfb5b5a55ad70537ec3ffb1f] | committer: 
Jean-Baptiste Kempf

demux:mkv: don't invalid the cues just because we don't use the extra 
information

Signed-off-by: Jean-Baptiste Kempf 

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

 modules/demux/mkv/matroska_segment.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mkv/matroska_segment.cpp 
b/modules/demux/mkv/matroska_segment.cpp
index aa61878ba2..b4e7c06834 100644
--- a/modules/demux/mkv/matroska_segment.cpp
+++ b/modules/demux/mkv/matroska_segment.cpp
@@ -168,15 +168,15 @@ void matroska_segment_c::LoadCues( KaxCues *cues )
 #if LIBMATROSKA_VERSION >= 0x010401
 else if( MKV_IS_ID( el, KaxCueRelativePosition ) )
 {
-b_invalid_cue = true; // since we do not 
support this type of cue: IGNORE
+// IGNORE
 }
 else if( MKV_IS_ID( el, KaxCueBlockNumber ) )
 {
-b_invalid_cue = true; // since we do not 
support this type of cue: IGNORE
+// IGNORE
 }
 else if( MKV_IS_ID( el, KaxCueReference ) )
 {
-b_invalid_cue = true; // since we do not 
support this type of cue: IGNORE
+// IGNORE
 }
 else if( MKV_IS_ID( el, KaxCueDuration ) )
 {

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] fourcc: fix non zero terminated fallback array

2017-08-06 Thread Victorien Le Couviour--Tuffet
vlc | branch: master | Victorien Le Couviour--Tuffet 
 | Fri Aug  4 19:41:01 2017 +0200| 
[8c1b062c57249d6259af0fdd710c995832fed3b7] | committer: Jean-Baptiste Kempf

fourcc: fix non zero terminated fallback array

Signed-off-by: Jean-Baptiste Kempf 

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

 src/misc/fourcc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index 59ed71469b..076117f355 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -378,7 +378,7 @@ static const vlc_fourcc_t p_CVPX_VIDEO_I420_fallback[] = {
 };
 
 static const vlc_fourcc_t p_VAAPI_420_fallback[] = {
-VLC_CODEC_VAAPI_420, VLC_CODEC_I420,
+VLC_CODEC_VAAPI_420, VLC_CODEC_I420, 0,
 };
 
 static const vlc_fourcc_t p_I440_fallback[] = {

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vout: remove dummy dead VOUT_DISPLAY_HIDE_MOUSE controls

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
10:38:37 2017 +0300| [1423d5ed1af2f60146eac27b51bc5a9fdd6d9c62] | committer: 
Jean-Baptiste Kempf

vout: remove dummy dead VOUT_DISPLAY_HIDE_MOUSE controls

Depending on the value of info.has_hide_mouse, the control is never
called. No point in providing a dummy implementation then.

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

 modules/codec/omxil/vout.c | 3 ---
 modules/hw/mmal/vout.c | 4 
 modules/hw/vdpau/display.c | 2 --
 modules/video_output/android/display.c | 2 --
 modules/video_output/caopengllayer.m   | 2 +-
 modules/video_output/evas.c| 1 -
 modules/video_output/flaschen.c| 4 
 modules/video_output/ios.m | 3 ---
 modules/video_output/macosx.m  | 2 +-
 modules/video_output/opengl/display.c  | 2 --
 modules/video_output/wayland/shm.c | 4 
 modules/video_output/xcb/x11.c | 3 ---
 modules/video_output/xcb/xvideo.c  | 2 --
 13 files changed, 2 insertions(+), 32 deletions(-)

diff --git a/modules/codec/omxil/vout.c b/modules/codec/omxil/vout.c
index 3e659f2ced..a735466d5e 100644
--- a/modules/codec/omxil/vout.c
+++ b/modules/codec/omxil/vout.c
@@ -442,9 +442,6 @@ static int Control(vout_display_t *vd, int query, va_list 
args)
 VLC_UNUSED(args);
 
 switch (query) {
-case VOUT_DISPLAY_HIDE_MOUSE:
-return VLC_SUCCESS;
-
 default:
 msg_Err(vd, "Unknown request in omxil vout display");
 
diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index edd2b767af..782ee48c4f 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -612,10 +612,6 @@ static int vd_control(vout_display_t *vd, int query, 
va_list args)
 int ret = VLC_EGENERIC;
 
 switch (query) {
-case VOUT_DISPLAY_HIDE_MOUSE:
-ret = VLC_SUCCESS;
-break;
-
 case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
 tmp_cfg = va_arg(args, const vout_display_cfg_t *);
 if (tmp_cfg->display.width == sys->display_width &&
diff --git a/modules/hw/vdpau/display.c b/modules/hw/vdpau/display.c
index 767112a9ec..db314586dc 100644
--- a/modules/hw/vdpau/display.c
+++ b/modules/hw/vdpau/display.c
@@ -333,8 +333,6 @@ static int Control(vout_display_t *vd, int query, va_list 
ap)
 
 switch (query)
 {
-case VOUT_DISPLAY_HIDE_MOUSE:
-return VLC_EGENERIC;
 case VOUT_DISPLAY_RESET_PICTURES:
 {
 msg_Dbg(vd, "resetting pictures");
diff --git a/modules/video_output/android/display.c 
b/modules/video_output/android/display.c
index aa0cc94aff..574e91a579 100644
--- a/modules/video_output/android/display.c
+++ b/modules/video_output/android/display.c
@@ -1177,8 +1177,6 @@ static int Control(vout_display_t *vd, int query, va_list 
args)
 vout_display_sys_t *sys = vd->sys;
 
 switch (query) {
-case VOUT_DISPLAY_HIDE_MOUSE:
-return VLC_SUCCESS;
 case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
 case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
 {
diff --git a/modules/video_output/caopengllayer.m 
b/modules/video_output/caopengllayer.m
index 4232d29441..430531b2c4 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -364,7 +364,7 @@ static int Control (vout_display_t *vd, int query, va_list 
ap)
 return VLC_SUCCESS;
 }
 
-case VOUT_DISPLAY_HIDE_MOUSE:
+case VOUT_DISPLAY_HIDE_MOUSE: /* FIXME: dead code */
 {
 [NSCursor setHiddenUntilMouseMoves: YES];
 return VLC_SUCCESS;
diff --git a/modules/video_output/evas.c b/modules/video_output/evas.c
index 66daaea86b..36afcfd3e3 100644
--- a/modules/video_output/evas.c
+++ b/modules/video_output/evas.c
@@ -782,7 +782,6 @@ Control( vout_display_t *vd, int i_query, va_list ap )
 case VOUT_DISPLAY_CHANGE_SOURCE_CROP:
 case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
 case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED:
-case VOUT_DISPLAY_HIDE_MOUSE:
 return VLC_EGENERIC;
 default:
 msg_Warn( vd, "Unknown request in evas_output" );
diff --git a/modules/video_output/flaschen.c b/modules/video_output/flaschen.c
index 795e02d4db..cf4c79b61c 100644
--- a/modules/video_output/flaschen.c
+++ b/modules/video_output/flaschen.c
@@ -239,10 +239,6 @@ static int Control(vout_display_t *vd, int query, va_list 
args)
 case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT:
 return VLC_EGENERIC;
 
-case VOUT_DISPLAY_HIDE_MOUSE:
-/* not really working */
-return VLC_SUCCESS;
-
 default:
 msg_Err(vd, "Unsupported query in vout display flaschen");
 return VLC_EGENERIC;
diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index b0333800ab..81b42c7cd0 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -283,9 +283,6 @@ static int Control(vout_display_t *vd, int query, va_list 

[vlc-commits] lua: fix dailymotion parsing

2017-08-06 Thread Nicolas Chauvet
vlc | branch: master | Nicolas Chauvet  | Sun Aug  6 
12:59:15 2017 +0200| [0a66fee9984d573ac190a11181a3016784c219ba] | committer: 
Jean-Baptiste Kempf

lua: fix dailymotion parsing

Current dailymotion html uses "var __PLAYER_CONFIG__" instead of
"var config" to store data such as username, qualities and etc.
Others fields are unchanged.

Signed-off-by: Nicolas Chauvet 
Signed-off-by: Jean-Baptiste Kempf 

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

 share/lua/playlist/dailymotion.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/lua/playlist/dailymotion.lua 
b/share/lua/playlist/dailymotion.lua
index 28bf033c77..f117b0d5de 100644
--- a/share/lua/playlist/dailymotion.lua
+++ b/share/lua/playlist/dailymotion.lua
@@ -47,7 +47,7 @@ function parse()
_,_,arturl = string.find( line, "href=\"(.-)\"" )
end
 
-if string.match( line, "var config = {" ) then
+if string.match( line, "var __PLAYER_CONFIG__ = {" ) then
 artist = string.match( line, '"username":"([^"]+)"' )
 
 local streams = string.match( line, "\"qualities\":{(.-%])}" )

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] display: always compute mouse hide timeout

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
22:59:25 2017 +0300| [758adf9e48d9f268fa78784c8094af8ab836cda2] | committer: 
Jean-Baptiste Kempf

display: always compute mouse hide timeout

Cursor management should eventually be moved from display to the window.
(The video output core still needs to take care of the window to video
translation, and the mouse event filtering, as it already does.)
And cursor hiding should be left entirely within the window plugins.

But in the mean time, compute the correct timestamps regardless of the
cursor hiding support in display plugin, so that it also works if the
cursor is hidden by the window plugin.

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

 src/video_output/display.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/video_output/display.c b/src/video_output/display.c
index 2d91dad1a4..67b841c948 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -566,8 +566,7 @@ static void VoutDisplayEventMouse(vout_display_t *vd, int 
event, va_list args)
 
 /* */
 osys->mouse.ch_activity = true;
-if (!vd->info.has_hide_mouse)
-osys->mouse.last_moved = mdate();
+osys->mouse.last_moved = mdate();
 
 /* */
 vout_SendDisplayEventMouse(osys->vout, );

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] ios vout: fix incorrect hide mouse setting

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
10:59:10 2017 +0300| [b1166a4bbcf183685bf8fa2a2855533c126a9e77] | committer: 
Jean-Baptiste Kempf

ios vout: fix incorrect hide mouse setting

This vout never had mouse hiding, AFAICT.

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

 modules/video_output/ios.m | 1 -
 1 file changed, 1 deletion(-)

diff --git a/modules/video_output/ios.m b/modules/video_output/ios.m
index 81b42c7cd0..b6331428ed 100644
--- a/modules/video_output/ios.m
+++ b/modules/video_output/ios.m
@@ -203,7 +203,6 @@ static int Open(vlc_object_t *this)
 vout_display_info_t info = vd->info;
 info.has_pictures_invalid = false;
 info.subpicture_chromas = subpicture_chromas;
-info.has_hide_mouse = false;
 
 /* Setup vout_display_t once everything is fine */
 vd->info = info;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] vout: make has_hide_mouse true by default

2017-08-06 Thread Rémi Denis-Courmont
vlc | branch: master | Rémi Denis-Courmont  | Sun Aug  6 
10:37:34 2017 +0300| [2341a17fa0d0e5298472f1e19f5231d1a5115a3c] | committer: 
Jean-Baptiste Kempf

vout: make has_hide_mouse true by default

Most video output displays either defer mouse hiding to the window
provider plugin, or do not handle the mouse events at all.
So that ought to be the default.

Also kepe the default in those display plugins that don´t handle
cursor hiding (notably X11 ones).

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

 modules/hw/mmal/vout.c   | 1 -
 modules/video_output/aa.c| 1 +
 modules/video_output/caca.c  | 1 +
 modules/video_output/caopengllayer.m | 1 -
 modules/video_output/decklink.cpp| 1 -
 modules/video_output/fb.c| 5 -
 modules/video_output/macosx.m| 1 -
 modules/video_output/vmem.c  | 5 -
 modules/video_output/yuv.c   | 5 -
 src/video_output/display.c   | 2 +-
 10 files changed, 3 insertions(+), 20 deletions(-)

diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index 1d378e3aa1..edd2b767af 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -196,7 +196,6 @@ static int Open(vlc_object_t *object)
 sys->layer = var_InheritInteger(vd, MMAL_LAYER_NAME);
 bcm_host_init();
 
-vd->info.has_hide_mouse = true;
 sys->opaque = vd->fmt.i_chroma == VLC_CODEC_MMAL_OPAQUE;
 
 status = mmal_component_create(MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER, 
>component);
diff --git a/modules/video_output/aa.c b/modules/video_output/aa.c
index 6210aeefc5..b69ca15be7 100644
--- a/modules/video_output/aa.c
+++ b/modules/video_output/aa.c
@@ -129,6 +129,7 @@ static int Open(vlc_object_t *object)
 /* Setup vout_display now that everything is fine */
 vd->fmt = fmt;
 vd->info.has_pictures_invalid = true;
+vd->info.has_hide_mouse = false;
 
 vd->pool= Pool;
 vd->prepare = Prepare;
diff --git a/modules/video_output/caca.c b/modules/video_output/caca.c
index 65d317cedc..5e3579e734 100644
--- a/modules/video_output/caca.c
+++ b/modules/video_output/caca.c
@@ -191,6 +191,7 @@ static int Open(vlc_object_t *object)
 
 /* Setup vout_display now that everything is fine */
 vd->fmt = fmt;
+vd->info.has_hide_mouse = false;
 
 vd->pool= Pool;
 vd->prepare = Prepare;
diff --git a/modules/video_output/caopengllayer.m 
b/modules/video_output/caopengllayer.m
index 7d129a9fc6..4232d29441 100644
--- a/modules/video_output/caopengllayer.m
+++ b/modules/video_output/caopengllayer.m
@@ -198,7 +198,6 @@ static int Open (vlc_object_t *p_this)
 /* setup vout display */
 vout_display_info_t info = vd->info;
 info.subpicture_chromas = subpicture_chromas;
-info.has_hide_mouse = true;
 vd->info = info;
 
 vd->pool= Pool;
diff --git a/modules/video_output/decklink.cpp 
b/modules/video_output/decklink.cpp
index 2ec4126a54..7992b344c3 100644
--- a/modules/video_output/decklink.cpp
+++ b/modules/video_output/decklink.cpp
@@ -1066,7 +1066,6 @@ static int OpenVideo(vlc_object_t *p_this)
 video_format_Clean( >fmt );
 video_format_Copy( >fmt, >video.currentfmt );
 
-vd->info.has_hide_mouse = true;
 vd->pool= PoolVideo;
 vd->prepare = PrepareVideo;
 vd->display = DisplayVideo;
diff --git a/modules/video_output/fb.c b/modules/video_output/fb.c
index 615b2c7663..765e01b1b7 100644
--- a/modules/video_output/fb.c
+++ b/modules/video_output/fb.c
@@ -300,12 +300,7 @@ static int Open(vlc_object_t *object)
 fmt.i_visible_height = sys->height;
 
 /* */
-vout_display_info_t info = vd->info;
-info.has_hide_mouse = true;
-
-/* */
 vd->fmt = fmt;
-vd->info= info;
 vd->pool= Pool;
 vd->prepare = NULL;
 vd->display = Display;
diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index 2770c44305..9823809a97 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -237,7 +237,6 @@ static int Open (vlc_object_t *this)
 vout_display_info_t info = vd->info;
 info.has_pictures_invalid = false;
 info.subpicture_chromas = subpicture_chromas;
-info.has_hide_mouse = true;
 
 /* Setup vout_display_t once everything is fine */
 vd->info = info;
diff --git a/modules/video_output/vmem.c b/modules/video_output/vmem.c
index 1c57a82880..a046d7c33e 100644
--- a/modules/video_output/vmem.c
+++ b/modules/video_output/vmem.c
@@ -208,13 +208,8 @@ static int Open(vlc_object_t *object)
 }
 
 /* */
-vout_display_info_t info = vd->info;
-info.has_hide_mouse = true;
-
-/* */
 vd->sys = sys;
 vd->fmt = fmt;
-vd->info= info;
 vd->pool= Pool;
 vd->prepare = Prepare;
 vd->display = Display;
diff --git a/modules/video_output/yuv.c b/modules/video_output/yuv.c
index