1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
#!/usr/bin/perl
print <<EOF;
#
# This file was automatically generated by genacc,
# modifications will be lost!
#
PROTOTYPES: DISABLE
EOF
while(<DATA>) {
chomp;
if (/::/) {
$pkg = $_;
print "\nMODULE = Video::Capture::V4l PACKAGE = $pkg\n\n";
} elsif (/^(.*?)(\w+\??)$/) {
my ($type,$field) = ($1,$2);
my $ro = $field =~ s/\?$//;
my $get = "RETVAL = s->$field;";
my $set = "s->$field = $field;";
if ($type eq "char *") {
$get = "RETVAL = s->$field;";
$set = "strcpy (s->$field, $field);";
}
if ($ro) {
$set = "croak (\"attribute '$field' is readonly\");";
}
print <<EOF;
$type
$field(s,$field=0)
$pkg s
$type $field
CODE:
if (items==1)
{ $get }
else
{ $set }
OUTPUT:
RETVAL
EOF
}
}
__END__
Video::Capture::V4l::Capability
char *name?
int type?
int channels?
int audios?
int maxwidth?
int maxheight?
int minwidth?
int minheight?
Video::Capture::V4l::Channel
int channel
char *name?
int tuners?
U32 flags?
U16 type?
U16 norm
Video::Capture::V4l::Audio
int audio
U16 volume
U16 bass
U16 treble
U32 flags
char *name?
U16 mode
U16 balance
U16 step
Video::Capture::V4l::Picture
U16 brightness
U16 hue
U16 colour
U16 contrast
U16 whiteness
U16 depth
U16 palette
Video::Capture::V4l::Tuner
int tuner
char *name?
unsigned long rangelow?
unsigned long rangehigh?
U32 flags?
U16 mode
U16 signal?
|