Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
5befd634
Commit
5befd634
authored
Sep 30, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MCE plug-in for screen unblanking on Maemo devices
parent
ee3754df
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
141 additions
and
0 deletions
+141
-0
configure.ac
configure.ac
+6
-0
modules/LIST
modules/LIST
+1
-0
modules/misc/Modules.am
modules/misc/Modules.am
+7
-0
modules/misc/inhibit/mce.c
modules/misc/inhibit/mce.c
+126
-0
po/POTFILES.in
po/POTFILES.in
+1
-0
No files found.
configure.ac
View file @
5befd634
...
@@ -4008,6 +4008,12 @@ AS_IF([test "${have_libgcrypt}" = "yes"], [
...
@@ -4008,6 +4008,12 @@ AS_IF([test "${have_libgcrypt}" = "yes"], [
])
])
dnl
dnl Nokia MCE plugin (Maemo screen unblanking)
dnl
PKG_CHECK_MODULES([MCE], [dbus-1 mce], [VLC_ADD_PLUGIN([mce])], [true])
dnl
dnl
dnl OSSO (Maemo screen blanking) plugin
dnl OSSO (Maemo screen blanking) plugin
dnl
dnl
...
...
modules/LIST
View file @
5befd634
...
@@ -184,6 +184,7 @@ $Id$
...
@@ -184,6 +184,7 @@ $Id$
* magnify: zoom video filter
* magnify: zoom video filter
* marq: Overlays a marquee on the video
* marq: Overlays a marquee on the video
* mash: OpenMash based decoder
* mash: OpenMash based decoder
* mce: Nokia MCE screen unblanking module
* media_library: a sql based media library
* media_library: a sql based media library
* mediadirs: Picture/Music/Video user directories as service discoveries
* mediadirs: Picture/Music/Video user directories as service discoveries
* memcpy3dn: 3D Now! accelerated version of memcpy
* memcpy3dn: 3D Now! accelerated version of memcpy
...
...
modules/misc/Modules.am
View file @
5befd634
...
@@ -28,6 +28,13 @@ libvlc_LTLIBRARIES += \
...
@@ -28,6 +28,13 @@ libvlc_LTLIBRARIES += \
libxscreensaver_plugin.la
libxscreensaver_plugin.la
endif
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)
libmce_plugin_la_DEPENDENCIES =
EXTRA_LTLIBRARIES += libmce_plugin.la
libvlc_LTLIBRARIES += $(LTLIBmce)
SOURCES_osso_screensaver = inhibit/osso.c
SOURCES_osso_screensaver = inhibit/osso.c
libvlc_LTLIBRARIES += \
libvlc_LTLIBRARIES += \
...
...
modules/misc/inhibit/mce.c
0 → 100644
View file @
5befd634
/**
* @file mce.c
* @brief Nokia MCE screen unblanking for VLC media player
*/
/*****************************************************************************
* Copyright © 2009-2011 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 <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
*
,
bool
);
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
,
bool
unblank
)
{
vlc_inhibit_sys_t
*
sys
=
ih
->
p_sys
;
/* 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
);
}
po/POTFILES.in
View file @
5befd634
...
@@ -913,6 +913,7 @@ modules/misc/audioscrobbler.c
...
@@ -913,6 +913,7 @@ modules/misc/audioscrobbler.c
modules/misc/dhparams.h
modules/misc/dhparams.h
modules/misc/gnutls.c
modules/misc/gnutls.c
modules/misc/inhibit.c
modules/misc/inhibit.c
modules/misc/inhibit/mce.c
modules/misc/inhibit/osso.c
modules/misc/inhibit/osso.c
modules/misc/inhibit/xdg.c
modules/misc/inhibit/xdg.c
modules/misc/inhibit/xscreensaver.c
modules/misc/inhibit/xscreensaver.c
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment