pylonsrc: move global variables to be instance variables

This commit is contained in:
Joshua M. Doe
2020-04-06 14:51:17 -04:00
parent c0f68e83d3
commit 2099e46e72
2 changed files with 24 additions and 17 deletions

View File

@@ -24,6 +24,8 @@
#include <gst/base/gstpushsrc.h>
#include "pylonc/PylonC.h"
#define NUM_CAPTURE_BUFFERS 10
G_BEGIN_DECLS
#define GST_TYPE_PYLONSRC (gst_pylonsrc_get_type())
@@ -43,6 +45,10 @@ struct _GstPylonSrc
PYLON_DEVICE_HANDLE deviceHandle; // Handle for the camera.
PYLON_STREAMGRABBER_HANDLE streamGrabber; // Handler for camera's streams.
PYLON_WAITOBJECT_HANDLE waitObject; // Handles timing out in the main loop.
gboolean deviceConnected;
unsigned char *buffers[NUM_CAPTURE_BUFFERS];
PYLON_STREAMBUFFER_HANDLE bufferHandle[NUM_CAPTURE_BUFFERS];
int32_t frameSize; // Size of a frame in bytes.
int32_t payloadSize; // Size of a frame in bytes.