Commit 6673b8c6 authored by Antoine Cellerier's avatar Antoine Cellerier

v4l2: Since the frame size and frame intervals ioctls are new in Linux 2.6.19,...

v4l2: Since the frame size and frame intervals ioctls are new in Linux 2.6.19, add some ifdef stuff to make sure that this still compiles on older kernels.
parent 376c5593
...@@ -1310,6 +1310,8 @@ int OpenVideoDev( demux_t *p_demux, char *psz_device ) ...@@ -1310,6 +1310,8 @@ int OpenVideoDev( demux_t *p_demux, char *psz_device )
if( fmt.fmt.pix.sizeimage < i_min ) if( fmt.fmt.pix.sizeimage < i_min )
fmt.fmt.pix.sizeimage = i_min; fmt.fmt.pix.sizeimage = i_min;
#ifdef VIDIOC_ENUM_FRAMEINTERVALS
/* This is new in Linux 2.6.19 */
/* List supported frame rates */ /* List supported frame rates */
struct v4l2_frmivalenum frmival; struct v4l2_frmivalenum frmival;
frmival.index = 0; frmival.index = 0;
...@@ -1352,6 +1354,7 @@ int OpenVideoDev( demux_t *p_demux, char *psz_device ) ...@@ -1352,6 +1354,7 @@ int OpenVideoDev( demux_t *p_demux, char *psz_device )
break; break;
} }
} }
#endif
/* Init vout Picture */ /* Init vout Picture */
vout_InitPicture( VLC_OBJECT(p_demux), &p_sys->pic, p_sys->i_fourcc, vout_InitPicture( VLC_OBJECT(p_demux), &p_sys->pic, p_sys->i_fourcc,
...@@ -1774,6 +1777,8 @@ vlc_bool_t ProbeVideoDev( demux_t *p_demux, char *psz_device ) ...@@ -1774,6 +1777,8 @@ vlc_bool_t ProbeVideoDev( demux_t *p_demux, char *psz_device )
psz_fourcc, psz_fourcc,
p_sys->p_codecs[i_index].description ); p_sys->p_codecs[i_index].description );
#ifdef VIDIOC_ENUM_FRAMESIZES
/* This is new in Linux 2.6.19 */
/* List valid frame sizes for this format */ /* List valid frame sizes for this format */
struct v4l2_frmsizeenum frmsize; struct v4l2_frmsizeenum frmsize;
frmsize.index = 0; frmsize.index = 0;
...@@ -1810,6 +1815,7 @@ vlc_bool_t ProbeVideoDev( demux_t *p_demux, char *psz_device ) ...@@ -1810,6 +1815,7 @@ vlc_bool_t ProbeVideoDev( demux_t *p_demux, char *psz_device )
break; break;
} }
} }
#endif
} }
} }
if( !b_codec_supported ) if( !b_codec_supported )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment