Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f85de941
Commit
f85de941
authored
Jul 13, 2007
by
Olivier Aubert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mediacontrol: prefix unit conversion functions with private_
parent
7151b1d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
22 deletions
+20
-22
src/control/mediacontrol_audio_video.c
src/control/mediacontrol_audio_video.c
+3
-3
src/control/mediacontrol_core.c
src/control/mediacontrol_core.c
+5
-5
src/control/mediacontrol_internal.h
src/control/mediacontrol_internal.h
+7
-9
src/control/mediacontrol_util.c
src/control/mediacontrol_util.c
+5
-5
No files found.
src/control/mediacontrol_audio_video.c
View file @
f85de941
...
...
@@ -193,7 +193,7 @@ mediacontrol_display_text( mediacontrol_Instance *self,
mtime_t
i_duration
=
0
;
mtime_t
i_now
=
mdate
();
i_duration
=
1000
*
mediacontrol_unit_convert
(
i_duration
=
1000
*
private_
mediacontrol_unit_convert
(
self
->
p_playlist
->
p_input
,
end
->
key
,
mediacontrol_MediaTime
,
...
...
@@ -218,11 +218,11 @@ mediacontrol_display_text( mediacontrol_Instance *self,
/* i_now = input_ClockGetTS( p_input, NULL, 0 ); */
i_now
=
mdate
();
i_debut
=
mediacontrol_position2microsecond
(
p_input
,
i_debut
=
private_
mediacontrol_position2microsecond
(
p_input
,
(
mediacontrol_Position
*
)
begin
);
i_debut
+=
i_now
;
i_fin
=
mediacontrol_position2microsecond
(
p_input
,
i_fin
=
private_
mediacontrol_position2microsecond
(
p_input
,
(
mediacontrol_Position
*
)
end
);
i_fin
+=
i_now
;
...
...
src/control/mediacontrol_core.c
View file @
f85de941
...
...
@@ -159,7 +159,7 @@ mediacontrol_get_media_position( mediacontrol_Instance *self,
RAISE_NULL
(
mediacontrol_InternalException
,
"No input"
);
}
retval
->
value
=
mediacontrol_unit_convert
(
self
->
p_playlist
->
p_input
,
retval
->
value
=
private_
mediacontrol_unit_convert
(
self
->
p_playlist
->
p_input
,
mediacontrol_MediaTime
,
a_key
,
pos
);
...
...
@@ -184,7 +184,7 @@ mediacontrol_set_media_position( mediacontrol_Instance *self,
p_mi
=
libvlc_playlist_get_media_instance
(
self
->
p_instance
,
&
ex
);
HANDLE_LIBVLC_EXCEPTION_VOID
(
&
ex
);
i_pos
=
mediacontrol_position2microsecond
(
self
->
p_playlist
->
p_input
,
a_position
);
i_pos
=
private_
mediacontrol_position2microsecond
(
self
->
p_playlist
->
p_input
,
a_position
);
libvlc_media_instance_set_time
(
p_mi
,
i_pos
/
1000
,
&
ex
);
libvlc_media_instance_release
(
p_mi
);
HANDLE_LIBVLC_EXCEPTION_VOID
(
&
ex
);
...
...
@@ -223,7 +223,7 @@ mediacontrol_start( mediacontrol_Instance *self,
psz_from
=
(
char
*
)
malloc
(
20
*
sizeof
(
char
)
);
if
(
psz_from
&&
p_playlist
->
status
.
p_item
)
{
i_from
=
mediacontrol_position2microsecond
(
p_playlist
->
p_input
,
a_position
)
/
1000000
;
i_from
=
private_
mediacontrol_position2microsecond
(
p_playlist
->
p_input
,
a_position
)
/
1000000
;
/* Set start time */
snprintf
(
psz_from
,
20
,
"start-time=%i"
,
i_from
);
...
...
@@ -427,10 +427,10 @@ mediacontrol_get_stream_information( mediacontrol_Instance *self,
var_Get
(
p_input
,
"length"
,
&
val
);
retval
->
length
=
val
.
i_time
/
1000
;
retval
->
position
=
mediacontrol_unit_convert
(
p_input
,
retval
->
position
=
private_
mediacontrol_unit_convert
(
p_input
,
mediacontrol_MediaTime
,
a_key
,
retval
->
position
);
retval
->
length
=
mediacontrol_unit_convert
(
p_input
,
retval
->
length
=
private_
mediacontrol_unit_convert
(
p_input
,
mediacontrol_MediaTime
,
a_key
,
retval
->
length
);
}
...
...
src/control/mediacontrol_internal.h
View file @
f85de941
...
...
@@ -38,13 +38,12 @@ struct mediacontrol_Instance {
playlist_t
*
p_playlist
;
};
vlc_int64_t
mediacontrol_unit_convert
(
input_thread_t
*
p_input
,
mediacontrol_PositionKey
from
,
mediacontrol_PositionKey
to
,
vlc_int64_t
value
);
vlc_int64_t
mediacontrol_position2microsecond
(
input_thread_t
*
p_input
,
const
mediacontrol_Position
*
pos
);
vlc_int64_t
private_mediacontrol_unit_convert
(
input_thread_t
*
p_input
,
mediacontrol_PositionKey
from
,
mediacontrol_PositionKey
to
,
vlc_int64_t
value
);
vlc_int64_t
private_mediacontrol_position2microsecond
(
input_thread_t
*
p_input
,
const
mediacontrol_Position
*
pos
);
/**
* Allocate a RGBPicture structure.
...
...
@@ -52,8 +51,7 @@ vlc_int64_t mediacontrol_position2microsecond(
*/
mediacontrol_RGBPicture
*
private_mediacontrol_RGBPicture__alloc
(
int
datasize
);
mediacontrol_RGBPicture
*
private_mediacontrol_createRGBPicture
(
int
,
int
,
long
,
vlc_int64_t
l_date
,
char
*
,
int
);
mediacontrol_RGBPicture
*
private_mediacontrol_createRGBPicture
(
int
,
int
,
long
,
vlc_int64_t
l_date
,
char
*
,
int
);
mediacontrol_PlaylistSeq
*
private_mediacontrol_PlaylistSeq__alloc
(
int
size
);
...
...
src/control/mediacontrol_util.c
View file @
f85de941
...
...
@@ -52,7 +52,7 @@
/* FIXME: Need to stop accessing private input structures !! */
#include "input/input_internal.h"
vlc_int64_t
mediacontrol_unit_convert
(
input_thread_t
*
p_input
,
vlc_int64_t
private_
mediacontrol_unit_convert
(
input_thread_t
*
p_input
,
mediacontrol_PositionKey
from
,
mediacontrol_PositionKey
to
,
vlc_int64_t
value
)
...
...
@@ -142,12 +142,12 @@ vlc_int64_t mediacontrol_unit_convert( input_thread_t *p_input,
/* Converts a mediacontrol_Position into a time in microseconds in
movie clock time */
vlc_int64_t
mediacontrol_position2microsecond
(
input_thread_t
*
p_input
,
const
mediacontrol_Position
*
pos
)
private_
mediacontrol_position2microsecond
(
input_thread_t
*
p_input
,
const
mediacontrol_Position
*
pos
)
{
switch
(
pos
->
origin
)
{
case
mediacontrol_AbsolutePosition
:
return
(
1000
*
mediacontrol_unit_convert
(
p_input
,
return
(
1000
*
private_
mediacontrol_unit_convert
(
p_input
,
pos
->
key
,
/* from */
mediacontrol_MediaTime
,
/* to */
pos
->
value
)
);
...
...
@@ -163,7 +163,7 @@ mediacontrol_position2microsecond( input_thread_t* p_input, const mediacontrol_P
var_Get
(
p_input
,
"time"
,
&
val
);
}
l_pos
=
1000
*
mediacontrol_unit_convert
(
p_input
,
l_pos
=
1000
*
private_
mediacontrol_unit_convert
(
p_input
,
pos
->
key
,
mediacontrol_MediaTime
,
pos
->
value
);
...
...
@@ -183,7 +183,7 @@ mediacontrol_position2microsecond( input_thread_t* p_input, const mediacontrol_P
if
(
val
.
i_time
>
0
)
{
l_pos
=
(
1000
*
mediacontrol_unit_convert
(
p_input
,
l_pos
=
(
1000
*
private_
mediacontrol_unit_convert
(
p_input
,
pos
->
key
,
mediacontrol_MediaTime
,
pos
->
value
)
);
...
...
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