diff options
author | Mikhail Burakov <mburakov@mailbox.org> | 2023-10-15 09:28:50 +0200 |
---|---|---|
committer | Mikhail Burakov <mburakov@mailbox.org> | 2023-10-15 16:36:02 +0200 |
commit | 9adec996efea0356547e797b36046103bec449e0 (patch) | |
tree | 456ee32048b38ba73085eb0487b1376088f320a7 /capture.h | |
parent | 0e3c61abed24e2fec2148b22fe204e28074f1e90 (diff) |
Preparations for adding wlr capturing
Diffstat (limited to 'capture.h')
-rw-r--r-- | capture.h | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -18,13 +18,21 @@ #ifndef STREAMER_CAPTURE_H_ #define STREAMER_CAPTURE_H_ +#include <stdbool.h> + struct CaptureContext; struct GpuContext; struct GpuFrame; -struct CaptureContext* CaptureContextCreate(struct GpuContext* gpu_context); -const struct GpuFrame* CaptureContextGetFrame( - struct CaptureContext* capture_context); +struct CaptureContextCallbacks { + void (*OnFrameReady)(void* user, const struct GpuFrame* gpu_frame); +}; + +struct CaptureContext* CaptureContextCreate( + struct GpuContext* gpu_context, + const struct CaptureContextCallbacks* callbacks, void* user); +int CaptureContextGetEventsFd(struct CaptureContext* capture_context); +bool CaptureContextProcessEvents(struct CaptureContext* capture_context); void CaptureContextDestroy(struct CaptureContext* capture_context); #endif // STREAMER_CAPTURE_H_ |