]> git.sesse.net Git - vlc/blobdiff - modules/access/dc1394.c
Subsdelay default min-alpha value
[vlc] / modules / access / dc1394.c
index 83c5119fa33380fb4a1c3c9429816d8a9564bd3f..d7c5ff78f4af568ff11cb28097aa67be1927c61a 100644 (file)
@@ -36,7 +36,7 @@
 #include <vlc_plugin.h>
 #include <vlc_input.h>
 #include <vlc_demux.h>
-#include <vlc_charset.h>
+#include <vlc_fs.h>
 #include <vlc_picture.h>
 
 #ifdef HAVE_FCNTL_H
@@ -80,7 +80,6 @@ struct demux_sys_t
     dc1394camera_t      *camera;
     int                 selected_camera;
     uint64_t            selected_uid;
-    picture_t           pic;
     uint32_t            dma_buffers;
     dc1394featureset_t  features;
     quadlet_t           supported_framerates;
@@ -156,7 +155,7 @@ static int FindCamera( demux_sys_t *sys, demux_t *p_demux )
         }
         if( !found )
         {
-            msg_Err( p_demux, "Can't find camera with uid : 0x%llx.",
+            msg_Err( p_demux, "Can't find camera with uid : 0x%"PRIx64".",
                      sys->selected_uid );
             goto end;
         }
@@ -194,8 +193,6 @@ static int Open( vlc_object_t *p_this )
     demux_sys_t  *p_sys;
     es_format_t   fmt;
     dc1394error_t res;
-    int           i_width;
-    int           i_height;
 
     if( strncmp(p_demux->psz_access, "dc1394", 6) != 0 )
         return VLC_EGENERIC;
@@ -232,7 +229,7 @@ static int Open( vlc_object_t *p_this )
     {
         msg_Err( p_demux, "Bad MRL, please check the option line "
                           "(MRL was: %s)",
-                          p_demux->psz_path );
+                          p_demux->psz_location );
         free( p_sys );
         return VLC_EGENERIC;
     }
@@ -378,22 +375,10 @@ static int Open( vlc_object_t *p_this )
     /* TODO - UYV444 chroma converter is missing, when it will be available
      * fourcc will become variable (and not just a fixed value for UYVY)
      */
-    i_width = p_sys->width;
-    i_height = p_sys->height;
-
-    if( picture_Setup( &p_sys->pic, VLC_CODEC_UYVY,
-                       i_width, i_height,
-                       i_width * VOUT_ASPECT_FACTOR / i_height ) )
-    {
-        msg_Err( p_demux ,"unknown chroma" );
-        Close( p_this );
-        return VLC_EGENERIC;
-    }
-
     es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_UYVY );
 
-    fmt.video.i_width = i_width;
-    fmt.video.i_height = i_height;
+    fmt.video.i_width = p_sys->width;
+    fmt.video.i_height = p_sys->height;
 
     msg_Dbg( p_demux, "Added new video es %4.4s %dx%d",
              (char*)&fmt.i_codec, fmt.video.i_width, fmt.video.i_height );
@@ -443,7 +428,7 @@ static int OpenAudioDev( demux_t *p_demux )
     int i_format = AFMT_S16_LE;
     int result;
 
-    p_sys->fd_audio = utf8_open( psz_device, O_RDONLY | O_NONBLOCK );
+    p_sys->fd_audio = vlc_open( psz_device, O_RDONLY | O_NONBLOCK );
     if( p_sys->fd_audio  < 0 )
     {
         msg_Err( p_demux, "Cannot open audio device (%s)", psz_device );
@@ -716,7 +701,7 @@ static int process_options( demux_t *p_demux )
     const char *in_fmt = NULL;
     float rate_f;
 
-    psz_dup = strdup( p_demux->psz_path );
+    psz_dup = strdup( p_demux->psz_location );
     psz_parser = psz_dup;
     for( token = strtok_r( psz_parser,":",&state); token;
          token = strtok_r( NULL, ":", &state ) )
@@ -931,7 +916,7 @@ static int process_options( demux_t *p_demux )
         else if( strncmp( token, "uid=", strlen("uid=") ) == 0)
         {
             token += strlen("uid=");
-            sscanf( token, "0x%llx", &p_sys->selected_uid );
+            sscanf( token, "0x%"SCNx64, &p_sys->selected_uid );
         }
     }