[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-video
Subject:    How to go about writing a webcam module? (xawtv, v4l, v4l2)
From:       Doru-Catalin Togea <doru-cat () ifi ! uio ! no>
Date:       2004-06-24 18:51:35
Message-ID: Pine.LNX.4.58.0406242021570.7783 () viisi ! ifi ! uio ! no
[Download RAW message or body]

Hi!

I am runing RedHat 9.0, kernel 2.4.20, and I have a Logitech 4000 Pro
webcam which works with applications like xawtv's webcam and camstream.

I need a C++ webcam module for the application system I work with in
connection with my master's thesis, and I do not know how to go about
creating it.

1) I have studied quite a bit the webcam code that comes with xawtv and I
wonder how to incorporate the relevant parts of it into my module. Since
my module is in directory M and xawtv source code is in directory X, I
tried to include header files in my code like this:

	#include "X/headerFile1.h"

This does not work because headerFile1.h refers to other header files
which are "local" in directory X but not in my directory M.

I managed so far to create a few extra functions of my own within the
webcam.c file which comes with xawtv, which do what I need for my module,
by I do not know how to interface the webcam.o file which the compilation
of xawtv produces.

My idea was to let the compilation of xawtv create the augmented object
file, and then call these functions from my module and get my job done.

How do I tell the compiler when I compile my module, that these functions
are in X/.../webcam.o? I know that I can link agains object files, but my
compilation does not reach the linking stage, because, as far as my module
is concerned, these functions I havfe writen  are undefined.

2) Should I rather implement my module dy means of the v4l interface? This
method would be conceptually cleaner, but then I would reinvent (part
of) the wheel, as others have already made webcam applications.

3) Should I use v4l2, rather then v4l?

Thanks for any help you can give.
Catalin

-- 

        <<<< ================================== >>>>
        <<     We are what we repeatedly do.      >>
        <<  Excellence, therefore, is not an act  >>
        <<             but a habit.               >>
        <<<< ================================== >>>>


--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic