예제 #1
0
static void gst_imx_ipu_blitter_init(GstImxIpuBlitter *ipu_blitter)
{
	if (!gst_imx_ipu_open())
	{
		GST_ELEMENT_ERROR(ipu_blitter, RESOURCE, OPEN_READ_WRITE, ("could not open IPU device"), (NULL));
		return;
	}

	gst_video_info_init(&(ipu_blitter->input_video_info));
	gst_video_info_init(&(ipu_blitter->output_video_info));
	ipu_blitter->allocator = NULL;
	ipu_blitter->input_frame = NULL;
	ipu_blitter->output_frame = NULL;
	ipu_blitter->use_entire_input_frame = TRUE;

	ipu_blitter->priv = g_slice_alloc(sizeof(GstImxIpuBlitterPrivate));
	memset(&(ipu_blitter->priv->main_task), 0, sizeof(struct ipu_task));

	ipu_blitter->visibility_mask = 0;
	ipu_blitter->fill_color = 0xFF000000;
	ipu_blitter->num_empty_regions = 0;

	ipu_blitter->clipped_outer_region_updated = FALSE;
	ipu_blitter->num_output_pages = 1;
	ipu_blitter->num_cleared_output_pages = 0;

	ipu_blitter->deinterlacing_enabled = GST_IMX_IPU_BLITTER_DEINTERLACE_DEFAULT;
}
예제 #2
0
void gst_imx_ipu_blitter_init(GstImxIpuBlitter *ipu_blitter)
{
	ipu_blitter->previous_frame = NULL;
	ipu_blitter->allocator = NULL;
	ipu_blitter->dummy_black_buffer = NULL;
	ipu_blitter->output_region_uptodate = FALSE;

	ipu_blitter->priv = g_slice_alloc(sizeof(GstImxIpuBlitterPrivate));
	memset(&(ipu_blitter->priv->task), 0, sizeof(struct ipu_task));

	if (!gst_imx_ipu_open())
	{
		GST_ELEMENT_ERROR(ipu_blitter, RESOURCE, OPEN_READ_WRITE, ("could not open IPU device"), (NULL));
		return;
	}

	ipu_blitter->allocator = gst_imx_ipu_allocator_new();

	gst_imx_ipu_blitter_init_dummy_black_buffer(ipu_blitter);

	GST_INFO_OBJECT(ipu_blitter, "initialized blitter");
}