summaryrefslogtreecommitdiff
path: root/capture.h
diff options
context:
space:
mode:
authorMikhail Burakov <mburakov@mailbox.org>2023-10-15 09:28:50 +0200
committerMikhail Burakov <mburakov@mailbox.org>2023-10-15 16:36:02 +0200
commit9adec996efea0356547e797b36046103bec449e0 (patch)
tree456ee32048b38ba73085eb0487b1376088f320a7 /capture.h
parent0e3c61abed24e2fec2148b22fe204e28074f1e90 (diff)
Preparations for adding wlr capturing
Diffstat (limited to 'capture.h')
-rw-r--r--capture.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/capture.h b/capture.h
index 7b0b60d..a56a5d2 100644
--- a/capture.h
+++ b/capture.h
@@ -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_