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
d8c29705
Commit
d8c29705
authored
Jul 24, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ue var_Get(Time|Address) when applicable.
parent
5f65c5c9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
src/control/media_player.c
src/control/media_player.c
+10
-16
No files found.
src/control/media_player.c
View file @
d8c29705
...
@@ -584,17 +584,11 @@ void libvlc_media_player_play( libvlc_media_player_t *p_mi,
...
@@ -584,17 +584,11 @@ void libvlc_media_player_play( libvlc_media_player_t *p_mi,
var_Create
(
p_input_thread
,
"drawable-hwnd"
,
VLC_VAR_ADDRESS
);
var_Create
(
p_input_thread
,
"drawable-hwnd"
,
VLC_VAR_ADDRESS
);
if
(
p_mi
->
drawable
.
hwnd
!=
NULL
)
if
(
p_mi
->
drawable
.
hwnd
!=
NULL
)
{
var_SetAddress
(
p_input_thread
,
"drawable-hwnd"
,
p_mi
->
drawable
.
hwnd
);
vlc_value_t
val
=
{
.
p_address
=
p_mi
->
drawable
.
hwnd
};
var_Set
(
p_input_thread
,
"drawable-hwnd"
,
val
);
}
var_Create
(
p_input_thread
,
"drawable-nsobject"
,
VLC_VAR_ADDRESS
);
var_Create
(
p_input_thread
,
"drawable-nsobject"
,
VLC_VAR_ADDRESS
);
if
(
p_mi
->
drawable
.
nsobject
!=
NULL
)
if
(
p_mi
->
drawable
.
nsobject
!=
NULL
)
{
var_SetAddress
(
p_input_thread
,
"drawable-nsobject"
,
p_mi
->
drawable
.
nsobject
);
vlc_value_t
val
=
{
.
p_address
=
p_mi
->
drawable
.
nsobject
};
var_Set
(
p_input_thread
,
"drawable-nsobject"
,
val
);
}
var_AddCallback
(
p_input_thread
,
"can-seek"
,
input_seekable_changed
,
p_mi
);
var_AddCallback
(
p_input_thread
,
"can-seek"
,
input_seekable_changed
,
p_mi
);
var_AddCallback
(
p_input_thread
,
"can-pause"
,
input_pausable_changed
,
p_mi
);
var_AddCallback
(
p_input_thread
,
"can-pause"
,
input_pausable_changed
,
p_mi
);
...
@@ -798,16 +792,16 @@ libvlc_time_t libvlc_media_player_get_length(
...
@@ -798,16 +792,16 @@ libvlc_time_t libvlc_media_player_get_length(
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
;
libvlc_time_t
i_time
;
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
-
1
;
return
-
1
;
var_Get
(
p_input_thread
,
"length"
,
&
val
);
i_time
=
var_GetTime
(
p_input_thread
,
"length"
);
vlc_object_release
(
p_input_thread
);
vlc_object_release
(
p_input_thread
);
return
(
val
.
i_time
+
500LL
)
/
1000LL
;
return
(
i_time
+
500LL
)
/
1000LL
;
}
}
libvlc_time_t
libvlc_media_player_get_time
(
libvlc_time_t
libvlc_media_player_get_time
(
...
@@ -815,20 +809,20 @@ libvlc_time_t libvlc_media_player_get_time(
...
@@ -815,20 +809,20 @@ libvlc_time_t libvlc_media_player_get_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
val
;
libvlc_time_t
i_time
;
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
-
1
;
return
-
1
;
var_Get
(
p_input_thread
,
"time"
,
&
val
);
i_time
=
var_GetTime
(
p_input_thread
,
"time"
);
vlc_object_release
(
p_input_thread
);
vlc_object_release
(
p_input_thread
);
return
(
val
.
i_time
+
500LL
)
/
1000LL
;
return
(
i_time
+
500LL
)
/
1000LL
;
}
}
void
libvlc_media_player_set_time
(
void
libvlc_media_player_set_time
(
libvlc_media_player_t
*
p_mi
,
libvlc_media_player_t
*
p_mi
,
libvlc_time_t
time
,
libvlc_time_t
i_
time
,
libvlc_exception_t
*
p_e
)
libvlc_exception_t
*
p_e
)
{
{
input_thread_t
*
p_input_thread
;
input_thread_t
*
p_input_thread
;
...
@@ -837,7 +831,7 @@ void libvlc_media_player_set_time(
...
@@ -837,7 +831,7 @@ void libvlc_media_player_set_time(
if
(
!
p_input_thread
)
if
(
!
p_input_thread
)
return
;
return
;
var_SetTime
(
p_input_thread
,
"time"
,
time
*
1000LL
);
var_SetTime
(
p_input_thread
,
"time"
,
i_
time
*
1000LL
);
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