GSOC Week 3-4
The past two weeks I was busy studying for my examinations, so I didn’t have much time to work on my GSOC project. However I was able to do a lot of work to get the PyCameraObject struct integrated in the existing code and implemented some additional functions.
Here is the definition of this struct, it isn’t completed yet because some “types” I would like to put into it cause compile errors.
PyCameraObject:
typedef struct {
PyObject_HEAD
char* device_name; // unieke name of the device
SeqGrabComponent component; // A type used by the Sequence Grabber API
SGChannel channel; // Channel of the Sequence Grabber
GWorldPtr gWorld; // Pointer to the struct that holds the data of the captured image
Rect boundsRect; // bounds of the image frame
} PyCameraObject;
In addition of implementing the PyCameraObject struct, I have writen the folowing functions.
-
mac_device_init():
This function initializes the sequence grabber component and prepares it for capturing images. -
mac_device_close():
I have extended this function so it works with the PyCameraObject struct. -
mac_start_capturing():
At this moment this function -
camera_start():
This function just calls the above functions. -
camera_get_size():
Simple function that returns the size of the image frame.
Schedule for this week
This week I am planning to finish the mac_start_capturing function so that I can capture images from my camera an put then in a SDL_Surface object. As usional you can folow my work on my github account.