mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Frequency for DVB-C and DVB-T is now in MHz, kHz or Hz
This commit is contained in:
parent
e3aaeccee3
commit
bff56bb850
3
HISTORY
3
HISTORY
@ -1629,3 +1629,6 @@ Video Disk Recorder Revision History
|
|||||||
handle gaps in channel numbers, and in preparation for unique channel ids).
|
handle gaps in channel numbers, and in preparation for unique channel ids).
|
||||||
- Fixed slow reaction on SVDRP input (thanks to Guido Fiala for reporting this one).
|
- Fixed slow reaction on SVDRP input (thanks to Guido Fiala for reporting this one).
|
||||||
- Added KI.KA to channels.conf.cable (thanks to Robert Schiele).
|
- Added KI.KA to channels.conf.cable (thanks to Robert Schiele).
|
||||||
|
- Frequency values for cable and terrestrial channels in 'channels.conf' can
|
||||||
|
now be given either in MHz, kHz or Hz. The actual value given will be multiplied
|
||||||
|
by 1000 until it is larger than 1000000.
|
||||||
|
17
dvbdevice.c
17
dvbdevice.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: dvbdevice.c 1.25 2002/10/19 10:12:12 kls Exp $
|
* $Id: dvbdevice.c 1.26 2002/10/20 14:10:49 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbdevice.h"
|
#include "dvbdevice.h"
|
||||||
@ -428,6 +428,13 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static unsigned int FrequencyToHz(unsigned int f)
|
||||||
|
{
|
||||||
|
while (f && f < 1000000)
|
||||||
|
f *= 1000;
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
||||||
{
|
{
|
||||||
#if (DVB_DRIVER_VERSION < MIN_DVB_DRIVER_VERSION_FOR_TIMESHIFT)
|
#if (DVB_DRIVER_VERSION < MIN_DVB_DRIVER_VERSION_FOR_TIMESHIFT)
|
||||||
@ -622,13 +629,13 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
// Frequency and symbol rate:
|
// Frequency and symbol rate:
|
||||||
|
|
||||||
#ifdef NEWSTRUCT
|
#ifdef NEWSTRUCT
|
||||||
Frontend.frequency = Channel->Frequency() * 1000000UL;
|
Frontend.frequency = FrequencyToHz(Channel->Frequency());
|
||||||
Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion());
|
Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion());
|
||||||
Frontend.u.qam.symbol_rate = Channel->Srate() * 1000UL;
|
Frontend.u.qam.symbol_rate = Channel->Srate() * 1000UL;
|
||||||
Frontend.u.qam.fec_inner = fe_code_rate_t(Channel->CoderateH());
|
Frontend.u.qam.fec_inner = fe_code_rate_t(Channel->CoderateH());
|
||||||
Frontend.u.qam.modulation = fe_modulation_t(Channel->Modulation());
|
Frontend.u.qam.modulation = fe_modulation_t(Channel->Modulation());
|
||||||
#else
|
#else
|
||||||
Frontend.Frequency = Channel->Frequency() * 1000000UL;
|
Frontend.Frequency = FrequencyToHz(Channel->Frequency());
|
||||||
Frontend.Inversion = SpectralInversion(Channel->Inversion());
|
Frontend.Inversion = SpectralInversion(Channel->Inversion());
|
||||||
Frontend.u.qam.SymbolRate = Channel->Srate() * 1000UL;
|
Frontend.u.qam.SymbolRate = Channel->Srate() * 1000UL;
|
||||||
Frontend.u.qam.FEC_inner = CodeRate(Channel->CoderateH());
|
Frontend.u.qam.FEC_inner = CodeRate(Channel->CoderateH());
|
||||||
@ -641,7 +648,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
// Frequency and OFDM paramaters:
|
// Frequency and OFDM paramaters:
|
||||||
|
|
||||||
#ifdef NEWSTRUCT
|
#ifdef NEWSTRUCT
|
||||||
Frontend.frequency = Channel->Frequency() * 1000UL;
|
Frontend.frequency = FrequencyToHz(Channel->Frequency());
|
||||||
Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion());
|
Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion());
|
||||||
Frontend.u.ofdm.bandwidth = fe_bandwidth_t(Channel->Bandwidth());
|
Frontend.u.ofdm.bandwidth = fe_bandwidth_t(Channel->Bandwidth());
|
||||||
Frontend.u.ofdm.code_rate_HP = fe_code_rate_t(Channel->CoderateH());
|
Frontend.u.ofdm.code_rate_HP = fe_code_rate_t(Channel->CoderateH());
|
||||||
@ -651,7 +658,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
Frontend.u.ofdm.guard_interval = fe_guard_interval_t(Channel->Guard());
|
Frontend.u.ofdm.guard_interval = fe_guard_interval_t(Channel->Guard());
|
||||||
Frontend.u.ofdm.hierarchy_information = fe_hierarchy_t(Channel->Hierarchy());
|
Frontend.u.ofdm.hierarchy_information = fe_hierarchy_t(Channel->Hierarchy());
|
||||||
#else
|
#else
|
||||||
Frontend.Frequency = Channel->Frequency() * 1000UL;
|
Frontend.Frequency = FrequencyToHz(Channel->Frequency());
|
||||||
Frontend.Inversion = SpectralInversion(Channel->Inversion());
|
Frontend.Inversion = SpectralInversion(Channel->Inversion());
|
||||||
Frontend.u.ofdm.bandWidth = BandWidth(Channel->Bandwidth());
|
Frontend.u.ofdm.bandWidth = BandWidth(Channel->Bandwidth());
|
||||||
Frontend.u.ofdm.HP_CodeRate = CodeRate(Channel->CoderateH());
|
Frontend.u.ofdm.HP_CodeRate = CodeRate(Channel->CoderateH());
|
||||||
|
6
vdr.5
6
vdr.5
@ -8,7 +8,7 @@
|
|||||||
.\" License as specified in the file COPYING that comes with the
|
.\" License as specified in the file COPYING that comes with the
|
||||||
.\" vdr distribution.
|
.\" vdr distribution.
|
||||||
.\"
|
.\"
|
||||||
.\" $Id: vdr.5 1.9 2002/10/19 12:45:23 kls Exp $
|
.\" $Id: vdr.5 1.10 2002/10/20 14:15:40 kls Exp $
|
||||||
.\"
|
.\"
|
||||||
.TH vdr 5 "7 Oct 2002" "1.2.0" "Video Disk Recorder Files"
|
.TH vdr 5 "7 Oct 2002" "1.2.0" "Video Disk Recorder Files"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
@ -52,7 +52,9 @@ The channel's name (if the name originally contains a ':' character
|
|||||||
it has to be replaced by '|').
|
it has to be replaced by '|').
|
||||||
.TP
|
.TP
|
||||||
.B Frequency
|
.B Frequency
|
||||||
The transponder frequency in MHz for DVB-S and DVB-C, kHz for DVB-T (as an integer).
|
The transponder frequency (as an integer). For DVB-S this value is in MHz. For DVB-C
|
||||||
|
and DVB-T it can be given either in MHz, kHz or Hz (the actual value given will be
|
||||||
|
multiplied by 1000 until it is larger than 1000000).
|
||||||
.TP
|
.TP
|
||||||
.B Parameters
|
.B Parameters
|
||||||
Various parameters, depending on whether this is a DVB-S, DVB-C or DVB-T channel.
|
Various parameters, depending on whether this is a DVB-S, DVB-C or DVB-T channel.
|
||||||
|
Loading…
Reference in New Issue
Block a user