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
c7b08753
Commit
c7b08753
authored
Dec 20, 2009
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup playlist status.
parent
57548ac9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
38 deletions
+18
-38
modules/misc/lua/libs/playlist.c
modules/misc/lua/libs/playlist.c
+15
-34
share/lua/intf/rc.lua
share/lua/intf/rc.lua
+3
-4
No files found.
modules/misc/lua/libs/playlist.c
View file @
c7b08753
...
...
@@ -378,45 +378,26 @@ static int vlclua_playlist_sort( lua_State *L )
return
vlclua_push_ret
(
L
,
i_ret
);
}
/* FIXME: split this in 3 different functions? */
static
int
vlclua_playlist_status
(
lua_State
*
L
)
{
playlist_t
*
p_playlist
=
vlclua_get_playlist_internal
(
L
);
/*
int i_count = 0;
lua_settop( L, 0 );*/
input_thread_t
*
p_input
=
playlist_CurrentInput
(
p_playlist
);
if
(
p_input
)
{
/*char *psz_uri =
input_item_GetURI( input_GetItem( p_playlist->p_input ) );
lua_pushstring( L, psz_uri );
free( psz_uri );
lua_pushnumber( L, config_GetInt( p_intf, "volume" ) );*/
PL_LOCK
;
switch
(
playlist_Status
(
p_playlist
)
)
{
case
PLAYLIST_STOPPED
:
lua_pushstring
(
L
,
"stopped"
);
break
;
case
PLAYLIST_RUNNING
:
lua_pushstring
(
L
,
"playing"
);
break
;
case
PLAYLIST_PAUSED
:
lua_pushstring
(
L
,
"paused"
);
break
;
default:
lua_pushstring
(
L
,
"unknown"
);
break
;
}
PL_UNLOCK
;
/*i_count += 3;*/
vlc_object_release
(
p_input
);
}
else
PL_LOCK
;
switch
(
playlist_Status
(
p_playlist
)
)
{
lua_pushstring
(
L
,
"stopped"
);
case
PLAYLIST_STOPPED
:
lua_pushstring
(
L
,
"stopped"
);
break
;
case
PLAYLIST_RUNNING
:
lua_pushstring
(
L
,
"playing"
);
break
;
case
PLAYLIST_PAUSED
:
lua_pushstring
(
L
,
"paused"
);
break
;
default:
lua_pushstring
(
L
,
"unknown"
);
break
;
}
PL_UNLOCK
;
vlclua_release_playlist_internal
(
p_playlist
);
return
1
;
}
...
...
share/lua/intf/rc.lua
View file @
c7b08753
...
...
@@ -350,10 +350,9 @@ function stats(name,client)
end
function
playlist_status
(
name
,
client
)
local
a
,
b
,
c
=
vlc
.
playlist
.
status
()
client
:
append
(
"( new input: "
..
tostring
(
a
)
..
" )"
)
client
:
append
(
"( audio volume: "
..
tostring
(
b
)
..
" )"
)
client
:
append
(
"( state "
..
tostring
(
c
)
..
" )"
)
client
:
append
(
"( new input: "
..
"FIXME"
..
" )"
)
client
:
append
(
"( audio volume: "
..
tostring
(
vlc
.
volume
.
get
())
..
" )"
)
client
:
append
(
"( state "
..
vlc
.
playlist
.
status
()
..
" )"
)
end
function
is_playing
(
name
,
client
)
...
...
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