]> git.sesse.net Git - vlc/blobdiff - modules/access/v4l2/v4l2.c
A lot of missing const in options lists
[vlc] / modules / access / v4l2 / v4l2.c
index 3d3cf1ed4a98577c9427748b3b8c3cb95ad06487..df497733bb7322a7dba68476be40faec76d6daaf 100644 (file)
@@ -43,6 +43,7 @@
 #endif
 
 #include <vlc/vlc.h>
+#include <vlc_plugin.h>
 #include <vlc_access.h>
 #include <vlc_demux.h>
 #include <vlc_input.h>
@@ -239,21 +240,21 @@ typedef enum {
     IO_METHOD_USERPTR,
 } io_method;
 
-static int i_standards_list[] =
+static const int i_standards_list[] =
     { V4L2_STD_UNKNOWN, V4L2_STD_SECAM, V4L2_STD_PAL, V4L2_STD_NTSC };
-static const char *psz_standards_list_text[] =
+static const char *const psz_standards_list_text[] =
     { N_("Default"), N_("SECAM"), N_("PAL"),  N_("NTSC") };
 
-static int i_iomethod_list[] =
+static const int i_iomethod_list[] =
     { IO_METHOD_READ, IO_METHOD_MMAP, IO_METHOD_USERPTR };
-static const char *psz_iomethod_list_text[] =
+static const char *const psz_iomethod_list_text[] =
     { N_("READ"), N_("MMAP"),  N_("USERPTR") };
 
-static int i_tuner_audio_modes_list[] =
+static const int i_tuner_audio_modes_list[] =
     { V4L2_TUNER_MODE_MONO, V4L2_TUNER_MODE_STEREO,
       V4L2_TUNER_MODE_LANG1, V4L2_TUNER_MODE_LANG2,
       V4L2_TUNER_MODE_SAP, V4L2_TUNER_MODE_LANG1_LANG2 };
-static const char *psz_tuner_audio_modes_list_text[] =
+static const char *const psz_tuner_audio_modes_list_text[] =
     { N_( "Mono" ),
       N_( "Stereo" ),
       N_( "Primary language (Analog TV tuners only)" ),
@@ -271,8 +272,8 @@ static const char *psz_tuner_audio_modes_list_text[] =
 #define CFG_PREFIX "v4l2-"
 
 vlc_module_begin();
-    set_shortname( _("Video4Linux2") );
-    set_description( _("Video4Linux2 input") );
+    set_shortname( N_("Video4Linux2") );
+    set_description( N_("Video4Linux2 input") );
     set_category( CAT_INPUT );
     set_subcategory( SUBCAT_INPUT_ACCESS );
 
@@ -378,7 +379,7 @@ vlc_module_begin();
 
     add_submodule();
     add_shortcut( "v4l2c" );
-    set_description( _("Video4Linux2 Compressed A/V") );
+    set_description( N_("Video4Linux2 Compressed A/V") );
     set_capability( "access", 0 );
     /* use these when open as access_demux fails; VLC will use another demux */
     set_callbacks( AccessOpen, AccessClose );
@@ -477,7 +478,7 @@ static struct
  */
 static const __u32 p_chroma_fallbacks[] =
 { V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_YVU420, V4L2_PIX_FMT_YUV422P,
-  V4L2_PIX_FMT_YUYV, V4L2_PIX_FMT_MJPEG };
+  V4L2_PIX_FMT_YUYV, V4L2_PIX_FMT_UYVY, V4L2_PIX_FMT_MJPEG };
 
 static struct
 {
@@ -1646,7 +1647,7 @@ static block_t* GrabAudio( demux_t *p_demux )
 
     /* Timestamp */
     p_block->i_pts = p_block->i_dts =
-        mdate() - I64C(1000000) * (mtime_t)i_correct /
+        mdate() - INT64_C(1000000) * (mtime_t)i_correct /
         2 / ( p_sys->b_stereo ? 2 : 1) / p_sys->i_sample_rate;
 
     return p_block;