#ifndef __GST_WESTONIMAGESRC_H__ #define __GST_WESTONIMAGESRC_H__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "weston-screenshooter-client-protocol.h" #include "shared/os-compatibility.h" #include "shared/xalloc.h" #include "shared/file-util.h" G_BEGIN_DECLS #define GST_TYPE_WESTONIMAGESRC (gst_westonimagesrc_get_type()) #define GST_WESTONIMAGESRC(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_WESTONIMAGESRC, GstWestonImageSrc)) #define GST_WESTONIMAGESRC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_WESTONIMAGESRC, GstWestonImageSrcClass)) #define GST_IS_WESTONIMAGESRC(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_WESTONIMAGESRC)) #define GST_IS_WESTONIMAGESRC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_WESTONIMAGESRC)) typedef struct _GstWestonImageSrc GstWestonImageSrc; typedef struct _GstWestonImageSrcClass GstWestonImageSrcClass; struct _GstWestonImageSrc { GstBaseSrc element; GMutex lock; GCond cond; gboolean running; guint timeout_id; guint64 offset; // Счетчик отправленных сообщений gdouble framerate; }; struct _GstWestonImageSrcClass { GstBaseSrcClass parent_class; }; GType gst_westonimagesrc_get_type(void); G_END_DECLS // Screenshoter logic related declarations and defines struct screenshooter_output { struct wl_output *output; struct wl_buffer *buffer; int width, height, offset_x, offset_y; void *data; struct wl_list link; }; struct buffer_size { int width, height; int min_x, min_y; int max_x, max_y; }; struct screenshooter_data { struct wl_shm *shm; struct wl_list output_list; struct weston_screenshooter *screenshooter; int buffer_copy_done; }; // Weston related structures struct wl_display *display; struct wl_registry *registry; struct screenshooter_output *output; struct buffer_size buff_size = {}; struct screenshooter_data sh_data = {}; #endif /* __GST_WESTONIMAGESRC_H__ */