ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Linux-DVB/DVB.pm
(Generate patch)

Comparing Linux-DVB/DVB.pm (file contents):
Revision 1.10 by root, Tue Apr 12 01:22:04 2005 UTC vs.
Revision 1.17 by root, Sun Jun 14 13:39:13 2015 UTC

19 19
20Noteworthy differences to the C API: unions and sub-structs are usually 20Noteworthy differences to the C API: unions and sub-structs are usually
21translated into flat perl hashes, i.e C<struct.u.qam.symbol_rate> 21translated into flat perl hashes, i.e C<struct.u.qam.symbol_rate>
22becomes C<< $struct->{symbol_rate} >>. 22becomes C<< $struct->{symbol_rate} >>.
23 23
24Noteworthy limitations of this module include: no way to set the 24Noteworthy limitations of this module include: No interface to the video,
25frequency or diseqc. No interface to the video, audio and net devices.
26If you need this functionality bug the author. 25audio and net devices. If you need this functionality bug the author.
27 26
28=cut 27=cut
29 28
30package Linux::DVB; 29package Linux::DVB;
31 30
32use Fcntl (); 31use Fcntl ();
33 32
34BEGIN { 33BEGIN {
35 $VERSION = '0.4'; 34 $VERSION = '1.03';
36 @ISA = qw(Exporter); 35 @ISA = qw(Exporter);
37 36
38 require XSLoader; 37 require XSLoader;
39 XSLoader::load __PACKAGE__, $VERSION; 38 XSLoader::load __PACKAGE__, $VERSION;
40 39
106 %$self = ( %$self, %{ $self->frontend_info } ); 105 %$self = ( %$self, %{ $self->frontend_info } );
107 106
108 $self; 107 $self;
109} 108}
110 109
111sub frontend_info { _frontend_info ($_[0]{fd}) }
112sub status { _read_status ($_[0]{fd}) }
113sub ber { _read_ber ($_[0]{fd}) }
114sub snr { _snr ($_[0]{fd}) }
115sub signal_strength { _signal_strength ($_[0]{fd}) }
116sub uncorrected { _uncorrected ($_[0]{fd}) }
117
118=item $fe->set (parameter => value, ...) 110=item $fe->set (parameter => value, ...)
119 111
120Sets frontend parameters. All values are stuffed into the 112Sets frontend parameters. All values are stuffed into the
121C<dvb_frontend_parameters> structure without conversion and passed to 113C<dvb_frontend_parameters> structure without conversion and passed to
122FE_SET_FRONTEND. 114FE_SET_FRONTEND.
134 fec_inner => 126 fec_inner =>
135 127
136QAM frontends: 128QAM frontends:
137 129
138 symbol_rate => 130 symbol_rate =>
139 fec_inner =>
140 modulation => 131 modulation =>
141 132
142QFDM frontends: 133QFDM frontends:
143 134
144 bandwidth => 135 bandwidth =>
165 156
166 { 157 {
167 frequency => 426000000, # 426 Mhz 158 frequency => 426000000, # 426 Mhz
168 inversion => 0, # INVERSION_OFF 159 inversion => 0, # INVERSION_OFF
169 symbol_rate => 6900000, # 6.9 MB/s 160 symbol_rate => 6900000, # 6.9 MB/s
170 fec_inner => 0, # FEC_NONE
171 modulation => 3, # QAM_64 161 modulation => 3, # QAM_64
172 } 162 }
173 163
174=cut 164=cut
175 165
176sub parameters { _get ($_[0]{fd}, $_[0]{type}) } 166sub parameters { _get ($_[0]{fd}, $_[0]{type}) }
177sub get { _get ($_[0]{fd}, $_[0]{type}) } # unannounced alias 167sub get { _get ($_[0]{fd}, $_[0]{type}) } # unannounced alias
178sub event { _event ($_[0]{fd}, $_[0]{type}) } 168sub event { _event ($_[0]{fd}, $_[0]{type}) }
169
170=item $ok = $fe->diseqc_reset_overload
171
172If the bus has been automatically powered off due to power overload, this
173call restores the power to the bus. The call requires read/write access
174to the device. This call has no effect if the device is manually powered
175off. Not all DVB adapters support this call.
176
177=item $ok = $fe->diseqc_voltage (13|18)
178
179Set the DiSEqC voltage to either 13 or 18 volts.
180
181=item $ok = $fe->diseqc_tone (1|0)
182
183Enables (1) or disables (0) the DiSEqC continuous 22khz tone generation.
184
185=item $ok = $fe->diseqc_send_burst (0|1)
186
187Sends a 22KHz tone burst of type SEC_MINI_A (0) or SEC_MINI_B (1).
188
189=item $ok = $fe->diseqc_cmd ($command)
190
191Sends a DiSEqC command ($command is 3 to 6 bytes of binary data).
192
193=item $reply = $fe->diseqc_reply ($timeout)
194
195Receives a reply to a DiSEqC 2.0 command and returns it as a binary octet
196string 0..4 bytes in length (or C<undef> in the error case).
197
198=cut
179 199
180package Linux::DVB::Demux; 200package Linux::DVB::Demux;
181 201
182@ISA = qw(Linux::DVB); 202@ISA = qw(Linux::DVB);
183 203

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines