summaryrefslogtreecommitdiff
path: root/capture.c
diff options
context:
space:
mode:
authorMikhail Burakov <mburakov@mailbox.org>2023-04-12 07:07:28 +0200
committerMikhail Burakov <mburakov@mailbox.org>2023-04-12 07:07:28 +0200
commit0b3848db08cf78c6c5396f7b03a32d6074a0c48b (patch)
tree9c17d2b9433c4cf66a8881afdf231e8b246d1b06 /capture.c
parent71c1a8a02a3f33d1e49d8c6cf0a4b23016b63bc0 (diff)
Restructure gpu frames interface and handling
Diffstat (limited to 'capture.c')
-rw-r--r--capture.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/capture.c b/capture.c
index cca4ce3..72a641d 100644
--- a/capture.c
+++ b/capture.c
@@ -135,7 +135,8 @@ const struct GpuFrame* CaptureContextGetFrame(
return NULL;
if (capture_context->gpu_frame) {
- GpuFrameDestroy(capture_context->gpu_frame);
+ GpuContextDestroyFrame(capture_context->gpu_context,
+ capture_context->gpu_frame);
capture_context->gpu_frame = NULL;
}
@@ -155,7 +156,7 @@ const struct GpuFrame* CaptureContextGetFrame(
planes[nplanes].modifier = drm_mode_fb_cmd2.modifier[nplanes];
}
- capture_context->gpu_frame = GpuFrameCreate(
+ capture_context->gpu_frame = GpuContextCreateFrame(
capture_context->gpu_context, drm_mode_fb_cmd2.width,
drm_mode_fb_cmd2.height, drm_mode_fb_cmd2.pixel_format, nplanes, planes);
@@ -165,7 +166,10 @@ release_planes:
}
void CaptureContextDestroy(struct CaptureContext* capture_context) {
- if (capture_context->gpu_frame) GpuFrameDestroy(capture_context->gpu_frame);
+ if (capture_context->gpu_frame) {
+ GpuContextDestroyFrame(capture_context->gpu_context,
+ capture_context->gpu_frame);
+ }
drmClose(capture_context->drm_fd);
free(capture_context);
}