]> git.sesse.net Git - vlc/blobdiff - modules/access/cdda.c
directory: Playlist code shouldn't be used here.
[vlc] / modules / access / cdda.c
index 2735bd9e703ae091f66030eb1f63b9be5edeeb7e..449d6b61eb4845e79de04d798865f9c5f662e231 100644 (file)
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_input.h>
 #include <vlc_access.h>
 #include <vlc_meta.h>
+#include <vlc_charset.h>
 
 #include <vlc_codecs.h> /* For WAVEHEADER */
 #include "vcd/cdrom.h"
 
+#warning playlist code must not be used here.
 #include <vlc_playlist.h>
 
 #ifdef HAVE_LIBCDDB
@@ -66,8 +69,8 @@ static void Close( vlc_object_t * );
     "value should be set in milliseconds." )
 
 vlc_module_begin();
-    set_shortname( _("Audio CD"));
-    set_description( _("Audio CD input") );
+    set_shortname( N_("Audio CD"));
+    set_description( N_("Audio CD input") );
     set_capability( "access", 10 );
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_ACCESS );
@@ -158,7 +161,7 @@ static int Open( vlc_object_t *p_this )
             return VLC_EGENERIC;
         }
     }
-    else psz_name = strdup( p_access->psz_path );
+    else psz_name = ToLocaleDup( p_access->psz_path );
 
 #ifdef WIN32
     if( psz_name[0] && psz_name[1] == ':' &&
@@ -546,7 +549,7 @@ static void GetCDDBInfo( access_t *p_access, int i_titles, int *p_sectors )
         cddb_disc_add_track( p_access->p_sys->p_disc, t );
         i_size = ( p_sectors[i+1] - p_sectors[i] ) *
                    (int64_t)CDDA_DATA_SIZE;
-        i_length += I64C(1000000) * i_size / 44100 / 4  ;
+        i_length += INT64_C(1000000) * i_size / 44100 / 4  ;
     }
 
     cddb_disc_set_length( p_access->p_sys->p_disc, (int)(i_length/1000000) );