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
5b903151
Commit
5b903151
authored
Nov 13, 2004
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Decrease verbosity
Fix warnings
parent
88628766
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
12 deletions
+33
-12
src/playlist/item-ext.c
src/playlist/item-ext.c
+2
-6
src/playlist/playlist.c
src/playlist/playlist.c
+1
-1
src/playlist/view.c
src/playlist/view.c
+30
-5
No files found.
src/playlist/item-ext.c
View file @
5b903151
...
...
@@ -118,7 +118,7 @@ int playlist_AddItem( playlist_t *p_playlist, playlist_item_t *p_item,
{
vlc_value_t
val
;
vlc_bool_t
b_end
=
VLC_FALSE
;
playlist_view_t
*
p_view
;
playlist_view_t
*
p_view
=
NULL
;
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
...
...
@@ -231,7 +231,7 @@ int playlist_AddItem( playlist_t *p_playlist, playlist_item_t *p_item,
msg_Err
(
p_playlist
,
"Insert mode not implemented"
);
}
if
(
i_mode
&
PLAYLIST_GO
)
if
(
(
i_mode
&
PLAYLIST_GO
)
&&
p_view
)
{
p_playlist
->
request
.
b_request
=
VLC_TRUE
;
/* FIXME ... */
...
...
@@ -543,8 +543,6 @@ int playlist_Clear( playlist_t * p_playlist )
*/
int
playlist_Disable
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_item
)
{
vlc_value_t
val
;
if
(
!
p_item
)
return
VLC_EGENERIC
;
msg_Dbg
(
p_playlist
,
"disabling playlist item `%s'"
,
...
...
@@ -569,8 +567,6 @@ int playlist_Disable( playlist_t * p_playlist, playlist_item_t *p_item )
*/
int
playlist_Enable
(
playlist_t
*
p_playlist
,
playlist_item_t
*
p_item
)
{
vlc_value_t
val
;
if
(
!
p_item
)
return
VLC_EGENERIC
;
msg_Dbg
(
p_playlist
,
"enabling playlist item `%s'"
,
...
...
src/playlist/playlist.c
View file @
5b903151
...
...
@@ -831,7 +831,7 @@ static playlist_item_t * NextItem( playlist_t *p_playlist )
}
#ifdef PLAYLIST_PROFILE
msg_Dbg
(
p_playlist
,
"next item found in "
I64Fi
" us
\n
"
,
mdate
()
-
start
);
msg_Dbg
(
p_playlist
,
"next item found in "
I64Fi
" us
"
,
mdate
()
-
start
);
#endif
if
(
p_new
==
NULL
)
{
msg_Info
(
p_playlist
,
"Nothing to play"
);
}
...
...
src/playlist/view.c
View file @
5b903151
...
...
@@ -29,6 +29,8 @@
#include "vlc_playlist.h"
#undef PLAYLIST_DEBUG
/************************************************************************
* Local prototypes
************************************************************************/
...
...
@@ -68,7 +70,7 @@ playlist_view_t * playlist_ViewCreate( playlist_t *p_playlist, int i_id,
{
playlist_view_t
*
p_view
;
msg_Dbg
(
p_playlist
,
"
C
reating view %i"
,
i_id
);
msg_Dbg
(
p_playlist
,
"
c
reating view %i"
,
i_id
);
p_view
=
malloc
(
sizeof
(
playlist_view_t
)
);
...
...
@@ -130,7 +132,7 @@ void playlist_ViewDelete( playlist_t *p_playlist,playlist_view_t *p_view )
*/
void
playlist_ViewDump
(
playlist_t
*
p_playlist
,
playlist_view_t
*
p_view
)
{
msg_Dbg
(
p_playlist
,
"
D
umping view %i"
,
p_view
->
i_id
);
msg_Dbg
(
p_playlist
,
"
d
umping view %i"
,
p_view
->
i_id
);
playlist_NodeDump
(
p_playlist
,
p_view
->
p_root
,
1
);
}
...
...
@@ -539,17 +541,19 @@ playlist_item_t *playlist_FindNextFromParent( playlist_t *p_playlist,
{
playlist_item_t
*
p_search
,
*
p_next
;
#ifdef PLAYLIST_DEBUG
if
(
p_item
!=
NULL
)
{
msg_Dbg
(
p_playlist
,
"
F
inding next of %s within %s"
,
msg_Dbg
(
p_playlist
,
"
f
inding next of %s within %s"
,
p_item
->
input
.
psz_name
,
p_node
->
input
.
psz_name
);
}
else
{
msg_Dbg
(
p_playlist
,
"
F
inding something to play within %s"
,
msg_Dbg
(
p_playlist
,
"
f
inding something to play within %s"
,
p_node
->
input
.
psz_name
);
}
#endif
if
(
!
p_node
||
p_node
->
i_children
==
-
1
)
{
...
...
@@ -616,6 +620,7 @@ playlist_item_t *playlist_FindPrevFromParent( playlist_t *p_playlist,
{
playlist_item_t
*
p_search
,
*
p_next
;
#ifdef PLAYLIST_DEBUG
if
(
p_item
!=
NULL
)
{
msg_Dbg
(
p_playlist
,
"Finding prev of %s within %s"
,
...
...
@@ -624,8 +629,8 @@ playlist_item_t *playlist_FindPrevFromParent( playlist_t *p_playlist,
else
{
msg_Dbg
(
p_playlist
,
"Finding prev from %s"
,
p_node
->
input
.
psz_name
);
}
#endif
if
(
!
p_node
||
p_node
->
i_children
==
-
1
)
{
...
...
@@ -696,14 +701,18 @@ playlist_item_t *playlist_RecursiveFindNext( playlist_t *p_playlist,
{
i
=
-
1
;
}
#ifdef PLAYLIST_DEBUG
msg_Dbg
(
p_playlist
,
"Current item found, child %i of %s"
,
i
,
p_parent
->
input
.
psz_name
);
#endif
/* We found our item */
if
(
i
+
1
>=
p_parent
->
i_children
)
{
/* Too far... */
#ifdef PLAYLIST_DEBUG
msg_Dbg
(
p_playlist
,
"Going up the tree,at parent of %s"
,
p_parent
->
input
.
psz_name
);
#endif
if
(
p_parent
==
p_root
)
{
/* Hmm, seems it's the end for you, guy ! */
...
...
@@ -726,16 +735,20 @@ playlist_item_t *playlist_RecursiveFindNext( playlist_t *p_playlist,
if
(
p_parent
->
pp_children
[
i
+
1
]
->
i_children
==
-
1
)
{
/* Cool, we have found a real item to play */
#ifdef PLAYLIST_DEBUG
msg_Dbg
(
p_playlist
,
"Playing child %i of %s"
,
i
+
1
,
p_parent
->
input
.
psz_name
);
#endif
return
p_parent
->
pp_children
[
i
+
1
];
}
else
if
(
p_parent
->
pp_children
[
i
+
1
]
->
i_children
>
0
)
{
/* Select the first child of this node */
#ifdef PLAYLIST_DEBUG
msg_Dbg
(
p_playlist
,
"%s is a node with children, "
"playing the first"
,
p_parent
->
pp_children
[
i
+
1
]
->
input
.
psz_name
);
#endif
if
(
p_parent
->
pp_children
[
i
+
1
]
->
pp_children
[
0
]
->
i_children
>=
0
)
{
...
...
@@ -749,8 +762,10 @@ playlist_item_t *playlist_RecursiveFindNext( playlist_t *p_playlist,
else
{
/* This node has no child... We must continue */
#ifdef PLAYLIST_DEBUG
msg_Dbg
(
p_playlist
,
"%s is a node with no children"
,
p_parent
->
pp_children
[
i
+
1
]
->
input
.
psz_name
);
#endif
p_item
=
p_parent
->
pp_children
[
i
+
1
];
}
}
...
...
@@ -778,14 +793,18 @@ playlist_item_t *playlist_RecursiveFindPrev( playlist_t *p_playlist,
{
i
=
-
1
;
}
#ifdef PLAYLIST_DEBUG
msg_Dbg
(
p_playlist
,
"Current item found, child %i of %s"
,
i
,
p_parent
->
input
.
psz_name
);
#endif
/* We found our item */
if
(
i
<
1
)
{
/* Too far... */
#ifdef PLAYLIST_DEBUG
msg_Dbg
(
p_playlist
,
"Going up the tree,at parent of %s"
,
p_parent
->
input
.
psz_name
);
#endif
if
(
p_parent
==
p_root
)
{
/* Hmm, seems it's the end for you, guy ! */
...
...
@@ -802,16 +821,20 @@ playlist_item_t *playlist_RecursiveFindPrev( playlist_t *p_playlist,
if
(
p_parent
->
pp_children
[
i
-
1
]
->
i_children
==
-
1
)
{
/* Cool, we have found a real item to play */
#ifdef PLAYLIST_DEBUG
msg_Dbg
(
p_playlist
,
"Playing child %i of %s"
,
i
-
1
,
p_parent
->
input
.
psz_name
);
#endif
return
p_parent
->
pp_children
[
i
-
1
];
}
else
if
(
p_parent
->
pp_children
[
i
-
1
]
->
i_children
>
0
)
{
/* Select the last child of this node */
#ifdef PLAYLIST_DEBUG
msg_Dbg
(
p_playlist
,
"%s is a node with children,"
" playing the last"
,
p_parent
->
pp_children
[
i
-
1
]
->
input
.
psz_name
);
#endif
if
(
p_parent
->
pp_children
[
i
-
1
]
->
pp_children
[
p_parent
->
pp_children
[
i
-
1
]
->
i_children
-
1
]
->
i_children
>=
0
)
{
...
...
@@ -827,8 +850,10 @@ playlist_item_t *playlist_RecursiveFindPrev( playlist_t *p_playlist,
else
{
/* This node has no child... We must continue */
#ifdef PLAYLIST_DEBUG
msg_Dbg
(
p_playlist
,
"%s is a node with no children"
,
p_parent
->
pp_children
[
i
-
1
]
->
input
.
psz_name
);
#endif
p_item
=
p_parent
->
pp_children
[
i
-
1
];
}
}
...
...
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