Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
b0845c6e
Commit
b0845c6e
authored
Nov 20, 2006
by
Rafaël Carré
Browse files
Uses playlist facilities
Doesn't lock the playlist if unneeded
parent
9a6ee723
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/control/dbus.c
View file @
b0845c6e
...
...
@@ -144,7 +144,8 @@ DBUS_METHOD( GetPlayingItem )
char
*
p_psz_no_input
=
&
psz_no_input
;
playlist_t
*
p_playlist
=
pl_Yield
(
((
vlc_object_t
*
)
p_this
)
);
input_thread_t
*
p_input
=
p_playlist
->
p_input
;
ADD_STRING
(
(
p_input
)
?
&
p_input
->
input
.
p_item
->
psz_name
:
&
p_psz_no_input
);
ADD_STRING
(
(
p_input
)
?
&
p_input
->
input
.
p_item
->
psz_name
:
&
p_psz_no_input
);
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
REPLY_SEND
;
}
...
...
@@ -157,7 +158,6 @@ DBUS_METHOD( GetPlayStatus )
char
*
psz_play
;
vlc_value_t
val
;
playlist_t
*
p_playlist
=
pl_Yield
(
(
vlc_object_t
*
)
p_this
);
PL_LOCK
;
input_thread_t
*
p_input
=
p_playlist
->
p_input
;
if
(
!
p_input
)
...
...
@@ -172,7 +172,6 @@ DBUS_METHOD( GetPlayStatus )
else
psz_play
=
strdup
(
"unknown"
);
}
PL_UNLOCK
;
pl_Release
(
p_playlist
);
ADD_STRING
(
&
psz_play
);
...
...
@@ -230,7 +229,6 @@ DBUS_METHOD( AddMRL )
DBusError
error
;
dbus_error_init
(
&
error
);
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
char
*
psz_mrl
;
dbus_bool_t
b_play
;
...
...
@@ -241,19 +239,15 @@ DBUS_METHOD( AddMRL )
if
(
dbus_error_is_set
(
&
error
)
)
{
printf
(
"error: %s
\n
"
,
error
.
message
);
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
;
}
playlist_t
*
p_playlist
=
pl_Yield
(
(
vlc_object_t
*
)
p_this
);
input_item_t
*
p_item
=
input_ItemNew
(
p_intf
,
psz_mrl
,
NULL
);
if
(
p_item
)
{
playlist_AddInput
(
p_playlist
,
p_item
,
PLAYLIST_APPEND
|
(
(
b_play
==
TRUE
)
?
PLAYLIST_GO
:
0
)
,
PLAYLIST_END
,
VLC_TRUE
);
}
playlist_Add
(
p_playlist
,
psz_mrl
,
NULL
,
PLAYLIST_APPEND
|
(
(
b_play
==
TRUE
)
?
PLAYLIST_GO
:
0
)
,
PLAYLIST_END
,
VLC_TRUE
);
pl_Release
(
p_playlist
);
REPLY_SEND
;
...
...
Write
Preview
Supports
Markdown
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