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
700e6aac
Commit
700e6aac
authored
Dec 29, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
control/media_instance.c: Publish is_seekable().
parent
4ed66be9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
3 deletions
+31
-3
include/vlc/libvlc.h
include/vlc/libvlc.h
+4
-0
src/control/media_instance.c
src/control/media_instance.c
+27
-3
No files found.
include/vlc/libvlc.h
View file @
700e6aac
...
...
@@ -382,6 +382,10 @@ VLC_PUBLIC_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
VLC_PUBLIC_API
libvlc_media_instance_t
*
libvlc_playlist_get_media_instance
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
VLC_PUBLIC_API
vlc_bool_t
libvlc_media_instance_is_seekable
(
libvlc_media_instance_t
*
p_mi
,
libvlc_exception_t
*
p_e
);
/** @}*/
/*****************************************************************************
...
...
src/control/media_instance.c
View file @
700e6aac
...
...
@@ -132,9 +132,6 @@ input_state_changed( vlc_object_t * p_this, char const * psz_cmd,
libvlc_media_instance_t
*
p_mi
=
p_userdata
;
libvlc_event_t
event
;
if
(
newval
.
i_int
==
oldval
.
i_int
)
return
VLC_SUCCESS
;
/* No change since last time, don't propagate */
switch
(
newval
.
i_int
)
{
case
END_S
:
...
...
@@ -523,6 +520,7 @@ void libvlc_media_instance_play( libvlc_media_instance_t *p_mi,
var_Set
(
p_input_thread
,
"drawable"
,
val
);
}
var_AddCallback
(
p_input_thread
,
"state"
,
input_state_changed
,
p_mi
);
var_AddCallback
(
p_input_thread
,
"seekable"
,
input_state_changed
,
p_mi
);
var_AddCallback
(
p_input_thread
,
"intf-change"
,
input_position_changed
,
p_mi
);
var_AddCallback
(
p_input_thread
,
"intf-change"
,
input_time_changed
,
p_mi
);
...
...
@@ -796,10 +794,36 @@ libvlc_state_t libvlc_media_instance_get_state(
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
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_Stopped
;
}
var_Get
(
p_input_thread
,
"state"
,
&
val
);
vlc_object_release
(
p_input_thread
);
return
vlc_to_libvlc_state
(
val
.
i_int
);
}
vlc_bool_t
libvlc_media_instance_is_seekable
(
libvlc_media_instance_t
*
p_mi
,
libvlc_exception_t
*
p_e
)
{
input_thread_t
*
p_input_thread
;
vlc_value_t
val
;
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
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
VLC_FALSE
;
}
var_Get
(
p_input_thread
,
"seekable"
,
&
val
);
vlc_object_release
(
p_input_thread
);
return
val
.
b_bool
;
}
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