diff options
Diffstat (limited to 'videoout.c')
| -rw-r--r-- | videoout.c | 11 | 
1 files changed, 10 insertions, 1 deletions
@@ -54,11 +54,13 @@ struct videoout  struct videoout *vo_init(const char *devname,  			 const struct video_out_operations *ops,  			 unsigned int buffers, -			 struct v4l2_pix_format *format) +			 struct v4l2_pix_format *format, +			 unsigned int rotation)  {  	struct v4l2_pix_format pixfmt;  	struct v4l2_format fmt;  	struct videoout *vo; +	int32_t ctrl;  	int ret;  	/* Allocate the video output object. */ @@ -76,6 +78,13 @@ struct videoout *vo_init(const char *devname,  		goto error;  	} +	ctrl = rotation; +	ret = v4l2_set_control(vo->dev, V4L2_CID_ROTATE, &ctrl); +	if (ret < 0) { +		perror("failed to configure rotation\n"); +		goto error; +	} +  	pixfmt.pixelformat = format->pixelformat;  	pixfmt.width = format->width;  	pixfmt.height = format->height;  | 
