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
5da72b77
Commit
5da72b77
authored
Jan 07, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc.h: Define and implement libvlc_media_instance_is_pausable().
parent
e41cdcc4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletion
+31
-1
include/vlc/libvlc.h
include/vlc/libvlc.h
+4
-0
src/control/media_instance.c
src/control/media_instance.c
+27
-1
No files found.
include/vlc/libvlc.h
View file @
5da72b77
...
...
@@ -386,6 +386,10 @@ VLC_PUBLIC_API vlc_bool_t libvlc_media_instance_is_seekable(
libvlc_media_instance_t
*
p_mi
,
libvlc_exception_t
*
p_e
);
VLC_PUBLIC_API
vlc_bool_t
libvlc_media_instance_can_pause
(
libvlc_media_instance_t
*
p_mi
,
libvlc_exception_t
*
p_e
);
/** @}*/
/*****************************************************************************
...
...
src/control/media_instance.c
View file @
5da72b77
...
...
@@ -131,8 +131,12 @@ input_state_changed( vlc_object_t * p_this, char const * psz_cmd,
{
libvlc_media_instance_t
*
p_mi
=
p_userdata
;
libvlc_event_t
event
;
libvlc_event_type_t
type
=
newval
.
i_int
;
switch
(
newval
.
i_int
)
if
(
strcmp
(
psz_cmd
,
"state"
)
)
type
=
var_GetBool
(
p_this
,
"state"
);
switch
(
type
)
{
case
END_S
:
libvlc_media_descriptor_set_state
(
p_mi
->
p_md
,
libvlc_NothingSpecial
,
NULL
);
...
...
@@ -521,6 +525,7 @@ void libvlc_media_instance_play( libvlc_media_instance_t *p_mi,
}
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
,
"pausable"
,
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
);
...
...
@@ -827,3 +832,24 @@ vlc_bool_t libvlc_media_instance_is_seekable(
return
val
.
b_bool
;
}
vlc_bool_t
libvlc_media_instance_can_pause
(
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
,
"can-pause"
,
&
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