[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] progress on camera module
- To: pygame-users@xxxxxxxx
- Subject: [pygame] progress on camera module
- From: el lauwer <el.lauwer@xxxxxxxxx>
- Date: Sun, 28 Jun 2009 00:38:47 +0200
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sat, 27 Jun 2009 18:38:52 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :content-type:content-transfer-encoding:mime-version:subject:date :x-mailer; bh=92TZlPEAx3sNRhOotmMmHy5kKKAC6yuHPosQf5ky698=; b=uEQVm1liAl9t4mGHBaR8n0t/DGi8UKj0UEw9gUrWGG85NU5dPVCiEQ1qK80zxTWKiw fmxcCIZ8c2Y9cWx1ZwjNpPz9wEgKUm8vRLd9jjLzD/U24HHPqG3dek2ZlhmAi+I3qy76 PIgWi4A0BsvDegQ9UD7zbydFSBygIrkrgO2cY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=FPMZz3bdBs9y9Z4wPZZDcKXOXSl9sNF98PDDwtVgZC800j0PNL3fywfJ1/SQsvk96m vy6ti05V9WVVMA308u6JenJV2EonEoqVqZYQOgaoxHzc6Hx3WMRaJNOIlLzhrro48h0b 5udyR1eUgspNlz3lY6RqPTWRjE9wwYvMrgHQA=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hoi,
Nirav Patel asked me to post the info on my blog on this mailing list,
so here is for those that who are interested:
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.