Lines Matching refs:drv
105 vlVaDriver *drv;
111 drv = CALLOC(1, sizeof(vlVaDriver));
112 if (!drv)
117 FREE(drv);
122 drv->vscreen = vl_dri3_screen_create(ctx->native_dpy, ctx->x11_screen);
124 if (!drv->vscreen)
125 drv->vscreen = vl_dri2_screen_create(ctx->native_dpy, ctx->x11_screen);
126 if (!drv->vscreen)
135 FREE(drv);
139 drv->vscreen = vl_drm_screen_create(drm_info->fd);
140 if (!drv->vscreen)
145 FREE(drv);
149 drv->pipe = drv->vscreen->pscreen->context_create(drv->vscreen->pscreen,
150 drv->vscreen, 0);
151 if (!drv->pipe)
154 drv->htab = handle_table_create();
155 if (!drv->htab)
158 if (!vl_compositor_init(&drv->compositor, drv->pipe))
160 if (!vl_compositor_init_state(&drv->cstate, drv->pipe))
163 vl_csc_get_matrix(VL_CSC_COLOR_STANDARD_BT_601, NULL, true, &drv->csc);
164 if (!vl_compositor_set_csc_matrix(&drv->cstate, (const vl_csc_matrix *)&drv->csc, 1.0f, 0.0f))
166 pipe_mutex_init(drv->mutex);
168 ctx->pDriverData = (void *)drv;
184 vl_compositor_cleanup_state(&drv->cstate);
187 vl_compositor_cleanup(&drv->compositor);
190 handle_table_destroy(drv->htab);
193 drv->pipe->destroy(drv->pipe);
196 drv->vscreen->destroy(drv->vscreen);
199 FREE(drv);
208 vlVaDriver *drv;
216 drv = VL_VA_DRIVER(ctx);
217 pipe_mutex_lock(drv->mutex);
218 config = handle_table_get(drv->htab, config_id);
219 pipe_mutex_unlock(drv->mutex);
233 if (!drv->compositor.upload) {
294 pipe_mutex_lock(drv->mutex);
295 *context_id = handle_table_add(drv->htab, context);
296 pipe_mutex_unlock(drv->mutex);
304 vlVaDriver *drv;
310 drv = VL_VA_DRIVER(ctx);
311 pipe_mutex_lock(drv->mutex);
312 context = handle_table_get(drv->htab, context_id);
314 pipe_mutex_unlock(drv->mutex);
338 handle_table_remove(drv->htab, context_id);
339 pipe_mutex_unlock(drv->mutex);
347 vlVaDriver *drv;
352 drv = ctx->pDriverData;
353 vl_compositor_cleanup_state(&drv->cstate);
354 vl_compositor_cleanup(&drv->compositor);
355 drv->pipe->destroy(drv->pipe);
356 drv->vscreen->destroy(drv->vscreen);
357 handle_table_destroy(drv->htab);
358 pipe_mutex_destroy(drv->mutex);
359 FREE(drv);