Video capture support

Hi,

I’m trying this again in the mailing list after trying it in the #SDL
channel.

I would like to add support for video capture (webcam and stuff) to SDL,
as a Google Summer of Code project. I’m just saying hi and making first
contact. I would just like to know if there’s anyone that would mentor
that project, or if any decisions might already have been made regarding
the API, or any other useful information regarding that project!

Thanks,

pogo11

I have a reference for you: I’ve written a small SDL based lib for that
purpose using the v4l interface on Linux:
http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/20-sdlbgrab

The design uses a freely running grabbing thread with a
mutex-synchronized blit-to-target (i.e. screen surface). This would
allow for independent frame-grabbing to be available to a game loop
running at lower or higher frame rates for example.

–AndreasOn 4/4/10 6:35 PM, Martin Bisson wrote:

Hi,

I’m trying this again in the mailing list after trying it in the #SDL
channel.

I would like to add support for video capture (webcam and stuff) to
SDL, as a Google Summer of Code project. I’m just saying hi and
making first contact. I would just like to know if there’s anyone
that would mentor that project, or if any decisions might already have
been made regarding the API, or any other useful information regarding
that project!

Thanks,

pogo11


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Thank you. I also have written, in a non SDL context, a frame grabbing
library using DirectShow on Windows and v4l/v4l2 on Linux. I’ll look
into yours more throughly before chosen a final implementation for SDL.

Using another thread for grabbing frames is a great idea. I also want
to implement other strategies, depending on the use for the grabbed
images. For instance, if you want to display the captured images, you
probably always want to display the last captured frame and want to drop
captured frames if you get behind. But if you want to do some sort of
processing on the frames, you might not want to drop frames and might
want to use a sort of producer/consumer strategy instead.

I’d like to split the capture API in 2 parts. The first part would
encapsulate the low-level platform dependent capture code: device
initialization and acces, etc. The second part would be slightly higher
level and would control the buffering strategy: non-blocking circular
buffering, blocking circular buffering, producer/consumer, others…?

Thanks for the reference, I’ll look into it, and if you have any other
ideas/suggestions of what you would like in SDL capture API, let me know!

pogo11

Andreas Schiffler wrote:>

I have a reference for you: I’ve written a small SDL based lib for
that purpose using the v4l interface on Linux:
http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/20-sdlbgrab

The design uses a freely running grabbing thread with a
mutex-synchronized blit-to-target (i.e. screen surface). This would
allow for independent frame-grabbing to be available to a game loop
running at lower or higher frame rates for example.

–Andreas

On 4/4/10 6:35 PM, Martin Bisson wrote:

Hi,

I’m trying this again in the mailing list after trying it in the #SDL
channel.

I would like to add support for video capture (webcam and stuff) to
SDL, as a Google Summer of Code project. I’m just saying hi and
making first contact. I would just like to know if there’s anyone
that would mentor that project, or if any decisions might already
have been made regarding the API, or any other useful information
regarding that project!

Thanks,

pogo11


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

hi ya,

please see pygame as well. It has some SDL related code for this. Some of
it in C/objc and python.

cu.On Tue, Apr 6, 2010 at 12:00 PM, Martin Bisson <martin.bisson at gmail.com>wrote:

Thank you. I also have written, in a non SDL context, a frame grabbing
library using DirectShow on Windows and v4l/v4l2 on Linux. I’ll look into
yours more throughly before chosen a final implementation for SDL.

Using another thread for grabbing frames is a great idea. I also want to
implement other strategies, depending on the use for the grabbed images.
For instance, if you want to display the captured images, you probably
always want to display the last captured frame and want to drop captured
frames if you get behind. But if you want to do some sort of processing on
the frames, you might not want to drop frames and might want to use a sort
of producer/consumer strategy instead.

I’d like to split the capture API in 2 parts. The first part would
encapsulate the low-level platform dependent capture code: device
initialization and acces, etc. The second part would be slightly higher
level and would control the buffering strategy: non-blocking circular
buffering, blocking circular buffering, producer/consumer, others…?

Thanks for the reference, I’ll look into it, and if you have any other
ideas/suggestions of what you would like in SDL capture API, let me know!

pogo11

Andreas Schiffler wrote:

I have a reference for you: I’ve written a small SDL based lib for that
purpose using the v4l interface on Linux:

http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/20-sdlbgrab

The design uses a freely running grabbing thread with a mutex-synchronized
blit-to-target (i.e. screen surface). This would allow for independent
frame-grabbing to be available to a game loop running at lower or higher
frame rates for example.

–Andreas

On 4/4/10 6:35 PM, Martin Bisson wrote:

Hi,

I’m trying this again in the mailing list after trying it in the #SDL
channel.

I would like to add support for video capture (webcam and stuff) to SDL,
as a Google Summer of Code project. I’m just saying hi and making first
contact. I would just like to know if there’s anyone that would mentor that
project, or if any decisions might already have been made regarding the API,
or any other useful information regarding that project!

Thanks,

pogo11


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org