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
f8cece22
Commit
f8cece22
authored
Sep 04, 2006
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added input state & input rate in control APIs
parent
ad446ef0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
4 deletions
+52
-4
include/vlc/libvlc.h
include/vlc/libvlc.h
+3
-0
src/control/input.c
src/control/input.c
+49
-4
No files found.
include/vlc/libvlc.h
View file @
f8cece22
...
...
@@ -270,6 +270,9 @@ void libvlc_input_set_time ( libvlc_input_t *, vlc_int64_t, libvlc_
float
libvlc_input_get_position
(
libvlc_input_t
*
,
libvlc_exception_t
*
);
void
libvlc_input_set_position
(
libvlc_input_t
*
,
float
,
libvlc_exception_t
*
);
vlc_bool_t
libvlc_input_will_play
(
libvlc_input_t
*
,
libvlc_exception_t
*
);
float
libvlc_input_get_rate
(
libvlc_input_t
*
,
libvlc_exception_t
*
);
void
libvlc_input_set_rate
(
libvlc_input_t
*
,
float
,
libvlc_exception_t
*
);
int
libvlc_input_get_state
(
libvlc_input_t
*
,
libvlc_exception_t
*
);
/** @} */
...
...
src/control/input.c
View file @
f8cece22
...
...
@@ -63,12 +63,12 @@ vlc_int64_t libvlc_input_get_length( libvlc_input_t *p_input,
vlc_value_t
val
;
p_input_thread
=
libvlc_get_input_thread
(
p_input
,
p_e
);
if
(
libvlc_exception_raised
(
p_e
)
)
return
-
1
.
0
;
if
(
libvlc_exception_raised
(
p_e
)
)
return
-
1
;
var_Get
(
p_input_thread
,
"length"
,
&
val
);
vlc_object_release
(
p_input_thread
);
return
val
.
i_time
/
1000
;
return
val
.
i_time
;
}
vlc_int64_t
libvlc_input_get_time
(
libvlc_input_t
*
p_input
,
...
...
@@ -78,11 +78,11 @@ vlc_int64_t libvlc_input_get_time( libvlc_input_t *p_input,
vlc_value_t
val
;
p_input_thread
=
libvlc_get_input_thread
(
p_input
,
p_e
);
if
(
libvlc_exception_raised
(
p_e
)
)
return
-
1
.
0
;
if
(
libvlc_exception_raised
(
p_e
)
)
return
-
1
;
var_Get
(
p_input_thread
,
"time"
,
&
val
);
vlc_object_release
(
p_input_thread
);
return
val
.
i_time
/
1000
;
return
val
.
i_time
;
}
void
libvlc_input_set_time
(
libvlc_input_t
*
p_input
,
vlc_int64_t
time
,
...
...
@@ -165,3 +165,48 @@ vlc_bool_t libvlc_input_will_play( libvlc_input_t *p_input,
vlc_object_release
(
p_input_thread
);
return
VLC_FALSE
;
}
void
libvlc_input_set_rate
(
libvlc_input_t
*
p_input
,
float
rate
,
libvlc_exception_t
*
p_e
)
{
input_thread_t
*
p_input_thread
;
vlc_value_t
val
;
val
.
i_int
=
rate
*
1000
.
0
f
;
p_input_thread
=
libvlc_get_input_thread
(
p_input
,
p_e
);
if
(
libvlc_exception_raised
(
p_e
)
)
return
;
var_Set
(
p_input_thread
,
"rate"
,
val
);
vlc_object_release
(
p_input_thread
);
}
float
libvlc_input_get_rate
(
libvlc_input_t
*
p_input
,
libvlc_exception_t
*
p_e
)
{
input_thread_t
*
p_input_thread
;
vlc_value_t
val
;
p_input_thread
=
libvlc_get_input_thread
(
p_input
,
p_e
);
if
(
libvlc_exception_raised
(
p_e
)
)
return
-
1
.
0
;
var_Get
(
p_input_thread
,
"rate"
,
&
val
);
vlc_object_release
(
p_input_thread
);
return
(
float
)
val
.
i_int
/
1000
.
0
f
;
}
int
libvlc_input_get_state
(
libvlc_input_t
*
p_input
,
libvlc_exception_t
*
p_e
)
{
input_thread_t
*
p_input_thread
;
vlc_value_t
val
;
p_input_thread
=
libvlc_get_input_thread
(
p_input
,
p_e
);
if
(
libvlc_exception_raised
(
p_e
)
)
return
0
;
var_Get
(
p_input_thread
,
"state"
,
&
val
);
vlc_object_release
(
p_input_thread
);
return
val
.
i_int
;
}
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