/*****************************************************************************
* Preamble
*****************************************************************************/
-#define _GNU_SOURCE
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
#include <vlc/vlc.h>
#include <vlc_input.h>
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();
{ 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' ) },
}
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=" ) ) )
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 */
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;
/* 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;