#include "mutex.h"
#include "picture.h"
#include "preferences.h"
-#include "quicktime.h"
#include "recordconfig.h"
#include "videodevice.h"
int best_height = config_height;
unsigned int best_format = 0;
int best_merit = 0;
- //int best_color_model = -1;
+ int best_color_model = -1;
int best_area = 1;
int driver = video_device->in_config->driver;
int cmodel = -1;
switch(fmt.pixelformat)
{
+ case V4L2_PIX_FMT_UYVY: cmodel = BC_UVY422; merit = 4; break;
case V4L2_PIX_FMT_YUYV: cmodel = BC_YUV422; merit = 4; break;
case V4L2_PIX_FMT_Y41P: cmodel = BC_YUV411P; merit = 1; break;
case V4L2_PIX_FMT_YVU420: cmodel = BC_YUV420P; merit = 3; break;
{
best_merit = merit;
best_format = fmt.pixelformat;
- //best_color_model = cmodel;
+ best_color_model = cmodel;
}
for( int n=0; n<20; ++n ) {
best_format = V4L2_PIX_FMT_MPEG;
break;
default:
+ best_color_model = color_model;
best_format = cmodel_to_device(color_model);
break;
}
- printf("DeviceV4L2Base::v4l2_open "
- " attempting format %4.4s\n", (char *)&best_format);
+ printf(_("DeviceV4L2Base::v4l2_open "
+ " attempting format %4.4s\n"), (char *)&best_format);
}
if(driver == VIDEO4LINUX2JPEG && best_format != V4L2_PIX_FMT_MJPEG)
{
- printf("DeviceV4L2Base::v4l2_open jpeg driver"
- " and best_format not mjpeg (%4.4s)\n", (char *)&best_format);
+ printf(_("DeviceV4L2Base::v4l2_open jpeg driver"
+ " and best_format not mjpeg (%4.4s)\n"), (char *)&best_format);
return 1;
}
if(driver == VIDEO4LINUX2MPEG && best_format != V4L2_PIX_FMT_MPEG)
{
- printf("DeviceV4L2Base::v4l2_open mpeg driver"
- " and best_format not mpeg (%4.4s)\n",(char *)&best_format);
+ printf(_("DeviceV4L2Base::v4l2_open mpeg driver"
+ " and best_format not mpeg (%4.4s)\n"),(char *)&best_format);
return 1;
}
if(config_width != best_width || config_height != best_height)
{
- printf("DeviceV4L2Base::v4l2_open config geom %dx%d != %dx%d best_geom\n",
+ printf(_("DeviceV4L2Base::v4l2_open config geom %dx%d != %dx%d best_geom\n"),
config_width, config_height, best_width, best_height);
}
perror("DeviceV4L2Base::v4l2_open VIDIOC_S_JPEGCOMP");
}
- this->color_model = color_model;
+ this->color_model = best_color_model;
return 0;
}
{
case BC_COMPRESSED: return V4L2_PIX_FMT_MJPEG;
case BC_YUV422: return V4L2_PIX_FMT_YUYV;
+ case BC_UVY422: return V4L2_PIX_FMT_UYVY;
case BC_YUV411P: return V4L2_PIX_FMT_Y41P;
case BC_YUV420P: return V4L2_PIX_FMT_YVU420;
case BC_YUV422P: return V4L2_PIX_FMT_YUV422P;