[vlc-commits] vout: remove aa output
Thomas Guillem
git at videolan.org
Fri Feb 2 14:59:53 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Feb 2 14:54:49 2018 +0100| [7d141bf19fa57c79c1deb4617441b5966d8762fc] | committer: Thomas Guillem
vout: remove aa output
Because caca is the future.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7d141bf19fa57c79c1deb4617441b5966d8762fc
---
NEWS | 3 +
configure.ac | 15 --
contrib/src/sdl/rules.mak | 1 -
modules/MODULES_LIST | 1 -
modules/video_output/Makefile.am | 11 --
modules/video_output/aa.c | 330 ---------------------------------------
po/POTFILES.in | 1 -
7 files changed, 3 insertions(+), 359 deletions(-)
diff --git a/NEWS b/NEWS
index b24492471e..90eb307dae 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,9 @@ Codecs:
* Support for experimental AV1 video encoding
* WebVTT encoder
+Video ouput:
+ * Remove aa plugin
+ * Remove evas plugin
Changes between 2.2.x and 3.0.0-git:
--------------------------------
diff --git a/configure.ac b/configure.ac
index d76d9f772b..92e127fa60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3347,21 +3347,6 @@ AC_CHECK_HEADER([linux/fb.h], [
VLC_ADD_PLUGIN([fb])
])
-
-dnl
-dnl AA plugin
-dnl
-AC_ARG_ENABLE(aa,
- [ --enable-aa aalib output (default disabled)])
-if test "${enable_aa}" = "yes"
-then
- AC_CHECK_HEADER(aalib.h,have_aa="true",have_aa="false")
- if test "${have_aa}" = "true"
- then
- VLC_ADD_PLUGIN([aa])
- fi
-fi
-
dnl
dnl libcaca plugin
dnl
diff --git a/contrib/src/sdl/rules.mak b/contrib/src/sdl/rules.mak
index 4b16cc90f3..4a933b5486 100644
--- a/contrib/src/sdl/rules.mak
+++ b/contrib/src/sdl/rules.mak
@@ -31,7 +31,6 @@ SDLCONF := $(HOSTCONF) \
--disable-file \
--disable-assembly \
--disable-video-x11 \
- --disable-video-aalib \
--disable-video-dga \
--disable-video-fbcon \
--disable-video-directfb \
diff --git a/modules/MODULES_LIST b/modules/MODULES_LIST
index 3bfccb0c65..747ea67d59 100644
--- a/modules/MODULES_LIST
+++ b/modules/MODULES_LIST
@@ -2,7 +2,6 @@ List of VLC plugins:
$Id$
* a52: A/52 audio decoder plugin, using liba52
- * aa: Ascii art video output
* access_alsa: Alsa access module
* access_concat: concatenated access
* access_imem: memory bitstream access module
diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index 4a10df9fd4..1718a20cff 100644
--- a/modules/video_output/Makefile.am
+++ b/modules/video_output/Makefile.am
@@ -403,17 +403,6 @@ EXTRA_LTLIBRARIES += libfb_plugin.la
vout_LTLIBRARIES += $(LTLIBfb)
-### ASCII Art ###
-libaa_plugin_la_SOURCES = video_output/aa.c
-libaa_plugin_la_LIBADD = libevent_thread.la -laa
-if !HAVE_WIN32
-libaa_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIBS) -lX11
-endif
-libaa_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(voutdir)'
-EXTRA_LTLIBRARIES += libaa_plugin.la
-vout_LTLIBRARIES += $(LTLIBaa)
-
-
### Coloured ASCII art ###
libcaca_plugin_la_SOURCES = video_output/caca.c
libcaca_plugin_la_CFLAGS = $(AM_CFLAGS) $(CACA_CFLAGS)
diff --git a/modules/video_output/aa.c b/modules/video_output/aa.c
deleted file mode 100644
index e9146d082c..0000000000
--- a/modules/video_output/aa.c
+++ /dev/null
@@ -1,330 +0,0 @@
-/*****************************************************************************
- * aa.c: "vout display" module using aalib
- *****************************************************************************
- * Copyright (C) 2002-2009 VLC authors and VideoLAN
- * $Id$
- *
- * Authors: Sigmund Augdal Helberg <dnumgis at videolan.org>
- *
- * 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.
- *****************************************************************************/
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <vlc_common.h>
-#include <vlc_plugin.h>
-#include <vlc_vout_display.h>
-#include <vlc_picture_pool.h>
-
-#include <assert.h>
-#include <aalib.h>
-
-#ifndef _WIN32
-# ifdef X_DISPLAY_MISSING
-# error Xlib required due to XInitThreads
-# endif
-# include <vlc_xlib.h>
-#endif
-
-#include "event_thread.h"
-
-/* TODO
- * - what about RGB palette ?
- */
-/*****************************************************************************
- * Module descriptor
- *****************************************************************************/
-static int Open (vlc_object_t *);
-static void Close(vlc_object_t *);
-
-vlc_module_begin()
- set_shortname(N_("ASCII Art"))
- set_category(CAT_VIDEO)
- set_subcategory(SUBCAT_VIDEO_VOUT)
- set_description(N_("ASCII-art video output"))
- set_capability("vout display", /*10*/0)
- add_shortcut("aalib")
- set_callbacks(Open, Close)
-vlc_module_end()
-
-/*****************************************************************************
- * Local prototypes
- *****************************************************************************/
-static picture_pool_t *Pool (vout_display_t *, unsigned);
-static void Prepare(vout_display_t *, picture_t *, subpicture_t *);
-static void PictureDisplay(vout_display_t *, picture_t *, subpicture_t *);
-static int Control(vout_display_t *, int, va_list);
-
-/* */
-static void Manage(vout_display_t *);
-
-/* */
-struct vout_display_sys_t {
- struct aa_context* aa_context;
- aa_palette palette;
-
- picture_pool_t *pool;
- vout_display_event_thread_t *et;
-};
-
-/**
- * This function allocates and initializes a aa vout method.
- */
-static int Open(vlc_object_t *object)
-{
- vout_display_t *vd = (vout_display_t *)object;
- vout_display_sys_t *sys;
-
-#ifndef _WIN32
- if (!vlc_xlib_init (object))
- return VLC_EGENERIC;
-#endif
-
- /* Allocate structure */
- vd->sys = sys = calloc(1, sizeof(*sys));
- if (!sys)
- return VLC_ENOMEM;
-
- /* Don't parse any options, but take $AAOPTS into account */
- aa_parseoptions(NULL, NULL, NULL, NULL);
-
- /* */
- sys->aa_context = aa_autoinit(&aa_defparams);
- if (!sys->aa_context) {
- msg_Err(vd, "cannot initialize aalib");
- goto error;
- }
- vout_display_DeleteWindow(vd, NULL);
-
- sys->et = VoutDisplayEventCreateThread(vd);
-
- aa_autoinitkbd(sys->aa_context, 0);
- aa_autoinitmouse(sys->aa_context, AA_MOUSEALLMASK);
-
- /* */
- video_format_t fmt = vd->fmt;
- fmt.i_chroma = VLC_CODEC_RGB8;
- fmt.i_width = aa_imgwidth(sys->aa_context);
- fmt.i_height = aa_imgheight(sys->aa_context);
- fmt.i_visible_width = fmt.i_width;
- fmt.i_visible_height = fmt.i_height;
-
- /* Setup vout_display now that everything is fine */
- vd->fmt = fmt;
- vd->info.has_pictures_invalid = true;
- vd->info.needs_hide_mouse = true;
-
- vd->pool = Pool;
- vd->prepare = Prepare;
- vd->display = PictureDisplay;
- vd->control = Control;
- vd->manage = Manage;
-
- /* Inspect initial configuration and send correction events
- * FIXME how to handle aspect ratio with aa ? */
- vout_display_SendEventDisplaySize(vd, fmt.i_width, fmt.i_height);
-
- return VLC_SUCCESS;
-
-error:
- if (sys && sys->aa_context)
- aa_close(sys->aa_context);
- free(sys);
- return VLC_EGENERIC;
-}
-
-/**
- * Close a aa video output method
- */
-static void Close(vlc_object_t *object)
-{
- vout_display_t *vd = (vout_display_t *)object;
- vout_display_sys_t *sys = vd->sys;
-
- if (sys->pool)
- picture_pool_Release(sys->pool);
- VoutDisplayEventKillThread(sys->et);
- aa_close(sys->aa_context);
- free(sys);
-}
-
-/**
- * Return a pool of direct buffers
- */
-static picture_pool_t *Pool(vout_display_t *vd, unsigned count)
-{
- vout_display_sys_t *sys = vd->sys;
- VLC_UNUSED(count);
-
- if (!sys->pool) {
- picture_resource_t rsc;
-
- memset(&rsc, 0, sizeof(rsc));
- rsc.p[0].p_pixels = aa_image(sys->aa_context);
- rsc.p[0].i_pitch = aa_imgwidth(sys->aa_context);
- rsc.p[0].i_lines = aa_imgheight(sys->aa_context);
-
- picture_t *p_picture = picture_NewFromResource(&vd->fmt, &rsc);
- if (!p_picture)
- return NULL;
-
- sys->pool = picture_pool_New(1, &p_picture);
- }
- return sys->pool;
-}
-
-/**
- * Prepare a picture for display */
-static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
-{
- vout_display_sys_t *sys = vd->sys;
-
- assert(vd->fmt.i_width == aa_imgwidth(sys->aa_context) &&
- vd->fmt.i_height == aa_imgheight(sys->aa_context));
-
-#if 0
- if (picture->format.p_palette) {
- for (int i = 0; i < 256; i++) {
- aa_setpalette(vd->sys->palette, 256 - i,
- red[ i ], green[ i ], blue[ i ]);
- }
- }
-#else
- VLC_UNUSED(picture);
-#endif
- VLC_UNUSED(subpicture);
-
- aa_fastrender(sys->aa_context, 0, 0,
- vd->fmt.i_width, vd->fmt.i_height);
-}
-
-/**
- * Display a picture
- */
-static void PictureDisplay(vout_display_t *vd, picture_t *picture, subpicture_t *subpicture)
-{
- vout_display_sys_t *sys = vd->sys;
-
- aa_flush(sys->aa_context);
- picture_Release(picture);
- VLC_UNUSED(subpicture);
-}
-
-/**
- * Control for vout display
- */
-static int Control(vout_display_t *vd, int query, va_list args)
-{
- VLC_UNUSED(args);
- vout_display_sys_t *sys = vd->sys;
-
- switch (query) {
- case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
- /* We have to ignore what is requested */
- vout_display_SendEventPicturesInvalid(vd);
- return VLC_SUCCESS;
-
- case VOUT_DISPLAY_RESET_PICTURES:
- if (sys->pool)
- picture_pool_Release(sys->pool);
- sys->pool = NULL;
-
- vd->fmt.i_width = aa_imgwidth(sys->aa_context);
- vd->fmt.i_height = aa_imgheight(sys->aa_context);
- return VLC_SUCCESS;
-
- case VOUT_DISPLAY_HIDE_MOUSE:
- aa_hidemouse(sys->aa_context);
- return VLC_SUCCESS;
-
- default:
- msg_Err(vd, "Unsupported query in vout display aalib");
- return VLC_EGENERIC;
- }
-}
-
-
-/**
- * Proccess pending event
- */
-static void Manage(vout_display_t *vd)
-{
- vout_display_sys_t *sys = vd->sys;
-
- for (;;) {
- const int event = aa_getevent(sys->aa_context, 0);
- if (!event)
- return;
-
- switch (event) {
- case AA_MOUSE: {
- int x, y;
- int button;
- int vlc;
- aa_getmouse(sys->aa_context, &x, &y, &button);
-
- vlc = 0;
- if (button & AA_BUTTON1)
- vlc |= 1 << MOUSE_BUTTON_LEFT;
- if (button & AA_BUTTON2)
- vlc |= 1 << MOUSE_BUTTON_CENTER;
- if (button & AA_BUTTON3)
- vlc |= 1 << MOUSE_BUTTON_RIGHT;
-
- vout_display_SendEventMouseState(vd, x, y, vlc);
-
- aa_showcursor(sys->aa_context); /* Not perfect, we show it on click too */
- break;
- }
-
- case AA_RESIZE:
- aa_resize(sys->aa_context);
- vout_display_SendEventDisplaySize(vd,
- aa_imgwidth(sys->aa_context),
- aa_imgheight(sys->aa_context));
- break;
-
- /* TODO keys support to complete */
- case AA_UP:
- vout_display_SendEventKey(vd, KEY_UP);
- break;
- case AA_DOWN:
- vout_display_SendEventKey(vd, KEY_DOWN);
- break;
- case AA_RIGHT:
- vout_display_SendEventKey(vd, KEY_RIGHT);
- break;
- case AA_LEFT:
- vout_display_SendEventKey(vd, KEY_LEFT);
- break;
- case AA_BACKSPACE:
- vout_display_SendEventKey(vd, KEY_BACKSPACE);
- break;
- case AA_ESC:
- vout_display_SendEventKey(vd, KEY_ESC);
- break;
- default:
- if (event >= 0x20 && event <= 0x7f)
- vout_display_SendEventKey(vd, event);
- break;
- }
- }
-}
-
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 492bfe5db4..201d0e592b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1161,7 +1161,6 @@ modules/video_filter/sharpen.c
modules/video_filter/transform.c
modules/video_filter/vhs.c
modules/video_filter/wave.c
-modules/video_output/aa.c
modules/video_output/android/window.c
modules/video_output/caca.c
modules/video_output/caopengllayer.m
More information about the vlc-commits
mailing list