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
c3b55fa9
Commit
c3b55fa9
authored
May 08, 2008
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DBus: use the current array of playlist items
fix #1570
parent
35d8114a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
modules/control/dbus.c
modules/control/dbus.c
+10
-8
No files found.
modules/control/dbus.c
View file @
c3b55fa9
...
...
@@ -435,9 +435,9 @@ DBUS_METHOD( GetMetadata )
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
}
if
(
i_position
<
=
p_playlist
->
items
.
i_size
/
2
)
if
(
i_position
<
p_playlist
->
current
.
i_size
)
{
GetInputMeta
(
p_playlist
->
items
.
p_elems
[
i_position
*
2
-
1
]
->
p_input
,
&
args
);
GetInputMeta
(
p_playlist
->
current
.
p_elems
[
i_position
]
->
p_input
,
&
args
);
}
PL_UNLOCK
;
...
...
@@ -451,7 +451,7 @@ DBUS_METHOD( GetLength )
OUT_ARGUMENTS
;
playlist_t
*
p_playlist
=
pl_Yield
(
(
vlc_object_t
*
)
p_this
);
dbus_int32_t
i_elements
=
p_playlist
->
items
.
i_size
/
2
;
dbus_int32_t
i_elements
=
p_playlist
->
current
.
i_size
;
pl_Release
(
p_playlist
);
ADD_INT32
(
&
i_elements
);
...
...
@@ -480,12 +480,14 @@ DBUS_METHOD( DelTrack )
return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED
;
}
if
(
i_position
<=
p_playlist
->
items
.
i_size
/
2
)
PL_LOCK
;
if
(
i_position
<
p_playlist
->
current
.
i_size
)
{
playlist_DeleteFromInput
(
p_playlist
,
p_playlist
->
items
.
p_elems
[
i_position
*
2
-
1
]
->
i_id
,
fals
e
);
p_playlist
->
current
.
p_elems
[
i_position
]
->
p_input
->
i_id
,
tru
e
);
}
PL_UNLOCK
;
pl_Release
(
p_playlist
);
...
...
@@ -830,7 +832,7 @@ DBUS_SIGNAL( TrackListChangeSignal )
OUT_ARGUMENTS
;
playlist_t
*
p_playlist
=
pl_Yield
(
(
vlc_object_t
*
)
p_data
);
dbus_int32_t
i_elements
=
p_playlist
->
items
.
i_size
/
2
;
dbus_int32_t
i_elements
=
p_playlist
->
current
.
i_size
;
pl_Release
(
p_playlist
);
ADD_INT32
(
&
i_elements
);
...
...
@@ -1012,7 +1014,7 @@ static int UpdateCaps( intf_thread_t* p_intf, bool b_playlist_locked )
playlist_t
*
p_playlist
=
pl_Yield
(
(
vlc_object_t
*
)
p_intf
);
if
(
!
b_playlist_locked
)
PL_LOCK
;
if
(
p_playlist
->
items
.
i_size
>
0
)
if
(
p_playlist
->
current
.
i_size
>
0
)
i_caps
|=
CAPS_CAN_PLAY
|
CAPS_CAN_GO_PREV
|
CAPS_CAN_GO_NEXT
;
if
(
p_playlist
->
p_input
)
...
...
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