[vlc-commits] Remove OSSO screen unblanking plug-in
Rémi Denis-Courmont
git at videolan.org
Sat Oct 1 09:51:27 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Sep 30 10:16:53 2011 +0300| [339d3029862982016ed079f9fe7860a44c6ad731] | committer: Rémi Denis-Courmont
Remove OSSO screen unblanking plug-in
This is superseded by the MCE plug-in. libosso is not available on
Maemo 6 while MCE is available on all versions.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=339d3029862982016ed079f9fe7860a44c6ad731
---
configure.ac | 5 --
modules/LIST | 1 -
modules/misc/Modules.am | 2 -
modules/misc/inhibit/osso.c | 144 -------------------------------------------
po/POTFILES.in | 1 -
5 files changed, 0 insertions(+), 153 deletions(-)
diff --git a/configure.ac b/configure.ac
index 560e1e9..02d7c72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4014,11 +4014,6 @@ dnl
PKG_CHECK_MODULES([MCE], [dbus-1 mce], [VLC_ADD_PLUGIN([mce])], [true])
-dnl
-dnl OSSO (Maemo screen blanking) plugin
-dnl
-PKG_ENABLE_MODULES_VLC([OSSO_SCREENSAVER], [], [libosso], [Maemo support], [auto])
-
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 890170c..4cb2765 100644
--- a/modules/LIST
+++ b/modules/LIST
@@ -235,7 +235,6 @@ $Id$
* osd_parser: OSD import module
* osdmenu: video_filter for displaying and streaming a On Screen Display menu
* oss: audio output module using the OSS /dev/dsp interface
- * osso_screensaver: Maemo screen unblanking module
* packetizer_copy: Simple copy packetizer
* packetizer_dirac: Dirac video packetizer
* packetizer_flac: FLAC audio packetizer
diff --git a/modules/misc/Modules.am b/modules/misc/Modules.am
index 3b66c81..e4771eb 100644
--- a/modules/misc/Modules.am
+++ b/modules/misc/Modules.am
@@ -35,8 +35,6 @@ libmce_plugin_la_DEPENDENCIES =
EXTRA_LTLIBRARIES += libmce_plugin.la
libvlc_LTLIBRARIES += $(LTLIBmce)
-SOURCES_osso_screensaver = inhibit/osso.c
-
libvlc_LTLIBRARIES += \
libaudioscrobbler_plugin.la \
liblogger_plugin.la
diff --git a/modules/misc/inhibit/osso.c b/modules/misc/inhibit/osso.c
deleted file mode 100644
index a858dd1..0000000
--- a/modules/misc/inhibit/osso.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * @file osso.c
- * @brief Maemo screen unblanking for VLC media player
- */
-/*****************************************************************************
- * Copyright © 2009 Rémi Denis-Courmont
- *
- * This library 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 library 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 General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, 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 <libosso.h>
-
-static int Open (vlc_object_t *);
-static void Close (vlc_object_t *);
-
-/*
- * Module descriptor
- */
-vlc_module_begin ()
- set_shortname (N_("OSSO"))
- set_description (N_("OSSO 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 *, bool);
-
-/* We keep a single context per process */
-static struct
-{
- vlc_mutex_t lock;
- unsigned refs;
- unsigned suspensions;
- osso_context_t *ctx;
- vlc_timer_t timer;
-} osso = {
- .lock = VLC_STATIC_MUTEX,
- .refs = 0,
- .suspensions = 0,
-};
-
-static void vlc_osso_unblank (void *dummy)
-{
- (void) dummy;
-
- vlc_mutex_lock (&osso.lock);
- osso_display_blanking_pause (osso.ctx);
- vlc_mutex_unlock (&osso.lock);
-}
-
-#define BLANKING (NULL)
-#define UNBLANKING ((vlc_inhibit_sys_t *)ih)
-
-static int Open (vlc_object_t *obj)
-{
- vlc_inhibit_t *ih = (vlc_inhibit_t *)obj;
- int ret = VLC_EGENERIC;
-
- vlc_mutex_lock (&osso.lock);
- if (osso.refs++ == 0)
- {
- if (vlc_timer_create (&osso.timer, vlc_osso_unblank, NULL))
- goto out;
-
- osso.ctx = osso_initialize (PACKAGE, VERSION, 0, NULL);
- if (osso.ctx == NULL)
- {
- vlc_timer_destroy (osso.timer);
- goto out;
- }
-
- msg_Dbg (obj, "initialized OSSO context");
- ret = VLC_SUCCESS;
- }
-out:
- vlc_mutex_unlock (&osso.lock);
-
- ih->p_sys = BLANKING;
- ih->inhibit = Inhibit;
- return ret;
-}
-
-static void Close (vlc_object_t *obj)
-{
- Inhibit ((vlc_inhibit_t *)obj, false);
-
- vlc_mutex_lock (&osso.lock);
- if (--osso.refs == 0)
- {
- msg_Dbg (obj, "deinitializing OSSO context");
- vlc_timer_destroy (osso.timer);
- osso_deinitialize (osso.ctx);
- }
- vlc_mutex_unlock (&osso.lock);
-}
-
-static void Inhibit (vlc_inhibit_t *ih, bool unblank)
-{
- if (unblank == (ih->p_sys != BLANKING))
- return; /* already in right state */
-
- vlc_mutex_lock (&osso.lock);
- if (unblank)
- {
- /* 10 seconds is the shortest blanking interval */
- mtime_t start = (mdate() / CLOCK_FREQ + 8) * CLOCK_FREQ;
- mtime_t interval = 9 * CLOCK_FREQ;
-
- osso_display_state_on (osso.ctx);
- if (osso.suspensions++ == 0) /* arm timer */
- vlc_timer_schedule (osso.timer, true, start, interval);
- ih->p_sys = UNBLANKING;
- }
- else
- {
- if (--osso.suspensions == 0) /* disarm timer */
- vlc_timer_schedule (osso.timer, false, 0, 0);
- ih->p_sys = BLANKING;
- }
- vlc_mutex_unlock (&osso.lock);
-}
-
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f2488da..ab6ea46 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -914,7 +914,6 @@ modules/misc/dhparams.h
modules/misc/gnutls.c
modules/misc/inhibit.c
modules/misc/inhibit/mce.c
-modules/misc/inhibit/osso.c
modules/misc/inhibit/xdg.c
modules/misc/inhibit/xscreensaver.c
modules/misc/logger.c
More information about the vlc-commits
mailing list