]> git.sesse.net Git - vlc/blobdiff - modules/access/v4l.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / access / v4l.c
index 6938f6a595b4606d40a11a89e797f3df19ce8b62..c61bd0a59eb23dca24aea1198ef7cefc2acc48d6 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#define _GNU_SOURCE
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
 
 #include <vlc/vlc.h>
 #include <vlc_input.h>
@@ -142,7 +138,7 @@ static void Close( vlc_object_t * );
 
 static int i_norm_list[] =
     { VIDEO_MODE_AUTO, VIDEO_MODE_SECAM, VIDEO_MODE_PAL, VIDEO_MODE_NTSC };
-static char *psz_norm_list_text[] =
+static const char *psz_norm_list_text[] =
     { N_("Automatic"), N_("SECAM"), N_("PAL"),  N_("NTSC") };
 
 vlc_module_begin();
@@ -237,7 +233,9 @@ static struct
     { VIDEO_PALETTE_RGB555, VLC_FOURCC( 'R', 'V', '1', '5' ) },
     { VIDEO_PALETTE_RGB24, VLC_FOURCC( 'R', 'V', '2', '4' ) },
     { VIDEO_PALETTE_RGB32, VLC_FOURCC( 'R', 'V', '3', '2' ) },
-    { VIDEO_PALETTE_YUV422, VLC_FOURCC( 'I', '4', '2', '2' ) },
+    { VIDEO_PALETTE_YUV422, VLC_FOURCC( 'Y', 'U', 'Y', '2' ) },
+    { VIDEO_PALETTE_YUV422, VLC_FOURCC( 'Y', 'U', 'Y', 'V' ) },
+    { VIDEO_PALETTE_YUYV, VLC_FOURCC( 'Y', 'U', 'Y', '2' ) },
     { VIDEO_PALETTE_YUYV, VLC_FOURCC( 'Y', 'U', 'Y', 'V' ) },
     { VIDEO_PALETTE_UYVY, VLC_FOURCC( 'U', 'Y', 'V', 'Y' ) },
     { VIDEO_PALETTE_YUV420, VLC_FOURCC( 'I', '4', '2', 'N' ) },
@@ -767,7 +765,7 @@ static void ParseMRL( demux_t *p_demux )
             }
             else if( !strncmp( psz_parser, "hue=", strlen( "hue=" ) ) )
             {
-                p_sys->i_hue = strtol( psz_parser + strlen( "hue=" ), 
+                p_sys->i_hue = strtol( psz_parser + strlen( "hue=" ),
                                        &psz_parser, 0 );
             }
             else if( !strncmp( psz_parser, "contrast=", strlen( "contrast=" ) ) )
@@ -1173,12 +1171,12 @@ static int OpenVideoDev( demux_t *p_demux, char *psz_device )
             char *psz;
             int i;
 
-            vid_picture.palette = 0;
             p_sys->i_fourcc = 0;
 
             psz = var_CreateGetString( p_demux, "v4l-chroma" );
             if( strlen( psz ) >= 4 )
             {
+                vid_picture.palette = 0;
                 int i_chroma = VLC_FOURCC( psz[0], psz[1], psz[2], psz[3] );
 
                 /* Find out v4l chroma code */
@@ -1452,7 +1450,7 @@ static uint8_t *GrabCapture( demux_t *p_demux )
 
     while( ioctl(p_sys->fd_video, VIDIOCSYNC, &p_sys->i_frame_pos) < 0 )
     {
-        if( errno != EAGAIN && errno != EINTR )    
+        if( errno != EAGAIN && errno != EINTR )
         {
             msg_Err( p_demux, "failed syncing new frame" );
             return NULL;
@@ -1490,7 +1488,7 @@ static uint8_t *GrabMJPEG( demux_t *p_demux )
     /* sync on the next frame */
     while( ioctl( p_sys->fd_video, MJPIOC_SYNC, &sync ) < 0 )
     {
-        if( errno != EAGAIN && errno != EINTR )    
+        if( errno != EAGAIN && errno != EINTR )
         {
             msg_Err( p_demux, "failed syncing new frame" );
             return NULL;