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
94782ce8
Commit
94782ce8
authored
Apr 11, 2005
by
Sigmund Augdal Helberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
all: remove items from pp_all_items when needed. Hopefully gives a more
stable playlist
parent
75be9a03
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
3 deletions
+44
-3
TODO
TODO
+0
-1
src/playlist/item-ext.c
src/playlist/item-ext.c
+22
-1
src/playlist/view.c
src/playlist/view.c
+22
-1
No files found.
TODO
View file @
94782ce8
...
@@ -138,7 +138,6 @@ Think playlist within playlist, directory structures, SAP section, TV channels l
...
@@ -138,7 +138,6 @@ Think playlist within playlist, directory structures, SAP section, TV channels l
70% done.<br />
70% done.<br />
Todo:<br />
Todo:<br />
- Core support<br />
- Core support<br />
- *** Remove items from pp_all_items on deletion
- *** Consider changing calls to playlist_Control into playlist_LockControl
- *** Consider changing calls to playlist_Control into playlist_LockControl
- * "Name finder"<br />
- * "Name finder"<br />
- * "Protocol rollover" node<br />
- * "Protocol rollover" node<br />
...
...
src/playlist/item-ext.c
View file @
94782ce8
...
@@ -642,7 +642,7 @@ int playlist_Replace( playlist_t *p_playlist, playlist_item_t *p_olditem,
...
@@ -642,7 +642,7 @@ int playlist_Replace( playlist_t *p_playlist, playlist_item_t *p_olditem,
*/
*/
int
playlist_Delete
(
playlist_t
*
p_playlist
,
int
i_id
)
int
playlist_Delete
(
playlist_t
*
p_playlist
,
int
i_id
)
{
{
int
i
;
int
i
,
i_top
,
i_bottom
;
playlist_item_t
*
p_item
=
playlist_ItemGetById
(
p_playlist
,
i_id
);
playlist_item_t
*
p_item
=
playlist_ItemGetById
(
p_playlist
,
i_id
);
...
@@ -652,6 +652,27 @@ int playlist_Delete( playlist_t * p_playlist, int i_id )
...
@@ -652,6 +652,27 @@ int playlist_Delete( playlist_t * p_playlist, int i_id )
}
}
var_SetInteger
(
p_playlist
,
"item-deleted"
,
i_id
);
var_SetInteger
(
p_playlist
,
"item-deleted"
,
i_id
);
i_bottom
=
0
;
i_top
=
p_playlist
->
i_all_size
;
i
=
i_top
/
2
;
while
(
p_playlist
->
pp_all_items
[
i
]
->
input
.
i_id
!=
i_id
&&
i_top
>
i_bottom
)
{
if
(
p_playlist
->
pp_all_items
[
i
]
->
input
.
i_id
<
i_id
)
{
i_bottom
=
i
+
1
;
}
else
{
i_top
=
i
-
1
;
}
i
=
i_bottom
+
(
i_top
-
i_bottom
)
/
2
;
}
if
(
p_playlist
->
pp_all_items
[
i
]
->
input
.
i_id
==
i_id
)
{
REMOVE_ELEM
(
p_playlist
->
pp_all_items
,
p_playlist
->
i_all_size
,
i
);
}
/* Check if it is the current item */
/* Check if it is the current item */
if
(
p_playlist
->
status
.
p_item
==
p_item
)
if
(
p_playlist
->
status
.
p_item
==
p_item
)
{
{
...
...
src/playlist/view.c
View file @
94782ce8
...
@@ -367,7 +367,7 @@ int playlist_NodeEmpty( playlist_t *p_playlist, playlist_item_t *p_root,
...
@@ -367,7 +367,7 @@ int playlist_NodeEmpty( playlist_t *p_playlist, playlist_item_t *p_root,
int
playlist_NodeDelete
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_root
,
int
playlist_NodeDelete
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_root
,
vlc_bool_t
b_delete_items
,
vlc_bool_t
b_force
)
vlc_bool_t
b_delete_items
,
vlc_bool_t
b_force
)
{
{
int
i
;
int
i
,
i_top
,
i_bottom
;
if
(
p_root
->
i_children
==
-
1
)
if
(
p_root
->
i_children
==
-
1
)
{
{
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
@@ -399,6 +399,27 @@ int playlist_NodeDelete( playlist_t *p_playlist, playlist_item_t *p_root,
...
@@ -399,6 +399,27 @@ int playlist_NodeDelete( playlist_t *p_playlist, playlist_item_t *p_root,
p_root
->
pp_parents
[
i
]
->
p_parent
);
p_root
->
pp_parents
[
i
]
->
p_parent
);
}
}
var_SetInteger
(
p_playlist
,
"item-deleted"
,
p_root
->
input
.
i_id
);
var_SetInteger
(
p_playlist
,
"item-deleted"
,
p_root
->
input
.
i_id
);
i_bottom
=
0
;
i_top
=
p_playlist
->
i_all_size
;
i
=
i_top
/
2
;
while
(
p_playlist
->
pp_all_items
[
i
]
->
input
.
i_id
!=
p_root
->
input
.
i_id
&&
i_top
>
i_bottom
)
{
if
(
p_playlist
->
pp_all_items
[
i
]
->
input
.
i_id
<
p_root
->
input
.
i_id
)
{
i_bottom
=
i
+
1
;
}
else
{
i_top
=
i
-
1
;
}
i
=
i_bottom
+
(
i_top
-
i_bottom
)
/
2
;
}
if
(
p_playlist
->
pp_all_items
[
i
]
->
input
.
i_id
==
p_root
->
input
.
i_id
)
{
REMOVE_ELEM
(
p_playlist
->
pp_all_items
,
p_playlist
->
i_all_size
,
i
);
}
playlist_ItemDelete
(
p_root
);
playlist_ItemDelete
(
p_root
);
}
}
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
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