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
3ef6a48d
Commit
3ef6a48d
authored
Jul 24, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: clean up libvlc_Stopped and vlc_to_libvlc_state usage.
parent
ea85615c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
21 deletions
+11
-21
src/control/media_player.c
src/control/media_player.c
+11
-21
No files found.
src/control/media_player.c
View file @
3ef6a48d
...
...
@@ -57,23 +57,7 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd,
static
int
SnapshotTakenCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_cmd
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
);
static
const
libvlc_state_t
vlc_to_libvlc_state_array
[]
=
{
[
INIT_S
]
=
libvlc_NothingSpecial
,
[
OPENING_S
]
=
libvlc_Opening
,
[
PLAYING_S
]
=
libvlc_Playing
,
[
PAUSE_S
]
=
libvlc_Paused
,
[
END_S
]
=
libvlc_Ended
,
[
ERROR_S
]
=
libvlc_Error
,
};
static
inline
libvlc_state_t
vlc_to_libvlc_state
(
int
vlc_state
)
{
if
(
vlc_state
<
0
||
vlc_state
>
6
)
return
libvlc_Ended
;
return
vlc_to_libvlc_state_array
[
vlc_state
];
}
static
void
libvlc_media_player_destroy
(
libvlc_media_player_t
*
p_mi
);
/*
* Release the associated input thread.
...
...
@@ -226,6 +210,14 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd,
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_state
,
NULL
);
libvlc_event_send
(
p_mi
->
p_event_manager
,
&
event
);
}
else
if
(
newval
.
i_int
==
INPUT_EVENT_ABORT
)
{
libvlc_state_t
libvlc_state
=
libvlc_Stopped
;
event
.
type
=
libvlc_MediaPlayerStopped
;
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_state
,
NULL
);
libvlc_event_send
(
p_mi
->
p_event_manager
,
&
event
);
}
else
if
(
newval
.
i_int
==
INPUT_EVENT_POSITION
)
{
if
(
var_GetInteger
(
p_input
,
"state"
)
!=
PLAYING_S
)
...
...
@@ -650,7 +642,7 @@ void libvlc_media_player_stop( libvlc_media_player_t *p_mi,
{
/* Send a stop notification event only if we are in playing,
* buffering or paused states */
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_
End
ed
,
p_e
);
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_
Stopp
ed
,
p_e
);
/* Construct and send the event */
libvlc_event_t
event
;
...
...
@@ -1125,9 +1117,7 @@ libvlc_state_t libvlc_media_player_get_state(
return
state
;
}
var_Get
(
p_input_thread
,
"state"
,
&
val
);
state
=
vlc_to_libvlc_state
(
val
.
i_int
);
state
=
libvlc_media_get_state
(
p_mi
->
p_md
,
NULL
);
if
(
state
==
libvlc_Playing
)
{
float
caching
;
...
...
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