Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vc_mipi_camera.c: error: 'struct sensor_image_properties' has no member named 'left' #11

Open
fre-wolf opened this issue May 15, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@fre-wolf
Copy link

Hello,
I'm trying to include the drivers into my system, but the compilation fails at one point:
error: 'struct sensor_image_properties' has no member named 'left'

void vc_update_image_size_from_mode(struct tegracam_device *tc_dev,  __u32 *left, __u32 *top, __u32 *width, __u32 *height)
{
	struct vc_cam *cam = tegracam_to_cam(tc_dev);
	struct device *dev = vc_core_get_sen_device(cam);
	struct sensor_mode_properties *mode = NULL;
	struct sensor_image_properties *image = NULL;
	int mode_idx = 0;

	if (tc_dev->s_data->use_sensor_mode_id) 
		mode_idx = tc_dev->s_data->sensor_mode_id;

	mode = tegracam_to_mode(tc_dev, mode_idx);
	if (mode == NULL)
		return;

	image = &mode->image_properties;
	if (image->width != 0 && image->height != 0) {
		*left = image->left;
		*top = image->top;
		*width = image->width;
		*height = image->height;

		vc_notice(dev, "%s(): Update image size from mode%u (l: %u, t: %u, w: %u, h: %u)\n",
			__FUNCTION__, mode_idx, *left, *top, *width, *height);
	}
}

in image = &mode->image_properties; and the following lines, somehow the parameter left is being accessed, but there is no left defined in the struct sensor_image_properties :
(from tegra-v4l2-camera.h):

struct sensor_image_properties {
	__u32 width;
	__u32 height;
	__u32 line_length;
	__u32 pixel_format;
	__u32 embedded_metadata_height;
	__u32 reserved[11];
};

How can this be resolved?

@pmliquify
Copy link
Collaborator

@pmliquify pmliquify added the help wanted Extra attention is needed label May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants