[vlc-commits] MCE: remove old plugin

Rémi Denis-Courmont git at videolan.org
Sat Feb 23 09:34:56 CET 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Feb 23 10:30:43 2013 +0200| [306964775d1da8ad2b39077dba6e520ba4dc87ad] | committer: Rémi Denis-Courmont

MCE: remove old plugin

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

 NEWS                       |    1 +
 configure.ac               |    6 ---
 modules/LIST               |    1 -
 modules/misc/Modules.am    |    6 ---
 modules/misc/inhibit/mce.c |  127 --------------------------------------------
 po/POTFILES.in             |    1 -
 6 files changed, 1 insertion(+), 141 deletions(-)

diff --git a/NEWS b/NEWS
index 0d54593..58265fa 100644
--- a/NEWS
+++ b/NEWS
@@ -158,6 +158,7 @@ Removed modules:
  * Hildon GUI
  * MSN messenger "now playing" (broken and unmaintained since VLC 1.0.0)
  * Telepathy framework "now playing" (broken and unmaintained since VLC 1.0.0)
+ * Nokia/Maemo MCE screen unblanking plugin
 
 
 Changes between 2.0.4 and 2.0.5:
diff --git a/configure.ac b/configure.ac
index 3529313..6eb50f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3888,12 +3888,6 @@ AS_IF([test "${enable_gnutls}" != "no"], [
 ])
 
 
-dnl
-dnl Nokia MCE plugin (Maemo screen unblanking)
-dnl
-PKG_CHECK_MODULES([MCE], [dbus-1 mce], [VLC_ADD_PLUGIN([mce])], [true])
-
-
 AS_IF([test -f "/etc/maemo_version"], [
   AC_DEFINE([HAVE_MAEMO], 1, [Define to 1 if building for the Maemo platform.])
 ])
diff --git a/modules/LIST b/modules/LIST
index ff9d277..5d23040 100644
--- a/modules/LIST
+++ b/modules/LIST
@@ -191,7 +191,6 @@ $Id$
  * magnify: zoom video filter
  * marq: Overlays a marquee on the video
  * mash: OpenMash based decoder
- * mce: Nokia MCE screen unblanking module
  * media_library: a sql based media library
  * mediacodec: Android Jelly Bean MediaCodec decoder module
  * mediadirs: Picture/Music/Video user directories as service discoveries
diff --git a/modules/misc/Modules.am b/modules/misc/Modules.am
index f835485..7af9879 100644
--- a/modules/misc/Modules.am
+++ b/modules/misc/Modules.am
@@ -36,12 +36,6 @@ if HAVE_DBUS
 libvlc_LTLIBRARIES += libdbus_screensaver_plugin.la
 endif
 
-libmce_plugin_la_SOURCES = inhibit/mce.c
-libmce_plugin_la_CFLAGS = $(AM_CLFAGS) $(DBUS_CFLAGS) $(MCE_CFLAGS)
-libmce_plugin_la_LIBADD = $(AM_LIBADD) $(DBUS_LIBS) $(MCE_LIBS)
-EXTRA_LTLIBRARIES += libmce_plugin.la
-libvlc_LTLIBRARIES += $(LTLIBmce)
-
 liblogger_plugin_la_SOURCES = logger.c
 liblogger_plugin_la_CFLAGS = $(AM_CFLAGS)
 liblogger_plugin_la_LIBADD = $(AM_LIBADD)
diff --git a/modules/misc/inhibit/mce.c b/modules/misc/inhibit/mce.c
deleted file mode 100644
index 71834b9..0000000
--- a/modules/misc/inhibit/mce.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- * @file mce.c
- * @brief Nokia MCE screen unblanking for VLC media player
- */
-/*****************************************************************************
- * Copyright © 2009-2011 Rémi Denis-Courmont
- *
- * 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 <config.h>
-#endif
-
-#include <vlc_common.h>
-#include <vlc_plugin.h>
-#include <vlc_inhibit.h>
-#include <dbus/dbus.h>
-
-static int  Open (vlc_object_t *);
-static void Close (vlc_object_t *);
-
-/*
- * Module descriptor
- */
-vlc_module_begin ()
-    set_shortname (N_("MCE"))
-    set_description (N_("Nokia MCE screen unblanking"))
-    set_category (CAT_ADVANCED)
-    set_subcategory (SUBCAT_ADVANCED_MISC)
-    set_capability ("inhibit", 20)
-    set_callbacks (Open, Close)
-vlc_module_end ()
-
-static void Inhibit (vlc_inhibit_t *, unsigned);
-static void Timer (void *data);
-
-struct vlc_inhibit_sys
-{
-    DBusConnection *conn;
-    vlc_timer_t timer;
-};
-
-static int Open (vlc_object_t *obj)
-{
-    vlc_inhibit_t *ih = (vlc_inhibit_t *)obj;
-    vlc_inhibit_sys_t *sys = malloc (sizeof (*sys));
-    if (unlikely(sys == NULL))
-        return VLC_ENOMEM;
-
-    DBusError err;
-
-    dbus_error_init (&err);
-    sys->conn = dbus_bus_get_private (DBUS_BUS_SYSTEM, &err);
-    if (sys->conn == NULL)
-    {
-        msg_Err (obj, "cannot connect to system bus: %s", err.message);
-        dbus_error_free (&err);
-        goto error;
-    }
-
-    if (vlc_timer_create (&sys->timer, Timer, sys->conn))
-    {
-        dbus_connection_unref (sys->conn);
-        goto error;
-    }
-
-    ih->p_sys = sys;
-    ih->inhibit = Inhibit;
-    return VLC_SUCCESS;
-
-error:
-    free (sys);
-    return VLC_EGENERIC;
-}
-
-static void Close (vlc_object_t *obj)
-{
-    vlc_inhibit_t *ih = (vlc_inhibit_t *)obj;
-    vlc_inhibit_sys_t *sys = ih->p_sys;
-
-    vlc_timer_destroy (sys->timer);
-    dbus_connection_close (sys->conn);
-    dbus_connection_unref (sys->conn);
-    free (sys);
-}
-
-static void Inhibit (vlc_inhibit_t *ih, unsigned flags)
-{
-    vlc_inhibit_sys_t *sys = ih->p_sys;
-    bool unblank = (flags & VLC_INHIBIT_DISPLAY) != 0;
-
-    /* The shortest blanking interval is 10s on N900, 15s on N9 */
-    const mtime_t interval = 9 * CLOCK_FREQ;
-    vlc_timer_schedule (sys->timer, false, unblank, interval);
-}
-
-/* NOTE: This plug-in could be compiled without MCE development files easily.
- * But then it would get included on all platforms with D-Bus. */
-#include <mce/dbus-names.h>
-
-static void Timer (void *data)
-{
-    DBusConnection *conn = data;
-    DBusMessage *msg = dbus_message_new_method_call (MCE_SERVICE,
-                                                     MCE_REQUEST_PATH,
-                                                     MCE_REQUEST_IF,
-                                                     MCE_DISPLAY_ON_REQ);
-    if (unlikely(msg == NULL))
-        return;
-
-    if (dbus_connection_send (conn, msg, NULL))
-        dbus_connection_flush (conn);
-    dbus_message_unref (msg);
-}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1762f1f..9f520b1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -942,7 +942,6 @@ modules/misc/audioscrobbler.c
 modules/misc/dhparams.h
 modules/misc/gnutls.c
 modules/misc/inhibit/dbus.c
-modules/misc/inhibit/mce.c
 modules/misc/inhibit/xdg.c
 modules/misc/logger.c
 modules/misc/playlist/export.c



More information about the vlc-commits mailing list