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,18 @@
#ifndef PHOTO_HANDLER_H_
#define PHOTO_HANDLER_H_
#include <gst/gst.h>
#include <string>
class PhotoHandler {
public:
// Captures a still image from the appsink's last-sample property (read-only,
// no consumer conflict with the preview stream). Converts the RGBA frame to
// JPEG via gst_video_convert_sample and writes it to |output_path|.
// Returns true on success; sets |error| on failure.
static bool TakePicture(GstElement* appsink,
const std::string& output_path,
GError** error);
};
#endif // PHOTO_HANDLER_H_