summaryrefslogtreecommitdiff
path: root/gpu.h
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 /gpu.h
parent71c1a8a02a3f33d1e49d8c6cf0a4b23016b63bc0 (diff)
Restructure gpu frames interface and handling
Diffstat (limited to 'gpu.h')
-rw-r--r--gpu.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/gpu.h b/gpu.h
index 0f0d71d..f8fa886 100644
--- a/gpu.h
+++ b/gpu.h
@@ -24,6 +24,11 @@
#include "colorspace.h"
+struct GpuFrame {
+ uint32_t width;
+ uint32_t height;
+};
+
struct GpuFramePlane {
int dmabuf_fd;
uint32_t pitch;
@@ -33,16 +38,15 @@ struct GpuFramePlane {
struct GpuContext* GpuContextCreate(enum YuvColorspace colorspace,
enum YuvRange range);
-bool GpuContextSync(struct GpuContext* gpu_context);
+struct GpuFrame* GpuContextCreateFrame(struct GpuContext* gpu_context,
+ uint32_t width, uint32_t height,
+ uint32_t fourcc, size_t nplanes,
+ const struct GpuFramePlane* planes);
+bool GpuContextConvertFrame(struct GpuContext* gpu_context,
+ const struct GpuFrame* from,
+ const struct GpuFrame* to);
+void GpuContextDestroyFrame(struct GpuContext* gpu_context,
+ struct GpuFrame* gpu_frame);
void GpuContextDestroy(struct GpuContext* gpu_context);
-struct GpuFrame* GpuFrameCreate(struct GpuContext* gpu_context, uint32_t width,
- uint32_t height, uint32_t fourcc,
- size_t nplanes,
- const struct GpuFramePlane* planes);
-void GpuFrameGetSize(const struct GpuFrame* gpu_frame, uint32_t* width,
- uint32_t* height);
-bool GpuFrameConvert(const struct GpuFrame* from, const struct GpuFrame* to);
-void GpuFrameDestroy(struct GpuFrame* gpu_frame);
-
#endif // STREAMER_GPU_H_