mediacontrol: prefix unit conversion functions with private_
authorOlivier Aubert <olivier.aubert@liris.cnrs.fr>
Fri, 13 Jul 2007 08:23:25 +0000 (08:23 +0000)
committerOlivier Aubert <olivier.aubert@liris.cnrs.fr>
Fri, 13 Jul 2007 08:23:25 +0000 (08:23 +0000)
src/control/mediacontrol_audio_video.c
src/control/mediacontrol_core.c
src/control/mediacontrol_internal.h
src/control/mediacontrol_util.c

index 6c5b281..212dc27 100644 (file)
@@ -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;
 
index 34f62a4..bfe8bee 100644 (file)
@@ -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 );
     }
index 6161077..f222bdd 100644 (file)
@@ -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 );
 
index 818d625..70874da 100644 (file)
@@ -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 ) );