読者です 読者をやめる 読者になる 読者になる

luvcview

なんかdebainパッケージにもあがってて、debian(lenny)なら
aptitude install luvcview
で入る。
まぁそれじゃあ勉強にならないのでソースから読む。
取り合えずsvnで落としてくる。

svn checkout http://svn.quickcamteam.net/svn/luvcview/
cd luvcview/trunk/luvcview

とりあえずmakeというかんじでやったら失敗したので素直にREADMEを読む。

Required libraries:
- SDL (from http://www.libsdl.org/ or e.g. the libsdl1.2 Debian package)

Required header files:
- SDL (from http://www.libsdl.org/ or e.g. the libsdl1.2-dev Debian package)
- uvcvideo (Linux UVC driver)
- uvcdynctrl (part of libwebcam)

The JPEG encoder and decoder are now part of the package to allow for a small
footprint on embedded devices. libsdl provides the necessary layers to run on
the Linux framebuffer or an X server.

Important notes on the uvcvideo and uvcdynctrl dependencies:

	Compiling the luvcview sources requires three source files to be present.
	If you already have these projects on your system, you can link them, e.g.
	using the following commands:

	ln -s ~/uvcvideo/trunk/uvcvideo.h
	ln -s ~/uvcvideo/trunk/uvc_compat.h
	ln -s ~/libwebcam/Common/include/dynctrl-logitech.h

	Alternatively, the latest versions can be downloaded directly from the
	corresponding source code repositories:

	wget http://svn.berlios.de/svnroot/repos/linux-uvc/linux-uvc/trunk/uvcvideo.h
	wget http://svn.berlios.de/svnroot/repos/linux-uvc/linux-uvc/trunk/uvc_compat.h
	wget http://svn.quickcamteam.net/svn/qct/Linux/Common/include/dynctrl-logitech.h

Once you have the SDL headers installed and the three above header files in the
luvcview source directory you can continue as normal.

To compile luvcview simply type:

make

まぁということでここは素直に

aptitude install libsdl-dev
wget http://svn.berlios.de/svnroot/repos/linux-uvc/linux-uvc/trunk/uvcvideo.h
wget http://svn.berlios.de/svnroot/repos/linux-uvc/linux-uvc/trunk/uvc_compat.h
wget http://svn.quickcamteam.net/svn/qct/Linux/Common/include/dynctrl-logitech.h
cp *.h luvcview/trunk/luvcview/
cd luvcview/trunk/luvcview/
make

これで無事makeできる。