X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess%2Fgnomevfs.c;h=fb8f56bed8e3e000edd9113cc5e2b07eec55e472;hb=6ce6dc06545e12f9f04c6afe60c99e06fdc71502;hp=1e8a763b72bf5d07e76e358660403fb364a8682a;hpb=806cf5165824be921bf2402ecf11fd3ee6501f9c;p=vlc diff --git a/modules/access/gnomevfs.c b/modules/access/gnomevfs.c index 1e8a763b72..fb8f56bed8 100644 --- a/modules/access/gnomevfs.c +++ b/modules/access/gnomevfs.c @@ -24,7 +24,12 @@ /***************************************************************************** * Preamble *****************************************************************************/ -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include #include #include @@ -45,13 +50,12 @@ static void Close( vlc_object_t * ); "This value should be set in milliseconds." ) vlc_module_begin(); - set_description( _("GnomeVFS input") ); + set_description( N_("GnomeVFS input") ); set_shortname( "GnomeVFS" ); set_category( CAT_INPUT ); set_subcategory( SUBCAT_INPUT_ACCESS ); - add_integer( "gnomevfs-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE ); - change_safe(); - set_capability( "access2", 10 ); + add_integer( "gnomevfs-caching", DEFAULT_PTS_DELAY / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, true ); + set_capability( "access", 10 ); add_shortcut( "gnomevfs" ); set_callbacks( Open, Close ); vlc_module_end(); @@ -72,9 +76,9 @@ struct access_sys_t GnomeVFSHandle *p_handle; GnomeVFSFileInfo *p_file_info; - vlc_bool_t b_local; - vlc_bool_t b_seekable; - vlc_bool_t b_pace_control; + bool b_local; + bool b_seekable; + bool b_pace_control; }; /***************************************************************************** @@ -107,7 +111,7 @@ static int Open( vlc_object_t *p_this ) p_sys->p_handle = p_handle; p_sys->i_nb_reads = 0; - p_sys->b_pace_control = VLC_TRUE; + p_sys->b_pace_control = true; if( strcmp( "gnomevfs", p_access->psz_access ) && *(p_access->psz_access) != '\0') @@ -214,20 +218,20 @@ static int Open( vlc_object_t *p_this ) if (GNOME_VFS_FILE_INFO_LOCAL( p_sys->p_file_info )) { - p_sys->b_local = VLC_TRUE; + p_sys->b_local = true; } if( p_sys->p_file_info->type == GNOME_VFS_FILE_TYPE_REGULAR || p_sys->p_file_info->type == GNOME_VFS_FILE_TYPE_CHARACTER_DEVICE || p_sys->p_file_info->type == GNOME_VFS_FILE_TYPE_BLOCK_DEVICE ) { - p_sys->b_seekable = VLC_TRUE; + p_sys->b_seekable = true; p_access->info.i_size = (int64_t)(p_sys->p_file_info->size); } else if( p_sys->p_file_info->type == GNOME_VFS_FILE_TYPE_FIFO || p_sys->p_file_info->type == GNOME_VFS_FILE_TYPE_SOCKET ) { - p_sys->b_seekable = VLC_FALSE; + p_sys->b_seekable = false; } else { @@ -292,7 +296,7 @@ static int Read( access_t *p_access, uint8_t *p_buffer, int i_len ) (GnomeVFSFileSize)i_len, &i_read_len ); if( i_ret ) { - p_access->info.b_eof = VLC_TRUE; + p_access->info.b_eof = true; if( i_ret != GNOME_VFS_ERROR_EOF ) { msg_Err( p_access, "read failed (%s)", @@ -326,7 +330,7 @@ static int Read( access_t *p_access, uint8_t *p_buffer, int i_len ) /* Some Acces (http) never return EOF and loop on the file */ if( p_access->info.i_pos > p_access->info.i_size ) { - p_access->info.b_eof = VLC_TRUE; + p_access->info.b_eof = true; return 0; } return (int)i_read_len; @@ -360,7 +364,7 @@ static int Seek( access_t *p_access, int64_t i_pos ) } } /* Reset eof */ - p_access->info.b_eof = VLC_FALSE; + p_access->info.b_eof = false; /* FIXME */ return VLC_SUCCESS; @@ -372,7 +376,7 @@ static int Seek( access_t *p_access, int64_t i_pos ) static int Control( access_t *p_access, int i_query, va_list args ) { access_sys_t *p_sys = p_access->p_sys; - vlc_bool_t *pb_bool; + bool *pb_bool; int *pi_int; int64_t *pi_64; @@ -381,13 +385,13 @@ static int Control( access_t *p_access, int i_query, va_list args ) /* */ case ACCESS_CAN_SEEK: case ACCESS_CAN_FASTSEEK: - pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* ); + pb_bool = (bool*)va_arg( args, bool* ); *pb_bool = p_sys->b_seekable; break; case ACCESS_CAN_PAUSE: case ACCESS_CAN_CONTROL_PACE: - pb_bool = (vlc_bool_t*)va_arg( args, vlc_bool_t* ); + pb_bool = (bool*)va_arg( args, bool* ); *pb_bool = p_sys->b_pace_control; break; @@ -400,7 +404,7 @@ static int Control( access_t *p_access, int i_query, va_list args ) case ACCESS_GET_PTS_DELAY: pi_64 = (int64_t*)va_arg( args, int64_t * ); *pi_64 = var_GetInteger( p_access, - "gnomevfs-caching" ) * I64C(1000); + "gnomevfs-caching" ) * INT64_C(1000); break; /* */