#define HUE_TEXT N_( "Hue" )
#define HUE_LONGTEXT N_( \
"Set the Hue of the video input" )
-#define COLOUR_TEXT N_( "Colour" )
+#define COLOUR_TEXT N_( "Color" )
#define COLOUR_LONGTEXT N_( \
- "Set the Colour of the video input" )
+ "Set the Color of the video input" )
#define CONTRAST_TEXT N_( "Contrast" )
#define CONTRAST_LONGTEXT N_( \
"Set the Contrast of the video input" )
#define QUALITY_LONGTEXT N_( "Set the quality of the stream" )
#define FPS_TEXT N_( "Framerate" )
#define FPS_LONGTEXT N_( "Framerate to capture, if applicable " \
- "(-1 for auto)" )
+ "(-1 for autodetect)" )
static int i_norm_list[] =
{ VIDEO_MODE_AUTO, VIDEO_MODE_SECAM, VIDEO_MODE_PAL, VIDEO_MODE_NTSC };
var_Create( p_demux, "v4l-height", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
var_Get( p_demux, "v4l-height", &val );
- p_sys->i_width = val.i_int;
+ p_sys->i_height = val.i_int;
p_sys->i_video_pts = -1;
var_Create( p_demux, "v4l-brightness", VLC_VAR_INTEGER |
VLC_VAR_DOINHERIT );
- var_Get( p_demux, "v4l-brighness", &val );
+ var_Get( p_demux, "v4l-brightness", &val );
p_sys->i_brightness = val.i_int;
var_Create( p_demux, "v4l-hue", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
p_sys->i_width = vid_win.width;
p_sys->i_height = vid_win.height;
+ if( !p_sys->i_width || !p_sys->i_height )
+ {
+ p_sys->i_width = p_sys->vid_cap.maxwidth;
+ p_sys->i_height = p_sys->vid_cap.maxheight;
+ }
+
+ if( !p_sys->i_width || !p_sys->i_height )
+ {
+ msg_Err( p_demux, "invalid video size (%ix%i)",
+ p_sys->i_width, p_sys->i_height );
+ goto vdev_failed;
+ }
+
msg_Dbg( p_demux, "will use %dx%d", p_sys->i_width, p_sys->i_height );
}