Make it work
This commit is contained in:
parent
94df5c155c
commit
3159cd5688
@ -7,8 +7,8 @@
|
|||||||
void camera_init(camera_t *camera)
|
void camera_init(camera_t *camera)
|
||||||
{
|
{
|
||||||
memset(camera, 0, sizeof(*camera));
|
memset(camera, 0, sizeof(*camera));
|
||||||
camera->width = 2328;
|
camera->width = 1280;
|
||||||
camera->height = 1748;
|
camera->height = 720;
|
||||||
camera->nbufs = 4;
|
camera->nbufs = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,8 @@ int camera_configure_srgb_legacy_isp(camera_t *camera)
|
|||||||
camera->codec_jpeg = device_open("JPEG", "/dev/video31");
|
camera->codec_jpeg = device_open("JPEG", "/dev/video31");
|
||||||
camera->codec_h264 = device_open("H264", "/dev/video11");
|
camera->codec_h264 = device_open("H264", "/dev/video11");
|
||||||
|
|
||||||
if (device_open_buffer_list(camera->legacy_isp.isp, false, src->fmt_width, src->fmt_height, src->fmt_format, camera->nbufs) < 0) {
|
if (device_open_buffer_list(camera->legacy_isp.isp, false, src->fmt_width, src->fmt_height, src->fmt_format, camera->nbufs) < 0 ||
|
||||||
|
device_open_buffer_list(camera->legacy_isp.isp, true, src->fmt_width, src->fmt_height, V4L2_PIX_FMT_YUYV, camera->nbufs) < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
10
cmd/main.c
10
cmd/main.c
@ -33,13 +33,23 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
camera_init(&camera);
|
camera_init(&camera);
|
||||||
|
|
||||||
|
// camera.width = 2328;
|
||||||
|
// camera.height = 1748;
|
||||||
|
// camera.nbufs = 4;
|
||||||
|
|
||||||
if (camera_open(&camera, "/dev/video0") < 0) {
|
if (camera_open(&camera, "/dev/video0") < 0) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (camera_configure_srgb_isp(&camera, true) < 0) {
|
if (camera_configure_srgb_isp(&camera, true) < 0) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
if (camera_configure_srgb_legacy_isp(&camera) < 0) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (camera_set_params(&camera) < 0) {
|
if (camera_set_params(&camera) < 0) {
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user