File Coverage

blib/lib/Device/Video/PWC.pm
Criterion Covered Total %
statement 9 30 30.0
branch n/a
condition 0 2 0.0
subroutine 3 11 27.2
pod 8 8 100.0
total 20 51 39.2


line stmt bran cond sub pod time code
1             package Device::Video::PWC;
2              
3 1     1   719 use strict;
  1         2  
  1         33  
4 1     1   5 use warnings;
  1         2  
  1         44  
5              
6             our $VERSION = '0.11';
7              
8 1     1   5 use XSLoader;
  1         2  
  1         455  
9             XSLoader::load('Device::Video::PWC', $VERSION);
10             #=======================================================================
11             sub new {
12 0     0 1   my ($class, $device) = @_;
13            
14 0           my $self = bless { device => $device }, $class;
15            
16 0   0       $self->set_device( $device || q[/dev/video0] );
17            
18 0           return $self;
19             }
20             #=======================================================================
21             sub set_pan {
22 0     0 1   my ($self, $val) = @_;
23            
24 0           $self->set_pan_or_tilt( 0, $val );
25            
26 0           return;
27             }
28             #=======================================================================
29             sub set_tilt {
30 0     0 1   my ($self, $val) = @_;
31            
32 0           $self->set_pan_or_tilt( 1, $val );
33            
34 0           return;
35             }
36             #=======================================================================
37             sub set_framerate {
38 0     0 1   my ($self, $val) = @_;
39            
40 0           $self->set_dimensions_and_framerate( 0, 0, $val );
41            
42 0           return;
43             }
44             #=======================================================================
45             sub red_balance {
46 0     0 1   my( $self, $val ) = @_;
47            
48 0           $self->set_automatic_white_balance_mode_red( $val );
49             }
50             #=======================================================================
51             sub blue_balance {
52 0     0 1   my( $self, $val ) = @_;
53            
54 0           $self->set_automatic_white_balance_mode_blue( $val );
55             }
56             #=======================================================================
57             sub reset_pan {
58 0     0 1   my ($self) = @_;
59            
60 0           $self->reset_pan_tilt( 0 );
61             }
62             #=======================================================================
63             sub reset_tilt {
64 0     0 1   my ($self) = @_;
65            
66 0           $self->reset_pan_tilt( 1 );
67             }
68             #=======================================================================
69             1;
70            
71             __END__