diff options
author | Mikhail Burakov <mburakov@mailbox.org> | 2023-04-12 07:07:28 +0200 |
---|---|---|
committer | Mikhail Burakov <mburakov@mailbox.org> | 2023-04-12 07:07:28 +0200 |
commit | 0b3848db08cf78c6c5396f7b03a32d6074a0c48b (patch) | |
tree | 9c17d2b9433c4cf66a8881afdf231e8b246d1b06 /gpu.h | |
parent | 71c1a8a02a3f33d1e49d8c6cf0a4b23016b63bc0 (diff) |
Restructure gpu frames interface and handling
Diffstat (limited to 'gpu.h')
-rw-r--r-- | gpu.h | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -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_ |