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
f207e101
Commit
f207e101
authored
Mar 09, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc api: detect when core is buffering.
parent
4bdcefc6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
src/control/media_player.c
src/control/media_player.c
+16
-7
No files found.
src/control/media_player.c
View file @
f207e101
...
...
@@ -215,7 +215,7 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd,
return
VLC_SUCCESS
;
}
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_state
,
NULL
);
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_TIMES
)
...
...
@@ -695,7 +695,7 @@ void libvlc_media_player_stop( libvlc_media_player_t *p_mi,
if
(
state
==
libvlc_Playing
||
state
==
libvlc_Paused
)
{
/* Send a stop notification event only
o
f we are in playing or
/* Send a stop notification event only
i
f we are in playing or
* paused states */
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Ended
,
p_e
);
...
...
@@ -1146,21 +1146,30 @@ libvlc_state_t libvlc_media_player_get_state(
libvlc_exception_t
*
p_e
)
{
input_thread_t
*
p_input_thread
;
libvlc_state_t
state
=
libvlc_Ended
;
vlc_value_t
val
;
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
if
(
!
p_input_thread
)
if
(
!
p_input_thread
)
{
/* We do return the right value, no need to throw an exception */
if
(
libvlc_exception_raised
(
p_e
)
)
libvlc_exception_clear
(
p_e
);
return
libvlc_Ended
;
return
state
;
}
var_Get
(
p_input_thread
,
"state"
,
&
val
);
vlc_object_release
(
p_input_thread
);
state
=
vlc_to_libvlc_state
(
val
.
i_int
);
return
vlc_to_libvlc_state
(
val
.
i_int
);
if
(
state
==
PLAYING_S
)
{
float
caching
;
caching
=
var_GetFloat
(
p_input_thread
,
"cache"
);
if
(
caching
>
0
.
0
&&
caching
<
100
.
0
)
state
=
libvlc_Buffering
;
}
vlc_object_release
(
p_input_thread
);
return
state
;
}
int
libvlc_media_player_is_seekable
(
libvlc_media_player_t
*
p_mi
,
...
...
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