Commit f85de941 authored by Olivier Aubert's avatar Olivier Aubert

mediacontrol: prefix unit conversion functions with private_

parent 7151b1d6
...@@ -193,7 +193,7 @@ mediacontrol_display_text( mediacontrol_Instance *self, ...@@ -193,7 +193,7 @@ mediacontrol_display_text( mediacontrol_Instance *self,
mtime_t i_duration = 0; mtime_t i_duration = 0;
mtime_t i_now = mdate(); mtime_t i_now = mdate();
i_duration = 1000 * mediacontrol_unit_convert( i_duration = 1000 * private_mediacontrol_unit_convert(
self->p_playlist->p_input, self->p_playlist->p_input,
end->key, end->key,
mediacontrol_MediaTime, mediacontrol_MediaTime,
...@@ -218,11 +218,11 @@ mediacontrol_display_text( mediacontrol_Instance *self, ...@@ -218,11 +218,11 @@ mediacontrol_display_text( mediacontrol_Instance *self,
/* i_now = input_ClockGetTS( p_input, NULL, 0 ); */ /* i_now = input_ClockGetTS( p_input, NULL, 0 ); */
i_now = mdate(); i_now = mdate();
i_debut = mediacontrol_position2microsecond( p_input, i_debut = private_mediacontrol_position2microsecond( p_input,
( mediacontrol_Position* ) begin ); ( mediacontrol_Position* ) begin );
i_debut += i_now; i_debut += i_now;
i_fin = mediacontrol_position2microsecond( p_input, i_fin = private_mediacontrol_position2microsecond( p_input,
( mediacontrol_Position * ) end ); ( mediacontrol_Position * ) end );
i_fin += i_now; i_fin += i_now;
......
...@@ -159,7 +159,7 @@ mediacontrol_get_media_position( mediacontrol_Instance *self, ...@@ -159,7 +159,7 @@ mediacontrol_get_media_position( mediacontrol_Instance *self,
RAISE_NULL( mediacontrol_InternalException, RAISE_NULL( mediacontrol_InternalException,
"No input" ); "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, mediacontrol_MediaTime,
a_key, a_key,
pos ); pos );
...@@ -184,7 +184,7 @@ mediacontrol_set_media_position( mediacontrol_Instance *self, ...@@ -184,7 +184,7 @@ mediacontrol_set_media_position( mediacontrol_Instance *self,
p_mi = libvlc_playlist_get_media_instance( self->p_instance, &ex); p_mi = libvlc_playlist_get_media_instance( self->p_instance, &ex);
HANDLE_LIBVLC_EXCEPTION_VOID( &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_set_time( p_mi, i_pos / 1000, &ex );
libvlc_media_instance_release( p_mi ); libvlc_media_instance_release( p_mi );
HANDLE_LIBVLC_EXCEPTION_VOID( &ex ); HANDLE_LIBVLC_EXCEPTION_VOID( &ex );
...@@ -223,7 +223,7 @@ mediacontrol_start( mediacontrol_Instance *self, ...@@ -223,7 +223,7 @@ mediacontrol_start( mediacontrol_Instance *self,
psz_from = ( char * )malloc( 20 * sizeof( char ) ); psz_from = ( char * )malloc( 20 * sizeof( char ) );
if( psz_from && p_playlist->status.p_item ) 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 */ /* Set start time */
snprintf( psz_from, 20, "start-time=%i", i_from ); snprintf( psz_from, 20, "start-time=%i", i_from );
...@@ -427,10 +427,10 @@ mediacontrol_get_stream_information( mediacontrol_Instance *self, ...@@ -427,10 +427,10 @@ mediacontrol_get_stream_information( mediacontrol_Instance *self,
var_Get( p_input, "length", &val); var_Get( p_input, "length", &val);
retval->length = val.i_time / 1000; 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, mediacontrol_MediaTime, a_key,
retval->position ); retval->position );
retval->length = mediacontrol_unit_convert( p_input, retval->length = private_mediacontrol_unit_convert( p_input,
mediacontrol_MediaTime, a_key, mediacontrol_MediaTime, a_key,
retval->length ); retval->length );
} }
......
...@@ -38,13 +38,12 @@ struct mediacontrol_Instance { ...@@ -38,13 +38,12 @@ struct mediacontrol_Instance {
playlist_t *p_playlist; playlist_t *p_playlist;
}; };
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 from,
mediacontrol_PositionKey to, mediacontrol_PositionKey to,
vlc_int64_t value ); vlc_int64_t value );
vlc_int64_t mediacontrol_position2microsecond( vlc_int64_t private_mediacontrol_position2microsecond( input_thread_t *p_input,
input_thread_t *p_input, const mediacontrol_Position *pos );
const mediacontrol_Position *pos );
/** /**
* Allocate a RGBPicture structure. * Allocate a RGBPicture structure.
...@@ -52,8 +51,7 @@ vlc_int64_t mediacontrol_position2microsecond( ...@@ -52,8 +51,7 @@ vlc_int64_t mediacontrol_position2microsecond(
*/ */
mediacontrol_RGBPicture *private_mediacontrol_RGBPicture__alloc( int datasize ); mediacontrol_RGBPicture *private_mediacontrol_RGBPicture__alloc( int datasize );
mediacontrol_RGBPicture *private_mediacontrol_createRGBPicture( int, int, long, vlc_int64_t l_date, mediacontrol_RGBPicture *private_mediacontrol_createRGBPicture( int, int, long, vlc_int64_t l_date, char *, int);
char *, int);
mediacontrol_PlaylistSeq *private_mediacontrol_PlaylistSeq__alloc( int size ); mediacontrol_PlaylistSeq *private_mediacontrol_PlaylistSeq__alloc( int size );
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
/* FIXME: Need to stop accessing private input structures !! */ /* FIXME: Need to stop accessing private input structures !! */
#include "input/input_internal.h" #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 from,
mediacontrol_PositionKey to, mediacontrol_PositionKey to,
vlc_int64_t value ) vlc_int64_t value )
...@@ -142,12 +142,12 @@ vlc_int64_t mediacontrol_unit_convert( input_thread_t *p_input, ...@@ -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 /* Converts a mediacontrol_Position into a time in microseconds in
movie clock time */ movie clock time */
vlc_int64_t 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 ) switch( pos->origin )
{ {
case mediacontrol_AbsolutePosition: case mediacontrol_AbsolutePosition:
return ( 1000 * mediacontrol_unit_convert( p_input, return ( 1000 * private_mediacontrol_unit_convert( p_input,
pos->key, /* from */ pos->key, /* from */
mediacontrol_MediaTime, /* to */ mediacontrol_MediaTime, /* to */
pos->value ) ); pos->value ) );
...@@ -163,7 +163,7 @@ mediacontrol_position2microsecond( input_thread_t* p_input, const mediacontrol_P ...@@ -163,7 +163,7 @@ mediacontrol_position2microsecond( input_thread_t* p_input, const mediacontrol_P
var_Get( p_input, "time", &val ); 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, pos->key,
mediacontrol_MediaTime, mediacontrol_MediaTime,
pos->value ); pos->value );
...@@ -183,7 +183,7 @@ mediacontrol_position2microsecond( input_thread_t* p_input, const mediacontrol_P ...@@ -183,7 +183,7 @@ mediacontrol_position2microsecond( input_thread_t* p_input, const mediacontrol_P
if( val.i_time > 0) if( val.i_time > 0)
{ {
l_pos = ( 1000 * mediacontrol_unit_convert( p_input, l_pos = ( 1000 * private_mediacontrol_unit_convert( p_input,
pos->key, pos->key,
mediacontrol_MediaTime, mediacontrol_MediaTime,
pos->value ) ); pos->value ) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment