--- Linux-DVB/DVB.pm 2005/03/03 20:11:32 1.4 +++ Linux-DVB/DVB.pm 2005/04/03 02:16:05 1.5 @@ -12,7 +12,7 @@ translation of the C API. You should read the Linux DVB API description to make any sense of this module. It can be found here: - http://www.linuxtv.org/developer/dvbapi.xml + http://www.linuxtv.org/docs/dvbapi/dvbapi.html All constants from F and F are exported by their C name and by default. @@ -113,8 +113,66 @@ sub signal_strength { _signal_strength ($_[0]{fd}) } sub uncorrected { _uncorrected ($_[0]{fd}) } -#sub set { _set ($_[0]{fd}, $_[0]{type}) } +=item $fe->set (parameter => value, ...) + +Sets frontend parameters. All values are stuffed into the +C structure without conversion and passed to +FE_SET_FRONTEND. + +Returns true on success. + +All modes: + + frequency => + inversion => + +QPSK frontends: + + symbol_rate => + fec_inner => + +QAM frontends: + + symbol_rate => + fec_inner => + modulation => + +QFDM frontends: + + bandwidth => + code_rate_HP => + code_rate_LP => + constellation => + transmission_mode => + +=cut + +sub set { + my ($self) = shift; + _set $self->{fd}, { @_ }, $self->{type} +} + +=item $fe->parameters + +Calls FE_GET_FRONTEND and returns a hash reference that contains the same keys +as given to the C method. + +Example: + + Data::Dumper::Dumper $fe->get + + { + frequency => 426000000, # 426 Mhz + inversion => 0, # INVERSION_OFF + symbol_rate => 6900000, # 6.9 MB/s + fec_inner => 0, # FEC_NONE + modulation => 3, # QAM_64 + } + +=cut + sub parameters { _get ($_[0]{fd}, $_[0]{type}) } +sub get { _get ($_[0]{fd}, $_[0]{type}) } # unannounced alias sub event { _event ($_[0]{fd}, $_[0]{type}) } package Linux::DVB::Demux;