On Fri, Feb 24, 2006 at 10:24:29AM +0100, Lars Andre Sunde wrote:
>
> I'd like develope an application that access the pwc web-cam video stream
> using c++. After successfully installing the driver I wanted to make a
> proto_type program to try and read some data from the web-camera. In
> Kenneth Lavrsen's API introduction it says to include #include
You don't need to pwc-ioctl.h to grab video stream from the driver. You need
to use the v4l2 api. But if you need to access some internal parameter of the
driver, two choices:
- using private ioctl (so you need to include your own copy of pwc-ioctl.h)
- using v4l2 parameter [1]
[0] http://www.linuxtv.org/v4lwiki/index.php/Main_Page
[1] http://www.linuxtv.org/downloads/video4linux/API/V4L2_API/spec/r6563.htm
> The problem is the first time I try to compile it;
> g++ -o example example.cc
> I get "pwc-ioctl.h no such file or directory" error from the compiler.
Copy pwc-ioctl.h from the driver to your application. Or set the path to
include.
> So then I add an include that points to the downloaded pwc-10.0.11 source
> code (where I know a copy of pwc-ioctl.h is located);
> g++ -I/usr/pwc -o example example.cc
> however this gives me
> /usr/pwc/pwc-ioctl.h:315: error: '__le16' is used as a type, but is not
> defined as a type.
> /usr/pwc/pwc-ioctl.h:316: error: '__le16' is used as a type, but is not
> defined as a type.
> error message.
As said above you don't have change __le16 by __u16 because you use an old
kernel. Yes it's a bug but as i've not time to support older kernel, you need
to be smart.
Luc
_______________________________________________
pwc mailing list
http://lists.saillard.org/mailman/listinfo/pwc
|