aboutsummaryrefslogtreecommitdiff
path: root/include/backend/drm/otd.h
blob: eef0e99162c6788ca64005816961fdae22e51f3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef LIBOTD_H
#define LIBOTD_H

#include <stdbool.h>
#include <stddef.h>
#include <EGL/egl.h>
#include <gbm.h>
#include <libudev.h>

#include "session.h"

struct otd {
	int fd;
	bool paused;

	// Priority Queue (Max-heap)
	size_t event_cap;
	size_t event_len;
	struct otd_event *events;

	size_t display_len;
	struct otd_display *displays;

	uint32_t taken_crtcs;

	struct gbm_device *gbm;
	struct {
		EGLDisplay disp;
		EGLConfig conf;
		EGLContext context;
	} egl;

	struct otd_session session;

	struct udev *udev;
	struct udev_monitor *mon;
	int udev_fd;
	char *drm_path;
};

struct otd *otd_start(void);
void otd_finish(struct otd *otd);

#endif