Files
gst-plugin-linescan/gst/intervalometer/gstintervalometer.h
yair 73afb1f671 feat: Add Linux ARM64 support and cleanup build system
- Add ARM64 architecture support for Linux builds
- Fix case-sensitive header includes (ueye.h → uEye.h) for Unix systems
- Update CMake modules to find ARM64 library paths:
  * Add /opt/ids/ueye/lib/aarch64-linux-gnu for IDS uEye SDK
  * Add aarch64-linux-gnu paths to GStreamer module
- Add ARM64 packaging support in main CMakeLists.txt
- Make intervalometer conditional on IDS uEye availability
- Remove 28 unused CMake Find modules for camera vendors:
  * ATK, Aptina, Bitflow, Cairo, EDT, Euresys, FreeImage
  * GigESim, Glew, GTK2, Imperx, IOtech, KAYA, Matrox
  * National Instruments, OpenCV, OpenGL, Phoenix, Pleora
  * Pylon, QCam, Sapera, XCLIB, and utility libraries
- Retain only essential modules for GStreamer plugin development

Successfully builds all 8 plugins on ARM64: idsueye, intervalometer,
linescan, bayerutils, extractcolor, select, misb, videoadjust

Tested on: Linux ARM64 (aarch64) with GStreamer 1.16.3
2025-11-26 18:02:21 +00:00

116 lines
4.1 KiB
C

/* GStreamer
* Copyright (C) 2024 FIXME <fixme@example.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_INTERVALOMETER_H__
#define __GST_INTERVALOMETER_H__
#include <stdio.h>
#include <gst/base/gstbasetransform.h>
#include <gst/video/video.h>
#define _PURE_C
#include "../../sys/idsueye/include/uEye.h"
G_BEGIN_DECLS
#define GST_TYPE_INTERVALOMETER \
(gst_intervalometer_get_type())
#define GST_INTERVALOMETER(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_INTERVALOMETER,GstIntervalometer))
#define GST_INTERVALOMETER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_INTERVALOMETER,GstIntervalometerClass))
#define GST_IS_INTERVALOMETER(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_INTERVALOMETER))
#define GST_IS_INTERVALOMETER_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_INTERVALOMETER))
typedef struct _GstIntervalometer GstIntervalometer;
typedef struct _GstIntervalometerClass GstIntervalometerClass;
typedef enum {
RAMP_RATE_VSLOW = 0,
RAMP_RATE_SLOW,
RAMP_RATE_MEDIUM,
RAMP_RATE_FAST,
RAMP_RATE_VFAST
} GstIntervalometerRampRate;
/**
* GstIntervalometer:
* @element: the parent element.
*
* Auto-exposure controller for IDS uEye cameras.
* Inspired by YASS (Yet Another Sunset Script) for CHDK cameras.
*/
struct _GstIntervalometer
{
GstBaseTransform element;
/* Properties */
gboolean enabled;
gdouble target_brightness; /* Target average brightness (0-255) */
gdouble compensation; /* Exposure compensation in stops */
gdouble exposure_min; /* Minimum exposure in ms */
gdouble exposure_max; /* Maximum exposure in ms */
gint gain_min; /* Minimum gain (0-100) */
gint gain_max; /* Maximum gain (0-100) */
GstIntervalometerRampRate ramp_rate;
gchar *log_file; /* CSV log file path */
gchar *camera_element_name; /* Name of upstream idsueyesrc element */
guint update_interval; /* Update interval in milliseconds */
gdouble brightness_smoothing; /* Brightness smoothing factor (0-1, 0=no smoothing) */
gdouble brightness_deadband; /* Deadband zone to prevent oscillation (0=disabled) */
/* Internal state */
GstElement *camera_src; /* Reference to upstream camera element */
HIDS hCam; /* IDS uEye camera handle from idsueyesrc */
gdouble current_exposure; /* Current exposure setting */
gint current_gain; /* Current gain setting */
gdouble target_exposure; /* Target exposure for ramping */
gint target_gain; /* Target gain for ramping */
guint64 frame_count; /* Number of frames processed */
GstClockTime start_time; /* Time when processing started */
GstClockTime last_update_time; /* Time of last algorithm update */
FILE *log_fp; /* Log file handle */
gboolean log_header_written; /* Whether CSV header has been written */
/* Video info */
GstVideoInfo video_info;
gboolean video_info_valid;
/* Brightness smoothing */
gdouble smoothed_brightness; /* Exponentially smoothed brightness value */
gboolean brightness_initialized; /* Whether smoothed_brightness has been initialized */
/* Ramping parameters */
gdouble ramp_step; /* Current ramping step size */
};
struct _GstIntervalometerClass
{
GstBaseTransformClass parent_class;
};
GType gst_intervalometer_get_type(void);
G_END_DECLS
#endif /* __GST_INTERVALOMETER_H__ */