gentlsrc: add producer property to select between EVT and Basler

This is still a bandaid fix until we properly parse the XML files
This commit is contained in:
Joshua M. Doe
2021-05-26 10:32:13 -04:00
parent 765662aa82
commit 8e34238034
2 changed files with 137 additions and 37 deletions

View File

@@ -38,6 +38,40 @@ G_BEGIN_DECLS
typedef struct _GstGenTlSrc GstGenTlSrc;
typedef struct _GstGenTlSrcClass GstGenTlSrcClass;
typedef struct _GstGenTlProducer GstGenTlProducer;
struct _GstGenTlProducer
{
gchar* cti_path;
guint32 acquisition_mode_value;
guint64 width;
guint64 height;
guint64 pixel_format;
guint64 payload_size;
guint64 acquisition_mode;
guint64 acquisition_start;
guint64 acquisition_stop;
guint64 tick_frequency_low;
guint64 tick_frequency_high;
guint64 timestamp_control_latch;
guint64 timestamp_low;
guint64 timestamp_high;
};
/**
* GstGenTlSrcProducer:
* @GST_GENTLSRC_PRODUCER_BASLER: Basler producer
* @GST_GENTLSRC_PRODUCER_EVT: EVT producer
*
* Producer to use.
*/
typedef enum {
GST_GENTLSRC_PRODUCER_BASLER,
GST_GENTLSRC_PRODUCER_EVT,
} GstGenTlSrcProducer;
struct _GstGenTlSrc
{
GstPushSrc base_gentlsrc;
@@ -50,8 +84,10 @@ struct _GstGenTlSrc
PORT_HANDLE hDevPort;
EVENT_HANDLE hNewBufferEvent;
char error_string[MAX_ERROR_STRING_LEN];
GstGenTlProducer producer;
/* properties */
GstGenTlSrcProducer producer_prop;
guint interface_index;
gchar *interface_id;
guint device_index;