Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
f20532c0
Commit
f20532c0
authored
Aug 16, 2002
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./src/playlist/playlist.c: added -Z (--random) for endless random playing.
parent
ba97736a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
19 deletions
+36
-19
src/input/input.c
src/input/input.c
+3
-3
src/libvlc.h
src/libvlc.h
+16
-10
src/playlist/playlist.c
src/playlist/playlist.c
+17
-6
No files found.
src/input/input.c
View file @
f20532c0
...
...
@@ -4,7 +4,7 @@
* decoders.
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: input.c,v 1.21
0 2002/08/12 22:12:51 massiot
Exp $
* $Id: input.c,v 1.21
1 2002/08/16 12:31:04 sam
Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
...
...
@@ -153,8 +153,8 @@ input_thread_t *__input_CreateThread( vlc_object_t *p_parent,
msg_Info
(
p_input
,
"playlist item `%s'"
,
p_input
->
psz_source
);
p_info
=
input_InfoCategory
(
p_input
,
"General"
);
input_AddInfo
(
p_info
,
"
P
laylist item"
,
p_input
->
psz_source
);
p_info
=
input_InfoCategory
(
p_input
,
"General"
);
input_AddInfo
(
p_info
,
"
p
laylist item"
,
p_input
->
psz_source
);
vlc_object_attach
(
p_input
,
p_parent
);
/* Create thread and wait for its readiness. */
...
...
src/libvlc.h
View file @
f20532c0
...
...
@@ -2,7 +2,7 @@
* libvlc.h: main libvlc header
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.h,v 1.1
3 2002/08/12 22:12:51 massiot
Exp $
* $Id: libvlc.h,v 1.1
4 2002/08/16 12:31:04 sam
Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -263,17 +263,22 @@
"If your processor supports the AltiVec instructions set, vlc can take "\
"advantage of them.")
#define PL_LAUNCH_TEXT N_("launch playlist on startup")
#define PL_LAUNCH_LONGTEXT N_( \
#define RANDOM_TEXT N_("play files randomly forever")
#define RANDOM_LONGTEXT N_( \
"When selected, vlc will randomly play files in the playlist until " \
"interrupted.")
#define LAUNCH_TEXT N_("launch playlist on startup")
#define LAUNCH_LONGTEXT N_( \
"If you want vlc to start playing on startup, then enable this option.")
#define
PL_
ENQUEUE_TEXT N_("enqueue items in playlist")
#define
PL_
ENQUEUE_LONGTEXT N_( \
#define ENQUEUE_TEXT N_("enqueue items in playlist")
#define ENQUEUE_LONGTEXT N_( \
"If you want vlc to add items to the playlist as you open them, then " \
"enable this option.")
#define
PL_
LOOP_TEXT N_("loop playlist on end")
#define
PL_
LOOP_LONGTEXT N_( \
#define LOOP_TEXT N_("loop playlist on end")
#define LOOP_LONGTEXT N_( \
"If you want vlc to keep playing the playlist indefinitely then enable " \
"this option.")
...
...
@@ -421,9 +426,10 @@ vlc_module_begin();
/* Playlist options */
add_category_hint
(
N_
(
"Playlist"
),
NULL
);
add_bool
(
"playlist"
,
0
,
NULL
,
PL_LAUNCH_TEXT
,
PL_LAUNCH_LONGTEXT
);
add_bool
(
"enqueue"
,
0
,
NULL
,
PL_ENQUEUE_TEXT
,
PL_ENQUEUE_LONGTEXT
);
add_bool
(
"loop"
,
0
,
NULL
,
PL_LOOP_TEXT
,
PL_LOOP_LONGTEXT
);
add_bool_with_short
(
"random"
,
'Z'
,
0
,
NULL
,
RANDOM_TEXT
,
RANDOM_LONGTEXT
);
add_bool
(
"playlist"
,
0
,
NULL
,
LAUNCH_TEXT
,
LAUNCH_LONGTEXT
);
add_bool
(
"enqueue"
,
0
,
NULL
,
ENQUEUE_TEXT
,
ENQUEUE_LONGTEXT
);
add_bool
(
"loop"
,
0
,
NULL
,
LOOP_TEXT
,
LOOP_LONGTEXT
);
/* Misc options */
add_category_hint
(
N_
(
"Miscellaneous"
),
NULL
);
...
...
src/playlist/playlist.c
View file @
f20532c0
...
...
@@ -2,7 +2,7 @@
* playlist.c : Playlist management functions
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: playlist.c,v 1.1
0 2002/08/12 09:34:15
sam Exp $
* $Id: playlist.c,v 1.1
1 2002/08/16 12:31:04
sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
...
...
@@ -105,7 +105,7 @@ int playlist_Add( playlist_t *p_playlist, const char * psz_target,
{
playlist_item_t
*
p_item
;
msg_
Warn
(
p_playlist
,
"adding playlist item %s "
,
psz_target
);
msg_
Dbg
(
p_playlist
,
"adding playlist item %s "
,
psz_target
);
/* Create the new playlist item */
p_item
=
malloc
(
sizeof
(
playlist_item_t
)
);
...
...
@@ -213,8 +213,8 @@ int playlist_Delete( playlist_t * p_playlist, int i_pos )
if
(
i_pos
>=
0
&&
i_pos
<
p_playlist
->
i_size
)
{
msg_
Warn
(
p_playlist
,
"deleting playlist item %s "
,
p_playlist
->
pp_items
[
i_pos
]
->
psz_name
);
msg_
Dbg
(
p_playlist
,
"deleting playlist item %s "
,
p_playlist
->
pp_items
[
i_pos
]
->
psz_name
);
free
(
p_playlist
->
pp_items
[
i_pos
]
->
psz_name
);
free
(
p_playlist
->
pp_items
[
i_pos
]
);
...
...
@@ -435,7 +435,17 @@ static void SkipItem( playlist_t *p_playlist, int i_arg )
}
/* Increment */
p_playlist
->
i_index
+=
i_arg
;
if
(
config_GetInt
(
p_playlist
,
"random"
)
)
{
/* Simple random stuff */
srand
(
mdate
()
);
p_playlist
->
i_index
+=
1
+
(
int
)
(
1
.
0
*
p_playlist
->
i_size
*
rand
()
/
(
RAND_MAX
+
1
.
0
)
);
}
else
{
p_playlist
->
i_index
+=
i_arg
;
}
/* Boundary check */
if
(
p_playlist
->
i_index
>=
p_playlist
->
i_size
)
...
...
@@ -443,7 +453,8 @@ static void SkipItem( playlist_t *p_playlist, int i_arg )
if
(
p_playlist
->
i_status
==
PLAYLIST_STOPPED
||
config_GetInt
(
p_playlist
,
"loop"
)
)
{
p_playlist
->
i_index
=
0
;
p_playlist
->
i_index
-=
p_playlist
->
i_size
*
(
p_playlist
->
i_index
/
p_playlist
->
i_size
);
}
else
{
...
...
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