Skip to content

Commit

Permalink
RaspiVid: Print message stating TC358743 drivers are unsupported (#437)
Browse files Browse the repository at this point in the history
Support requests for the TC358743 are getting annoying, so
state that the drivers are unsupported, and are there on an
as-is basis.
  • Loading branch information
6by9 committed Nov 3, 2017
1 parent d819af5 commit 20ecf5c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions host_applications/linux/apps/raspicam/RaspiVid.c
Expand Up @@ -449,6 +449,39 @@ static void default_status(RASPIVID_STATE *state)
raspicamcontrol_set_defaults(&state->camera_parameters);
}

static void check_camera_model(int cam_num)
{
MMAL_COMPONENT_T *camera_info;
MMAL_STATUS_T status;

// Try to get the camera name
status = mmal_component_create(MMAL_COMPONENT_DEFAULT_CAMERA_INFO, &camera_info);
if (status == MMAL_SUCCESS)
{
MMAL_PARAMETER_CAMERA_INFO_T param;
param.hdr.id = MMAL_PARAMETER_CAMERA_INFO;
param.hdr.size = sizeof(param)-4; // Deliberately undersize to check firmware version
status = mmal_port_parameter_get(camera_info->control, &param.hdr);

if (status != MMAL_SUCCESS)
{
// Running on newer firmware
param.hdr.size = sizeof(param);
status = mmal_port_parameter_get(camera_info->control, &param.hdr);
if (status == MMAL_SUCCESS && param.num_cameras > cam_num)
{
if (!strncmp(param.cameras[cam_num].camera_name, "toshh2c", 7))
{
fprintf(stderr, "The driver for the TC358743 HDMI to CSI2 chip you are using is NOT supported.\n");
fprintf(stderr, "They were written for a demo purposes only, and are in the firmware on an as-is\n");
fprintf(stderr, "basis and therefore requests for support or changes will not be acted on.\n\n");
}
}
}

mmal_component_destroy(camera_info);
}
}

/**
* Dump image state parameters to stderr.
Expand Down Expand Up @@ -2516,6 +2549,8 @@ int main(int argc, const char **argv)
dump_status(&state);
}

check_camera_model(state.cameraNum);

// OK, we have a nice set of parameters. Now set up our components
// We have three components. Camera, Preview and encoder.

Expand Down

0 comments on commit 20ecf5c

Please sign in to comment.