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
7b8bb1f2
Commit
7b8bb1f2
authored
Feb 28, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/playlist/*: portability fixes, moved playlist_AddOption() to item-ext.c.
parent
3c5c523f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
48 deletions
+47
-48
src/playlist/info.c
src/playlist/info.c
+1
-37
src/playlist/item-ext.c
src/playlist/item-ext.c
+43
-9
src/playlist/item.c
src/playlist/item.c
+3
-2
No files found.
src/playlist/info.c
View file @
7b8bb1f2
...
...
@@ -2,7 +2,7 @@
* info.c : Playlist info management
*****************************************************************************
* Copyright (C) 1999-2004 VideoLAN
* $Id: info.c,v 1.
9 2004/02/08 18:17:22
gbazin Exp $
* $Id: info.c,v 1.
10 2004/02/28 17:10:23
gbazin Exp $
*
* Authors: Clment Stenac <zorglub@videolan.org>
*
...
...
@@ -325,39 +325,3 @@ int playlist_ItemAddInfo( playlist_item_t *p_item,
return
VLC_SUCCESS
;
}
/**
* Add a special info : option
*
* \param p_playlist the playlist
* \param i_item the position of the item on which we
* add the option ( -1 for current )
* \param psz_value the option to add
* \return the info category.
*/
int
playlist_AddOption
(
playlist_t
*
p_playlist
,
int
i_pos
,
const
char
*
psz_option
)
{
playlist_item_t
*
p_item
;
/* Check the existence of the playlist */
if
(
p_playlist
==
NULL
)
{
return
VLC_EGENERIC
;
}
p_item
=
playlist_ItemGetByPos
(
p_playlist
,
i_pos
);
if
(
!
p_item
)
{
return
VLC_ENOOBJ
;
}
vlc_mutex_lock
(
&
p_item
->
lock
);
INSERT_ELEM
(
p_item
->
ppsz_options
,
p_item
->
i_options
,
p_item
->
i_options
,
(
char
*
)
psz_option
);
vlc_mutex_unlock
(
&
p_item
->
lock
);
return
VLC_SUCCESS
;
}
src/playlist/item-ext.c
View file @
7b8bb1f2
...
...
@@ -2,7 +2,7 @@
* item-ext.c : Playlist item management functions
*****************************************************************************
* Copyright (C) 1999-2004 VideoLAN
* $Id: item-ext.c,v 1.1
3 2004/01/29 17:51:08 zorglub
Exp $
* $Id: item-ext.c,v 1.1
4 2004/02/28 17:10:23 gbazin
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Clment Stenac <zorglub@videolan.org>
...
...
@@ -446,8 +446,6 @@ int playlist_SetDuration( playlist_t *p_playlist, int i_pos, mtime_t i_duration
int
playlist_Delete
(
playlist_t
*
p_playlist
,
int
i_pos
)
{
vlc_value_t
val
;
int
i
,
j
;
int
i_delay
=
0
;
/* if i_pos is the current played item, playlist should stop playing it */
if
(
(
p_playlist
->
i_status
==
PLAYLIST_RUNNING
)
&&
...
...
@@ -461,9 +459,11 @@ int playlist_Delete( playlist_t * p_playlist, int i_pos )
{
playlist_item_t
*
p_item
=
p_playlist
->
pp_items
[
i_pos
];
msg_Dbg
(
p_playlist
,
"deleting playlist item
%s
"
,
msg_Dbg
(
p_playlist
,
"deleting playlist item
`%s'
"
,
p_item
->
psz_name
);
#if 0
int i,j;
vlc_mutex_lock( &p_item->lock );
if( p_item->psz_name )
...
...
@@ -577,7 +577,7 @@ int playlist_Disable( playlist_t * p_playlist, int i_pos )
if
(
i_pos
>=
0
&&
i_pos
<
p_playlist
->
i_size
)
{
msg_Dbg
(
p_playlist
,
"disabling playlist item
%s
"
,
msg_Dbg
(
p_playlist
,
"disabling playlist item
`%s'
"
,
p_playlist
->
pp_items
[
i_pos
]
->
psz_name
);
if
(
p_playlist
->
pp_items
[
i_pos
]
->
b_enabled
==
VLC_TRUE
)
...
...
@@ -607,7 +607,7 @@ int playlist_Enable( playlist_t * p_playlist, int i_pos )
if
(
i_pos
>=
0
&&
i_pos
<
p_playlist
->
i_size
)
{
msg_Dbg
(
p_playlist
,
"enabling playlist item
%s
"
,
msg_Dbg
(
p_playlist
,
"enabling playlist item
`%s'
"
,
p_playlist
->
pp_items
[
i_pos
]
->
psz_name
);
if
(
p_playlist
->
pp_items
[
i_pos
]
->
b_enabled
==
VLC_FALSE
)
...
...
@@ -642,7 +642,7 @@ int playlist_DisableGroup( playlist_t * p_playlist, int i_group)
{
if
(
p_playlist
->
pp_items
[
i
]
->
i_group
==
i_group
)
{
msg_Dbg
(
p_playlist
,
"disabling playlist item
%s
"
,
msg_Dbg
(
p_playlist
,
"disabling playlist item
`%s'
"
,
p_playlist
->
pp_items
[
i
]
->
psz_name
);
if
(
p_playlist
->
pp_items
[
i
]
->
b_enabled
==
VLC_TRUE
)
...
...
@@ -675,7 +675,7 @@ int playlist_EnableGroup( playlist_t * p_playlist, int i_group)
{
if
(
p_playlist
->
pp_items
[
i
]
->
i_group
==
i_group
)
{
msg_Dbg
(
p_playlist
,
"enabling playlist item
%s
"
,
msg_Dbg
(
p_playlist
,
"enabling playlist item
`%s'
"
,
p_playlist
->
pp_items
[
i
]
->
psz_name
);
if
(
p_playlist
->
pp_items
[
i
]
->
b_enabled
==
VLC_FALSE
)
...
...
@@ -715,7 +715,7 @@ int playlist_Move( playlist_t * p_playlist, int i_pos, int i_newpos)
{
playlist_item_t
*
temp
;
msg_Dbg
(
p_playlist
,
"moving playlist item
%s
(%i -> %i)"
,
msg_Dbg
(
p_playlist
,
"moving playlist item
`%s'
(%i -> %i)"
,
p_playlist
->
pp_items
[
i_pos
]
->
psz_name
,
i_pos
,
i_newpos
);
...
...
@@ -761,3 +761,37 @@ int playlist_Move( playlist_t * p_playlist, int i_pos, int i_newpos)
return
VLC_SUCCESS
;
}
/**
* Add a special info : option
*
* \param p_playlist the playlist
* \param i_item the position of the item on which we
* add the option ( -1 for current )
* \param psz_value the option to add
* \return the info category.
*/
int
playlist_AddOption
(
playlist_t
*
p_playlist
,
int
i_pos
,
const
char
*
psz_option
)
{
playlist_item_t
*
p_item
;
/* Check the existence of the playlist */
if
(
p_playlist
==
NULL
)
{
return
VLC_EGENERIC
;
}
p_item
=
playlist_ItemGetByPos
(
p_playlist
,
i_pos
);
if
(
!
p_item
)
{
return
VLC_ENOOBJ
;
}
vlc_mutex_lock
(
&
p_item
->
lock
);
INSERT_ELEM
(
p_item
->
ppsz_options
,
p_item
->
i_options
,
p_item
->
i_options
,
strdup
(
psz_option
)
);
vlc_mutex_unlock
(
&
p_item
->
lock
);
return
VLC_SUCCESS
;
}
src/playlist/item.c
View file @
7b8bb1f2
...
...
@@ -2,7 +2,7 @@
* item.c : Playlist item functions
*****************************************************************************
* Copyright (C) 1999-2004 VideoLAN
* $Id: item.c,v 1.1
4 2004/02/08 18:17:22
gbazin Exp $
* $Id: item.c,v 1.1
5 2004/02/28 17:10:23
gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
@@ -86,7 +86,8 @@ int playlist_AddItem( playlist_t *p_playlist, playlist_item_t * p_item,
}
msg_Dbg
(
p_playlist
,
"adding playlist item %s ( %s )"
,
p_item
->
psz_name
,
p_item
->
psz_uri
);
msg_Dbg
(
p_playlist
,
"adding playlist item `%s' ( %s )"
,
p_item
->
psz_name
,
p_item
->
psz_uri
);
p_item
->
i_id
=
++
p_playlist
->
i_last_id
;
...
...
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