add plugin camera desktop

This commit is contained in:
kyo
2026-06-22 09:39:31 +07:00
parent 92daeef0c5
commit 5407afbd6e
144 changed files with 15900 additions and 1 deletions

View File

@@ -0,0 +1,30 @@
#ifndef CAMERA_TEXTURE_H_
#define CAMERA_TEXTURE_H_
#include <flutter_linux/flutter_linux.h>
G_BEGIN_DECLS
#define CAMERA_TEXTURE_TYPE (camera_texture_get_type())
G_DECLARE_FINAL_TYPE(CameraTexture, camera_texture, CAMERA, TEXTURE,
FlPixelBufferTexture)
// Creates a new CameraTexture instance.
CameraTexture* camera_texture_new(void);
// Updates the texture with new RGBA frame data.
// |data| must point to tightly-packed RGBA pixels (stride == width * 4).
// |width| and |height| are the frame dimensions.
// This is called from the GStreamer streaming thread; it writes to the
// internal write buffer and swaps it into the ready slot.
void camera_texture_update(CameraTexture* self,
const uint8_t* data,
uint32_t width,
uint32_t height);
// Returns the FlTexture base pointer (for registrar calls).
FlTexture* camera_texture_as_fl_texture(CameraTexture* self);
G_END_DECLS
#endif // CAMERA_TEXTURE_H_