Beispiel #1
0
void v4lconvert_destroy(struct v4lconvert_data *data)
{
  v4lprocessing_destroy(data->processing);
  v4lcontrol_destroy(data->control);
  if (data->jdec) {
    unsigned char *comps[3] = { NULL, NULL, NULL };
    tinyjpeg_set_components(data->jdec, comps, 3);
    tinyjpeg_free(data->jdec);
  }
  v4lconvert_helper_cleanup(data);
  free(data->convert1_buf);
  free(data->convert2_buf);
  free(data->rotate90_buf);
  free(data->flip_buf);
  free(data->convert_pixfmt_buf);
  free(data);
}
Beispiel #2
0
void v4lconvert_destroy(struct v4lconvert_data *data)
{
	v4lprocessing_destroy(data->processing);
	v4lcontrol_destroy(data->control);
	if (data->tinyjpeg) {
		unsigned char *comps[3] = { NULL, NULL, NULL };

		tinyjpeg_set_components(data->tinyjpeg, comps, 3);
		tinyjpeg_free(data->tinyjpeg);
	}
	if (data->cinfo_initialized)
		jpeg_destroy_decompress(&data->cinfo);
	v4lconvert_helper_cleanup(data);
	free(data->convert1_buf);
	free(data->convert2_buf);
	free(data->rotate90_buf);
	free(data->flip_buf);
	free(data->convert_pixfmt_buf);
	free(data->previous_frame);
	free(data);
}