Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
46fb5ca4
Commit
46fb5ca4
authored
Mar 27, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbus: extend dbus to proposed v2.0 of MPRIS specification.
parent
4a624114
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
978 additions
and
8 deletions
+978
-8
modules/control/dbus.c
modules/control/dbus.c
+869
-6
modules/control/dbus.h
modules/control/dbus.h
+109
-2
No files found.
modules/control/dbus.c
View file @
46fb5ca4
This diff is collapsed.
Click to expand it.
modules/control/dbus.h
View file @
46fb5ca4
/*****************************************************************************
* dbus.h : D-Bus control interface
*****************************************************************************
* Copyright (C) 2006 Rafaël Carré
* Copyright (C) 2006-2009 Rafaël Carré
* Copyright (C) 2009 M2X BV
*
* $Id$
*
* Authors: Rafaël Carré <funman at videolanorg>
* Mirsal ENNAIME <mirsal dot ennaime at gmail dot com>
* Jean-Paul Saman <jean-paul dot saman at m2x dot nl>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -22,8 +25,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VLC_DBUS
#define VLC_DBUS
/* MPRIS VERSION */
#define VLC_MPRIS_VERSION_MAJOR
1
#define VLC_MPRIS_VERSION_MAJOR
2
#define VLC_MPRIS_VERSION_MINOR 0
/* DBUS IDENTIFIERS */
...
...
@@ -34,6 +40,8 @@
#define MPRIS_DBUS_ROOT_PATH "/"
#define MPRIS_DBUS_PLAYER_PATH "/Player"
#define MPRIS_DBUS_TRACKLIST_PATH "/TrackList"
#define MPRIS_DBUS_ES_PATH "/ES"
#define MPRIS_DBUS_DISPLAY_PATH "/Display"
/* MACROS */
...
...
@@ -80,6 +88,7 @@
#define ADD_BOOL( b ) DBUS_ADD( DBUS_TYPE_BOOLEAN, b )
#define ADD_INT32( i ) DBUS_ADD( DBUS_TYPE_INT32, i )
#define ADD_BYTE( b ) DBUS_ADD( DBUS_TYPE_BYTE, b )
#define ADD_DOUBLE( d ) DBUS_ADD( DBUS_TYPE_DOUBLE, d )
/* XML data to answer org.freedesktop.DBus.Introspectable.Introspect requests */
...
...
@@ -198,6 +207,13 @@ const char* psz_introspection_xml_data_tracklist =
" <method name=
\"
SetRandom
\"
>
\n
"
" <arg type=
\"
b
\"
direction=
\"
in
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
GetRate
\"
>
\n
"
" <arg type=
\"
d
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
SetRate
\"
>
\n
"
" <arg type=
\"
d
\"
direction=
\"
in
\"
/>
\n
"
" <arg type=
\"
i
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <signal name=
\"
TrackListChange
\"
>
\n
"
" <arg type=
\"
i
\"
/>
\n
"
" </signal>
\n
"
...
...
@@ -205,11 +221,91 @@ const char* psz_introspection_xml_data_tracklist =
"</node>
\n
"
;
const
char
*
psz_introspection_xml_data_es
=
"<!DOCTYPE node PUBLIC
\"
-//freedesktop//DTD D-BUS Object Introspection 1.0//EN
\"\n
"
"
\"
http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd
\"
>
\n
"
"<node>"
" <interface name=
\"
org.freedesktop.DBus.Introspectable
\"
>
\n
"
" <method name=
\"
Introspect
\"
>
\n
"
" <arg name=
\"
data
\"
direction=
\"
out
\"
type=
\"
s
\"
/>
\n
"
" </method>
\n
"
" </interface>
\n
"
" <interface name=
\"
org.freedesktop.MediaPlayer
\"
>
\n
"
" <method name=
\"
GetVideoES
\"
>
\n
"
" <arg type=
\"
i
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
SetVideoES
\"
>
\n
"
" <arg type=
\"
i
\"
direction=
\"
in
\"
/>
\n
"
" <arg type=
\"
i
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
CountVideoES
\"
>
\n
"
" <arg type=
\"
i
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
GetAudioES
\"
>
\n
"
" <arg type=
\"
i
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
SetAudioES
\"
>
\n
"
" <arg type=
\"
i
\"
direction=
\"
in
\"
/>
\n
"
" <arg type=
\"
i
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
CountAudioES
\"
>
\n
"
" <arg type=
\"
s
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
GetSubtitleES
\"
>
\n
"
" <arg type=
\"
i
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
SetSubtitleES
\"
>
\n
"
" <arg type=
\"
i
\"
direction=
\"
in
\"
/>
\n
"
" <arg type=
\"
i
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
CountSubtitles
\"
>
\n
"
" <arg type=
\"
i
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
GetTeletextPage
\"
>
\n
"
" <arg type=
\"
i
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
SetTeletexPage
\"
>
\n
"
" <arg type=
\"
i
\"
direction=
\"
in
\"
/>
\n
"
" <arg type=
\"
i
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
TransparentTeletext
\"
>
\n
"
" <arg type=
\"
b
\"
direction=
\"
in
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
GetEsMetadata
\"
>
\n
"
" <arg type=
\"
i
\"
direction=
\"
in
\"
/>
\n
"
" <arg type=
\"
a{sv}
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" </interface>
\n
"
"</node>
\n
"
;
const
char
*
psz_introspection_xml_data_display
=
"<!DOCTYPE node PUBLIC
\"
-//freedesktop//DTD D-BUS Object Introspection 1.0//EN
\"\n
"
"
\"
http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd
\"
>
\n
"
"<node>"
" <interface name=
\"
org.freedesktop.DBus.Introspectable
\"
>
\n
"
" <method name=
\"
Introspect
\"
>
\n
"
" <arg name=
\"
data
\"
direction=
\"
out
\"
type=
\"
s
\"
/>
\n
"
" </method>
\n
"
" </interface>
\n
"
" <interface name=
\"
org.freedesktop.MediaPlayer
\"
>
\n
"
" <method name=
\"
GetVideoPosition
\"
>
\n
"
" <arg type=
\"
(iiii)
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
SetVideoPosition
\"
>
\n
"
" <arg type=
\"
(iiii)
\"
direction=
\"
in
\"
/>
\n
"
" <arg type=
\"
i
\"
direction=
\"
out
\"
/>
\n
"
" </method>
\n
"
" </interface>
\n
"
"</node>
\n
"
;
/* Handle messages reception */
DBUS_METHOD
(
handle_root
);
DBUS_METHOD
(
handle_player
);
DBUS_METHOD
(
handle_tracklist
);
DBUS_METHOD
(
handle_es
);
DBUS_METHOD
(
handle_display
);
static
const
DBusObjectPathVTable
vlc_dbus_root_vtable
=
{
NULL
,
handle_root
,
/* handler function */
...
...
@@ -226,3 +322,14 @@ static const DBusObjectPathVTable vlc_dbus_tracklist_vtable = {
NULL
,
NULL
,
NULL
,
NULL
};
static
const
DBusObjectPathVTable
vlc_dbus_es_vtable
=
{
NULL
,
handle_es
,
/* handler function */
NULL
,
NULL
,
NULL
,
NULL
};
static
const
DBusObjectPathVTable
vlc_dbus_display_vtable
=
{
NULL
,
handle_display
,
/* handler function */
NULL
,
NULL
,
NULL
,
NULL
};
#endif
/* VLC_DBUS */
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