2024-10-21 19:52:50 -04:00
|
|
|
#ifndef VANILLA_PI_DRM_H
|
|
|
|
#define VANILLA_PI_DRM_H
|
|
|
|
|
2024-10-23 19:41:34 -04:00
|
|
|
#include <libavutil/frame.h>
|
2024-10-27 18:34:06 -04:00
|
|
|
#include <libavutil/hwcontext_drm.h>
|
2024-10-23 23:47:03 -04:00
|
|
|
#include <linux/kd.h>
|
2024-10-23 19:41:34 -04:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2024-10-21 19:52:50 -04:00
|
|
|
typedef struct {
|
|
|
|
int fd;
|
2024-10-23 19:41:34 -04:00
|
|
|
uint32_t crtc;
|
|
|
|
int crtc_index;
|
|
|
|
uint32_t plane_id;
|
|
|
|
int got_plane;
|
|
|
|
uint32_t fb_id;
|
|
|
|
int got_fb;
|
2024-10-27 18:34:06 -04:00
|
|
|
uint32_t handles[AV_DRM_MAX_PLANES];
|
|
|
|
int got_handles;
|
2024-10-21 19:52:50 -04:00
|
|
|
} vanilla_drm_ctx_t;
|
|
|
|
|
2024-10-23 23:47:03 -04:00
|
|
|
int set_tty(int mode);
|
2024-10-21 19:52:50 -04:00
|
|
|
int initialize_drm(vanilla_drm_ctx_t *ctx);
|
|
|
|
int free_drm(vanilla_drm_ctx_t *ctx);
|
2024-10-23 19:41:34 -04:00
|
|
|
int display_drm(vanilla_drm_ctx_t *ctx, AVFrame *frame);
|
2024-10-21 19:52:50 -04:00
|
|
|
|
|
|
|
#endif // VANILLA_PI_DRM_H
|