Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
460774aa
Commit
460774aa
authored
Jun 03, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
D-Bus - Implement "Random" Method. Patch from Mirsal ENNAIME, as usual.
parent
9fcf0621
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
NEWS
NEWS
+4
-0
modules/control/dbus.c
modules/control/dbus.c
+32
-0
modules/control/dbus.h
modules/control/dbus.h
+3
-0
No files found.
NEWS
View file @
460774aa
...
...
@@ -83,6 +83,10 @@ Interfaces:
* Improved mouse gestures
* Unix
* Allow only one running instance, using D-Bus interface (experimental).
* D-Bus Interface (experimental) implements the MPRIS
(Media Player Remote Interfacing specification), a common dbus control
interface for media players that intends to become an xdg standard when
finished.
Capture:
* new BDA device driver plugin for DVB-C/S/T capture cards on Microsoft
...
...
modules/control/dbus.c
View file @
460774aa
...
...
@@ -573,6 +573,37 @@ DBUS_METHOD( Repeat )
REPLY_SEND
;
}
DBUS_METHOD
(
Random
)
{
REPLY_INIT
;
OUT_ARGUMENTS
;
DBusError
error
;
dbus_bool_t
b_random
;
vlc_value_t
val
;
playlist_t
*
p_playlist
=
NULL
;
dbus_error_init
(
&
error
);
dbus_message_get_args
(
p_from
,
&
error
,
DBUS_TYPE_BOOLEAN
,
&
b_random
,
DBUS_TYPE_INVALID
);
if
(
dbus_error_is_set
(
&
error
)
)
{
msg_Err
(
(
vlc_object_t
*
)
p_this
,
"D-Bus message reading : %s
\n
"
,
error
.
message
);
dbus_error_free
(
&
error
);
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
}
val
.
b_bool
=
(
b_random
==
TRUE
)
?
VLC_TRUE
:
VLC_FALSE
;
p_playlist
=
pl_Yield
(
(
vlc_object_t
*
)
p_this
);
var_Set
(
p_playlist
,
"random"
,
val
);
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
REPLY_SEND
;
}
/*****************************************************************************
* Introspection method
*****************************************************************************/
...
...
@@ -663,6 +694,7 @@ DBUS_METHOD( handle_tracklist )
METHOD_FUNC
(
"DelTrack"
,
DelTrack
);
METHOD_FUNC
(
"Loop"
,
Loop
);
METHOD_FUNC
(
"Repeat"
,
Repeat
);
METHOD_FUNC
(
"Random"
,
Random
);
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
}
...
...
modules/control/dbus.h
View file @
460774aa
...
...
@@ -179,6 +179,9 @@ const char* psz_introspection_xml_data_tracklist =
" <method name=
\"
Repeat
\"
>
\n
"
" <arg type=
\"
b
\"
direction=
\"
in
\"
/>
\n
"
" </method>
\n
"
" <method name=
\"
Random
\"
>
\n
"
" <arg type=
\"
b
\"
direction=
\"
in
\"
/>
\n
"
" </method>
\n
"
" </interface>
\n
"
"</node>
\n
"
;
...
...
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