]> git.sesse.net Git - vlc/blobdiff - modules/access/dv.c
Add options to configure audio input format (code was already there ... all it lacked...
[vlc] / modules / access / dv.c
index ec73bb15d1e698fea12e18c923991f830a52bfdb..8962de4217f1d7f7735ad00691fc919b0f23e7af 100644 (file)
@@ -28,7 +28,8 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_access.h>
 
 #include <errno.h>
@@ -73,12 +74,12 @@ static int Control( access_t *, int, va_list );
     "value should be set in milliseconds." )
 
 vlc_module_begin();
-    set_description( _("Digital Video (Firewire/ieee1394)  input") );
-    set_shortname( _("dv") );
+    set_description( N_("Digital Video (Firewire/ieee1394)  input") );
+    set_shortname( N_("dv") );
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_ACCESS );
     add_integer( "dv-caching", 60000 / 1000, NULL, CACHING_TEXT, CACHING_LONGTEXT, true );
-    set_capability( "access2", 0 );
+    set_capability( "access", 0 );
     add_shortcut( "dv" );
     add_shortcut( "dv1394" );
     add_shortcut( "raw1394" );
@@ -165,7 +166,7 @@ static int Open( vlc_object_t *p_this )
     p_sys->p_frame = NULL;
     p_sys->p_ev = NULL;
 
-    vlc_mutex_init( p_access, &p_sys->lock );
+    vlc_mutex_init( &p_sys->lock );
 
     p_sys->i_node = DiscoverAVC( p_access, &p_sys->i_port, p_sys->i_guid );
     if( p_sys->i_node < 0 )
@@ -235,7 +236,7 @@ static int Open( vlc_object_t *p_this )
     p_sys->p_ev->p_frame = NULL;
     p_sys->p_ev->pp_last = &p_sys->p_ev->p_frame;
     p_sys->p_ev->p_access = p_access;
-    vlc_mutex_init( p_access, &p_sys->p_ev->lock );
+    vlc_mutex_init( &p_sys->p_ev->lock );
     vlc_thread_create( p_sys->p_ev, "dv event thread handler", Raw1394EventThread,
                        VLC_THREAD_PRIORITY_OUTPUT, false );
 
@@ -339,8 +340,13 @@ static block_t *Block( access_t *p_access )
     access_sys_t *p_sys = p_access->p_sys;
     block_t *p_block = NULL;
 
-//     if( !p_access->psz_demux )
-//         p_access->psz_demux = strdup( "rawdv" );
+#if 0
+    if( !p_access->psz_demux )
+    {
+        free( p_access->psz_demux );
+        p_access->psz_demux = strdup( "rawdv" );
+    }
+#endif
 
     vlc_mutex_lock( &p_sys->lock );
     p_block = p_sys->p_frame;