Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Oct 2007 09:44:28 +0200
From:      Heiko Recktenwald <heikorecktenwald@gmail.com>
To:        freebsd-multimedia@freebsd.org
Subject:   Re: multimedia/gtk-setpwc?
Message-ID:  <470C82DC.3000807@gmail.com>

next in thread | raw e-mail | index | archive | help

Hi,


>> Tried to compile setpwc, dont know which changes to make to which files
>> and where, allthough it looked like a good starter to learn C. Something
>> was missing, with gmake and make.
>>
> Please post the error messages. Perhaps someone can help you out.
>   
http://www.vanheusden.com/setpwc/setpwc-1max$ tar -xzvpf set*
x setpwc-1.2/
x setpwc-1.2/setpwc.c
x setpwc-1.2/pwc-ioctl.h
x setpwc-1.2/setpwc.1
x setpwc-1.2/readme.txt
x setpwc-1.2/Makefile
x setpwc-1.2/license.tx.2.tgz


max$ gmake
cc -Wall -O2 -DVERSION=\"1.2\"   -c -o setpwc.o setpwc.c
setpwc.c:26:28: linux/videodev.h: No such file or directory
setpwc.c: In function `dump_current_settings':
setpwc.c:66: error: storage size of 'vcap' isn't known
setpwc.c:67: error: storage size of 'vwin' isn't known
setpwc.c:68: error: storage size of 'vpic' isn't known
setpwc.c:78: error: `VIDIOCGCAP' undeclared (first use in this function)
setpwc.c:78: error: (Each undeclared identifier is reported only once
setpwc.c:78: error: for each function it appears in.)
setpwc.c:94: error: `VIDIOCGWIN' undeclared (first use in this function)
setpwc.c:102: error: `VIDIOCGPICT' undeclared (first use in this function)
setpwc.c:111: error: `VIDEO_PALETTE_GREY' undeclared (first use in this 
function)
setpwc.c:114: error: `VIDEO_PALETTE_HI240' undeclared (first use in this 
function)
setpwc.c:117: error: `VIDEO_PALETTE_RGB565' undeclared (first use in 
this function)
setpwc.c:120: error: `VIDEO_PALETTE_RGB555' undeclared (first use in 
this function)
setpwc.c:123: error: `VIDEO_PALETTE_RGB24' undeclared (first use in this 
function)
setpwc.c:126: error: `VIDEO_PALETTE_RGB32' undeclared (first use in this 
function)
setpwc.c:129: error: `VIDEO_PALETTE_YUV422' undeclared (first use in 
this function)
setpwc.c:132: error: `VIDEO_PALETTE_YUYV' undeclared (first use in this 
function)
setpwc.c:135: error: `VIDEO_PALETTE_UYVY' undeclared (first use in this 
function)
setpwc.c:138: error: `VIDEO_PALETTE_YUV420' undeclared (first use in 
this function)
setpwc.c:141: error: `VIDEO_PALETTE_YUV411' undeclared (first use in 
this function)
setpwc.c:144: error: `VIDEO_PALETTE_RAW' undeclared (first use in this 
function)
setpwc.c:147: error: `VIDEO_PALETTE_YUV422P' undeclared (first use in 
this function)
setpwc.c:150: error: `VIDEO_PALETTE_YUV411P' undeclared (first use in 
this function)
setpwc.c:138: error: `VIDEO_PALETTE_YUV420' undeclared (first use in 
this function)
setpwc.c:141: error: `VIDEO_PALETTE_YUV411' undeclared (first use in 
this function)
setpwc.c:144: error: `VIDEO_PALETTE_RAW' undeclared (first use in this 
function)
setpwc.c:147: error: `VIDEO_PALETTE_YUV422P' undeclared (first use in 
this function)
setpwc.c:150: error: `VIDEO_PALETTE_YUV411P' undeclared (first use in 
this function)
setpwc.c:153: error: `VIDEO_PALETTE_YUV420P' undeclared (first use in 
this function)
setpwc.c:156: error: `VIDEO_PALETTE_YUV410P' undeclared (first use in 
this function)
setpwc.c:66: warning: unused variable `vcap'
setpwc.c:67: warning: unused variable `vwin'
setpwc.c:68: warning: unused variable `vpic'
setpwc.c: In function `set_dimensions_and_framerate':
setpwc.c:288: error: storage size of 'vwin' isn't known
setpwc.c:291: error: `VIDIOCGWIN' undeclared (first use in this function)
setpwc.c:306: error: `VIDIOCSWIN' undeclared (first use in this function)
setpwc.c:288: warning: unused variable `vwin'
gmake: *** [setpwc.o] Error 1
max$


>From the Makefile:


VERSION=1.2
CFLAGS+=-Wall -O2 -DVERSION=\"$(VERSION)\"
LDFLAGS=

OBJS=setpwc.o

all: setpwc

setpwc: $(OBJS)
       $(CC) -Wall -W $(OBJS) $(LDFLAGS) -o setpwc
       #

>From setpwc.c:


#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#define _LINUX_TIME_H 1 /* to get things compile on kernel 2.6.x */
#include <linux/videodev.h>

#include "pwc-ioctl.h"

char *device = "/dev/video0";


#define SET_PAN         0
#define SET_TILT        1

void error_exit(char *what_ioctl)
{
       fprintf(stderr, "Error while doing ioctl %s: %s\n", what_ioctl, 
strerror

       /* commented out: some versions of the driver seem to return
        * unexpected errors */
       /* exit(1); */
}

etc.


Thanks, H.








Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?470C82DC.3000807>