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
e8d9e5a2
Commit
e8d9e5a2
authored
Apr 01, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use var_Set(Integer|Time|Float) when needed.
parent
a6e200e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
23 deletions
+9
-23
src/control/media_player.c
src/control/media_player.c
+9
-23
No files found.
src/control/media_player.c
View file @
e8d9e5a2
...
@@ -859,14 +859,12 @@ void libvlc_media_player_set_time(
...
@@ -859,14 +859,12 @@ void libvlc_media_player_set_time(
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
{
input_thread_t
*
p_input_thread
;
input_thread_t
*
p_input_thread
;
vlc_value_t
value
;
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
if
(
!
p_input_thread
)
if
(
!
p_input_thread
)
return
;
return
;
value
.
i_time
=
time
*
1000LL
;
var_SetTime
(
p_input_thread
,
"time"
,
time
*
1000LL
);
var_Set
(
p_input_thread
,
"time"
,
value
);
vlc_object_release
(
p_input_thread
);
vlc_object_release
(
p_input_thread
);
}
}
...
@@ -876,14 +874,12 @@ void libvlc_media_player_set_position(
...
@@ -876,14 +874,12 @@ void libvlc_media_player_set_position(
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
{
input_thread_t
*
p_input_thread
;
input_thread_t
*
p_input_thread
;
vlc_value_t
val
;
val
.
f_float
=
position
;
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
if
(
!
p_input_thread
)
if
(
!
p_input_thread
)
return
;
return
;
var_Set
(
p_input_thread
,
"position"
,
val
);
var_Set
Float
(
p_input_thread
,
"position"
,
position
);
vlc_object_release
(
p_input_thread
);
vlc_object_release
(
p_input_thread
);
}
}
...
@@ -910,14 +906,12 @@ void libvlc_media_player_set_chapter(
...
@@ -910,14 +906,12 @@ void libvlc_media_player_set_chapter(
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
{
input_thread_t
*
p_input_thread
;
input_thread_t
*
p_input_thread
;
vlc_value_t
val
;
val
.
i_int
=
chapter
;
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
if
(
!
p_input_thread
)
if
(
!
p_input_thread
)
return
;
return
;
var_Set
(
p_input_thread
,
"chapter"
,
val
);
var_Set
Integer
(
p_input_thread
,
"chapter"
,
chapter
);
vlc_object_release
(
p_input_thread
);
vlc_object_release
(
p_input_thread
);
}
}
...
@@ -986,14 +980,12 @@ void libvlc_media_player_set_title(
...
@@ -986,14 +980,12 @@ void libvlc_media_player_set_title(
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
{
input_thread_t
*
p_input_thread
;
input_thread_t
*
p_input_thread
;
vlc_value_t
val
;
val
.
i_int
=
i_title
;
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
if
(
!
p_input_thread
)
if
(
!
p_input_thread
)
return
;
return
;
var_Set
(
p_input_thread
,
"title"
,
val
);
var_Set
Integer
(
p_input_thread
,
"title"
,
i_title
);
vlc_object_release
(
p_input_thread
);
vlc_object_release
(
p_input_thread
);
//send event
//send event
...
@@ -1048,10 +1040,8 @@ void libvlc_media_player_next_chapter(
...
@@ -1048,10 +1040,8 @@ void libvlc_media_player_next_chapter(
return
;
return
;
int
i_type
=
var_Type
(
p_input_thread
,
"next-chapter"
);
int
i_type
=
var_Type
(
p_input_thread
,
"next-chapter"
);
vlc_value_t
val
;
var_SetBool
(
p_input_thread
,
(
i_type
&
VLC_VAR_TYPE
)
!=
0
?
val
.
b_bool
=
true
;
"next-chapter"
:
"next-title"
,
true
);
var_Set
(
p_input_thread
,
(
i_type
&
VLC_VAR_TYPE
)
!=
0
?
"next-chapter"
:
"next-title"
,
val
);
vlc_object_release
(
p_input_thread
);
vlc_object_release
(
p_input_thread
);
}
}
...
@@ -1067,10 +1057,8 @@ void libvlc_media_player_previous_chapter(
...
@@ -1067,10 +1057,8 @@ void libvlc_media_player_previous_chapter(
return
;
return
;
int
i_type
=
var_Type
(
p_input_thread
,
"next-chapter"
);
int
i_type
=
var_Type
(
p_input_thread
,
"next-chapter"
);
vlc_value_t
val
;
var_SetBool
(
p_input_thread
,
(
i_type
&
VLC_VAR_TYPE
)
!=
0
?
val
.
b_bool
=
true
;
"prev-chapter"
:
"prev-title"
,
true
);
var_Set
(
p_input_thread
,
(
i_type
&
VLC_VAR_TYPE
)
!=
0
?
"prev-chapter"
:
"prev-title"
,
val
);
vlc_object_release
(
p_input_thread
);
vlc_object_release
(
p_input_thread
);
}
}
...
@@ -1114,7 +1102,6 @@ void libvlc_media_player_set_rate(
...
@@ -1114,7 +1102,6 @@ void libvlc_media_player_set_rate(
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
{
input_thread_t
*
p_input_thread
;
input_thread_t
*
p_input_thread
;
vlc_value_t
val
;
bool
b_can_rewind
;
bool
b_can_rewind
;
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
...
@@ -1129,8 +1116,7 @@ void libvlc_media_player_set_rate(
...
@@ -1129,8 +1116,7 @@ void libvlc_media_player_set_rate(
return
;
return
;
}
}
val
.
i_int
=
1000
.
0
f
/
rate
;
var_SetInteger
(
p_input_thread
,
"rate"
,
1000
.
0
f
/
rate
);
var_Set
(
p_input_thread
,
"rate"
,
val
);
vlc_object_release
(
p_input_thread
);
vlc_object_release
(
p_input_thread
);
}
}
...
...
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