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.4 by root, Thu Mar 3 20:11:32 2005 UTC vs.
Revision 1.5 by root, Sun Apr 3 02:16:05 2005 UTC

10 10
11This module provides an interface to the Linux DVB API. It is a straightforward 11This module provides an interface to the Linux DVB API. It is a straightforward
12translation of the C API. You should read the Linux DVB API description to make 12translation of the C API. You should read the Linux DVB API description to make
13any sense of this module. It can be found here: 13any sense of this module. It can be found here:
14 14
15 http://www.linuxtv.org/developer/dvbapi.xml 15 http://www.linuxtv.org/docs/dvbapi/dvbapi.html
16 16
17All constants from F<frontend.h> and F<demux.h> are exported by their C 17All constants from F<frontend.h> and F<demux.h> are exported by their C
18name and by default. 18name and by default.
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
111sub ber { _read_ber ($_[0]{fd}) } 111sub ber { _read_ber ($_[0]{fd}) }
112sub snr { _snr ($_[0]{fd}) } 112sub snr { _snr ($_[0]{fd}) }
113sub signal_strength { _signal_strength ($_[0]{fd}) } 113sub signal_strength { _signal_strength ($_[0]{fd}) }
114sub uncorrected { _uncorrected ($_[0]{fd}) } 114sub uncorrected { _uncorrected ($_[0]{fd}) }
115 115
116#sub set { _set ($_[0]{fd}, $_[0]{type}) } 116=item $fe->set (parameter => value, ...)
117
118Sets frontend parameters. All values are stuffed into the
119C<dvb_frontend_parameters> structure without conversion and passed to
120FE_SET_FRONTEND.
121
122Returns true on success.
123
124All modes:
125
126 frequency =>
127 inversion =>
128
129QPSK frontends:
130
131 symbol_rate =>
132 fec_inner =>
133
134QAM frontends:
135
136 symbol_rate =>
137 fec_inner =>
138 modulation =>
139
140QFDM frontends:
141
142 bandwidth =>
143 code_rate_HP =>
144 code_rate_LP =>
145 constellation =>
146 transmission_mode =>
147
148=cut
149
150sub set {
151 my ($self) = shift;
152 _set $self->{fd}, { @_ }, $self->{type}
153}
154
155=item $fe->parameters
156
157Calls FE_GET_FRONTEND and returns a hash reference that contains the same keys
158as given to the C<set> method.
159
160Example:
161
162 Data::Dumper::Dumper $fe->get
163
164 {
165 frequency => 426000000, # 426 Mhz
166 inversion => 0, # INVERSION_OFF
167 symbol_rate => 6900000, # 6.9 MB/s
168 fec_inner => 0, # FEC_NONE
169 modulation => 3, # QAM_64
170 }
171
172=cut
173
117sub parameters { _get ($_[0]{fd}, $_[0]{type}) } 174sub parameters { _get ($_[0]{fd}, $_[0]{type}) }
175sub get { _get ($_[0]{fd}, $_[0]{type}) } # unannounced alias
118sub event { _event ($_[0]{fd}, $_[0]{type}) } 176sub event { _event ($_[0]{fd}, $_[0]{type}) }
119 177
120package Linux::DVB::Demux; 178package Linux::DVB::Demux;
121 179
122@ISA = qw(Linux::DVB); 180@ISA = qw(Linux::DVB);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines