From 510177b220bcae9a15dc646ffd51d8b377dbdb77 Mon Sep 17 00:00:00 2001 From: Benjamin Schaaf Date: Thu, 26 Nov 2020 21:39:38 +1100 Subject: [PATCH] =?UTF-8?q?Rename=20test=5Fcamera=20=E2=86=92=20camera=5Ft?= =?UTF-8?q?est?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- meson.build | 3 +- process_pipeline.c | 46 -------------------------- tools/{test_camera.c => camera_test.c} | 3 +- 3 files changed, 4 insertions(+), 48 deletions(-) rename tools/{test_camera.c => camera_test.c} (98%) diff --git a/meson.build b/meson.build index 4da3d7b..71e1969 100644 --- a/meson.build +++ b/meson.build @@ -45,8 +45,9 @@ install_data(['postprocess.sh'], install_dir : get_option('datadir') / 'megapixels/', install_mode: 'rwxr-xr-x') +# Tools executable('list_devices', 'tools/list_devices.c', 'device.c', dependencies: [gtkdep]) -executable('test_camera', 'tools/test_camera.c', 'camera.c', 'device.c', dependencies: [gtkdep]) +executable('camera_test', 'tools/camera_test.c', 'camera.c', 'device.c', dependencies: [gtkdep]) test_quickpreview = executable('test_quickpreview', 'tests/test_quickpreview.c', 'quickpreview.c', 'camera.c', dependencies: [gtkdep]) test('quickpreview', test_quickpreview) diff --git a/process_pipeline.c b/process_pipeline.c index 3df8cb3..c6d9add 100644 --- a/process_pipeline.c +++ b/process_pipeline.c @@ -46,52 +46,6 @@ static int exposure; static char capture_fname[255]; -// static void -// process_image(const int *p, int size) -// { -// time_t rawtime; -// char datetime[20] = {0}; -// struct tm tim; -// uint8_t *pixels; -// char fname[255]; -// char fname_target[255]; -// char command[1024]; -// char timestamp[30]; -// char uniquecameramodel[255]; -// GdkPixbuf *pixbuf; -// GdkPixbuf *pixbufrot; -// GdkPixbuf *thumb; -// GError *error = NULL; -// double scale; -// cairo_t *cr; -// TIFF *tif; -// int skip = 2; -// long sub_offset = 0; -// uint64 exif_offset = 0; -// static const short cfapatterndim[] = {2, 2}; -// static const float neutral[] = {1.0, 1.0, 1.0}; -// static uint16_t isospeed[] = {0}; - -// // Only process preview frames when not capturing -// if (capture == 0) { - -// } else { - - -// if (capture == 0) { - - -// // Restore the auto exposure and gain if needed -// // if (auto_exposure) { -// // v4l2_ctrl_set(current.fd, V4L2_CID_EXPOSURE_AUTO, V4L2_EXPOSURE_AUTO); -// // } -// // if (auto_gain) { -// // v4l2_ctrl_set(current.fd, V4L2_CID_AUTOGAIN, 1); -// // } -// } -// } -// } - static void register_custom_tiff_tags(TIFF *tif) { diff --git a/tools/test_camera.c b/tools/camera_test.c similarity index 98% rename from tools/test_camera.c rename to tools/camera_test.c index 3f18439..c27edaa 100644 --- a/tools/test_camera.c +++ b/tools/camera_test.c @@ -131,7 +131,8 @@ int main(int argc, char *argv[]) MPCameraMode *m = mp_camera_mode_list_get(mode); printf(" %dx%d interval:%d/%d fmt:%s\n", m->width, m->height, m->frame_interval.numerator, m->frame_interval.denominator, mp_pixel_format_to_str(m->pixel_format)); - if (m->frame_interval.denominator < 15 || m->frame_interval.denominator > 30) { + // Skip really slow framerates + if (m->frame_interval.denominator < 15) { printf(" Skipping…\n"); continue; }