]> git.sesse.net Git - vlc/blobdiff - modules/access/alsa.c
Update LGPL license blurb, choosing v2.1+.
[vlc] / modules / access / alsa.c
index a86054d3de533c39c94b2e9791604e13352bb7da..5f766dfdc537c6a1cc389355214db1420157148e 100644 (file)
@@ -45,7 +45,6 @@
 #include <vlc_demux.h>
 #include <vlc_input.h>
 
-#include <fcntl.h>
 #include <unistd.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
@@ -87,8 +86,8 @@ static void DemuxClose( vlc_object_t * );
 #define CFG_PREFIX "alsa-"
 
 vlc_module_begin()
-    set_shortname( N_("Alsa") )
-    set_description( N_("Alsa audio capture input") )
+    set_shortname( N_("ALSA") )
+    set_description( N_("ALSA audio capture input") )
     set_category( CAT_INPUT )
     set_subcategory( SUBCAT_INPUT_ACCESS )
     set_help( HELP_TEXT )
@@ -248,22 +247,22 @@ static int DemuxOpen( vlc_object_t *p_this )
     p_demux->p_sys = p_sys = calloc( 1, sizeof( demux_sys_t ) );
     if( p_sys == NULL ) return VLC_ENOMEM;
 
-    p_sys->i_sample_rate = var_CreateGetInteger( p_demux, CFG_PREFIX "samplerate" );
-    p_sys->b_stereo = var_CreateGetBool( p_demux, CFG_PREFIX "stereo" );
-    p_sys->i_cache = var_CreateGetInteger( p_demux, CFG_PREFIX "caching" );
+    p_sys->i_sample_rate = var_InheritInteger( p_demux, CFG_PREFIX "samplerate" );
+    p_sys->b_stereo = var_InheritBool( p_demux, CFG_PREFIX "stereo" );
+    p_sys->i_cache = var_InheritInteger( p_demux, CFG_PREFIX "caching" );
     p_sys->p_es = NULL;
     p_sys->p_block = NULL;
     p_sys->i_next_demux_date = -1;
 
     const char *psz_device = NULL;
-    if( p_demux->psz_path && *p_demux->psz_path )
-        psz_device = p_demux->psz_path;
+    if( p_demux->psz_location && *p_demux->psz_location )
+        psz_device = p_demux->psz_location;
     else
         ListAvailableDevices( p_demux, false );
 
     if( FindMainDevice( p_demux, psz_device ) != VLC_SUCCESS )
     {
-        if( p_demux->psz_path && *p_demux->psz_path )
+        if( p_demux->psz_location && *p_demux->psz_location )
             ListAvailableDevices( p_demux, false );
         DemuxClose( p_this );
         return VLC_EGENERIC;