Browse Source

Add more debug logging

Martijn Braam 11 months ago
parent
commit
e48f94ace1
2 changed files with 4 additions and 1 deletions
  1. 1 1
      src/parse.c
  2. 3 0
      src/pipeline.c

+ 1 - 1
src/parse.c

@@ -464,7 +464,7 @@ libmegapixels_load_uvc(libmegapixels_devconfig *config)
 				perror("QUERYCAP");
 				continue;
 			}
-			if (strcmp(vid_cap.driver, "uvcvideo") != 0) {
+			if (strcmp((char *) vid_cap.driver, "uvcvideo") != 0) {
 				continue;
 			}
 

+ 3 - 0
src/pipeline.c

@@ -213,6 +213,7 @@ libmegapixels_select_mode(libmegapixels_camera *camera, libmegapixels_mode *mode
 		struct v4l2_subdev_format subdev_fmt = {};
 		switch (cmd->type) {
 			case LIBMEGAPIXELS_CMD_LINK:
+				log_debug("  Link %s -> %s\n", cmd->entity_from, cmd->entity_to);
 				if (setup_link(camera, cmd->entity_from_id, cmd->entity_to_id, cmd->pad_from, cmd->pad_to, 1) != 0) {
 					log_error("Could not link %d -> %d [%s -> %s] \n", cmd->entity_from_id, cmd->entity_to_id,
 						cmd->entity_from,
@@ -227,6 +228,8 @@ libmegapixels_select_mode(libmegapixels_camera *camera, libmegapixels_mode *mode
 				subdev_fmt.format.code = mode->media_busfmt;
 				subdev_fmt.format.field = V4L2_FIELD_ANY;
 
+				log_debug("  Mode \n", cmd->entity_from);
+
 				libmegapixels_subdev *sd;
 				int found = 0;
 				for (int h = 0; h < camera->num_handles; h++) {