mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Removed the 'Log' parameter from the cChannel::Set... functions
This commit is contained in:
parent
30dfd2e701
commit
501ffe5008
2
HISTORY
2
HISTORY
@ -3033,3 +3033,5 @@ Video Disk Recorder Revision History
|
|||||||
lots of disk access due to automatic channel updates). Automatic channel
|
lots of disk access due to automatic channel updates). Automatic channel
|
||||||
modifications will be saved every 10 minutes if no recording is currently
|
modifications will be saved every 10 minutes if no recording is currently
|
||||||
active.
|
active.
|
||||||
|
- Removed the 'Log' parameter from the cChannel::Set... functions. Instead
|
||||||
|
checking if the channel has a non-zero number.
|
||||||
|
49
channels.c
49
channels.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: channels.c 1.26 2004/10/17 11:21:39 kls Exp $
|
* $Id: channels.c 1.27 2004/10/17 12:20:56 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "channels.h"
|
#include "channels.h"
|
||||||
@ -261,7 +261,7 @@ int cChannel::Modification(int Mask)
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH, bool Log)
|
bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH)
|
||||||
{
|
{
|
||||||
// Workarounds for broadcaster stupidity:
|
// Workarounds for broadcaster stupidity:
|
||||||
// Some providers broadcast the transponder frequency of their channels with two different
|
// Some providers broadcast the transponder frequency of their channels with two different
|
||||||
@ -273,41 +273,46 @@ bool cChannel::SetSatTransponderData(int Source, int Frequency, char Polarizatio
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (source != Source || frequency != Frequency || polarization != Polarization || srate != Srate || coderateH != CoderateH) {
|
if (source != Source || frequency != Frequency || polarization != Polarization || srate != Srate || coderateH != CoderateH) {
|
||||||
if (Log)
|
if (Number()) {
|
||||||
dsyslog("changing transponder data of channel %d from %s:%d:%c:%d:%d to %s:%d:%c:%d:%d", Number(), cSource::ToString(source), frequency, polarization, srate, coderateH, cSource::ToString(Source), Frequency, Polarization, Srate, CoderateH);
|
dsyslog("changing transponder data of channel %d from %s:%d:%c:%d:%d to %s:%d:%c:%d:%d", Number(), cSource::ToString(source), frequency, polarization, srate, coderateH, cSource::ToString(Source), Frequency, Polarization, Srate, CoderateH);
|
||||||
|
modification |= CHANNELMOD_TRANSP;
|
||||||
|
Channels.SetModified();
|
||||||
|
}
|
||||||
source = Source;
|
source = Source;
|
||||||
frequency = Frequency;
|
frequency = Frequency;
|
||||||
polarization = Polarization;
|
polarization = Polarization;
|
||||||
srate = Srate;
|
srate = Srate;
|
||||||
coderateH = CoderateH;
|
coderateH = CoderateH;
|
||||||
modulation = QPSK;
|
modulation = QPSK;
|
||||||
modification |= CHANNELMOD_TRANSP;
|
|
||||||
Channels.SetModified();
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cChannel::SetCableTransponderData(int Source, int Frequency, int Modulation, int Srate, int CoderateH, bool Log)
|
bool cChannel::SetCableTransponderData(int Source, int Frequency, int Modulation, int Srate, int CoderateH)
|
||||||
{
|
{
|
||||||
if (source != Source || frequency != Frequency || modulation != Modulation || srate != Srate || coderateH != CoderateH) {
|
if (source != Source || frequency != Frequency || modulation != Modulation || srate != Srate || coderateH != CoderateH) {
|
||||||
if (Log)
|
if (Number()) {
|
||||||
dsyslog("changing transponder data of channel %d from %s:%d:%d:%d:%d to %s:%d:%d:%d:%d", Number(), cSource::ToString(source), frequency, modulation, srate, coderateH, cSource::ToString(Source), Frequency, Modulation, Srate, CoderateH);
|
dsyslog("changing transponder data of channel %d from %s:%d:%d:%d:%d to %s:%d:%d:%d:%d", Number(), cSource::ToString(source), frequency, modulation, srate, coderateH, cSource::ToString(Source), Frequency, Modulation, Srate, CoderateH);
|
||||||
|
modification |= CHANNELMOD_TRANSP;
|
||||||
|
Channels.SetModified();
|
||||||
|
}
|
||||||
source = Source;
|
source = Source;
|
||||||
frequency = Frequency;
|
frequency = Frequency;
|
||||||
modulation = Modulation;
|
modulation = Modulation;
|
||||||
srate = Srate;
|
srate = Srate;
|
||||||
coderateH = CoderateH;
|
coderateH = CoderateH;
|
||||||
modification |= CHANNELMOD_TRANSP;
|
|
||||||
Channels.SetModified();
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cChannel::SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CoderateH, int CoderateL, int Guard, int Transmission, bool Log)
|
bool cChannel::SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CoderateH, int CoderateL, int Guard, int Transmission)
|
||||||
{
|
{
|
||||||
if (source != Source || frequency != Frequency || bandwidth != Bandwidth || modulation != Modulation || hierarchy != Hierarchy || coderateH != CoderateH || coderateL != CoderateL || guard != Guard || transmission != Transmission) {
|
if (source != Source || frequency != Frequency || bandwidth != Bandwidth || modulation != Modulation || hierarchy != Hierarchy || coderateH != CoderateH || coderateL != CoderateL || guard != Guard || transmission != Transmission) {
|
||||||
if (Log)
|
if (Number()) {
|
||||||
dsyslog("changing transponder data of channel %d from %s:%d:%d:%d:%d:%d:%d:%d:%d to %s:%d:%d:%d:%d:%d:%d:%d:%d", Number(), cSource::ToString(source), frequency, bandwidth, modulation, hierarchy, coderateH, coderateL, guard, transmission, cSource::ToString(Source), Frequency, Bandwidth, Modulation, Hierarchy, CoderateH, CoderateL, Guard, Transmission);
|
dsyslog("changing transponder data of channel %d from %s:%d:%d:%d:%d:%d:%d:%d:%d to %s:%d:%d:%d:%d:%d:%d:%d:%d", Number(), cSource::ToString(source), frequency, bandwidth, modulation, hierarchy, coderateH, coderateL, guard, transmission, cSource::ToString(Source), Frequency, Bandwidth, Modulation, Hierarchy, CoderateH, CoderateL, Guard, Transmission);
|
||||||
|
modification |= CHANNELMOD_TRANSP;
|
||||||
|
Channels.SetModified();
|
||||||
|
}
|
||||||
source = Source;
|
source = Source;
|
||||||
frequency = Frequency;
|
frequency = Frequency;
|
||||||
bandwidth = Bandwidth;
|
bandwidth = Bandwidth;
|
||||||
@ -317,35 +322,35 @@ bool cChannel::SetTerrTransponderData(int Source, int Frequency, int Bandwidth,
|
|||||||
coderateL = CoderateL;
|
coderateL = CoderateL;
|
||||||
guard = Guard;
|
guard = Guard;
|
||||||
transmission = Transmission;
|
transmission = Transmission;
|
||||||
modification |= CHANNELMOD_TRANSP;
|
|
||||||
Channels.SetModified();
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cChannel::SetId(int Nid, int Tid, int Sid, int Rid, bool Log)
|
void cChannel::SetId(int Nid, int Tid, int Sid, int Rid)
|
||||||
{
|
{
|
||||||
if (nid != Nid || tid != Tid || sid != Sid || rid != Rid) {
|
if (nid != Nid || tid != Tid || sid != Sid || rid != Rid) {
|
||||||
if (Log)
|
if (Number()) {
|
||||||
dsyslog("changing id of channel %d from %d-%d-%d-%d to %d-%d-%d-%d", Number(), nid, tid, sid, rid, Nid, Tid, Sid, Rid);
|
dsyslog("changing id of channel %d from %d-%d-%d-%d to %d-%d-%d-%d", Number(), nid, tid, sid, rid, Nid, Tid, Sid, Rid);
|
||||||
|
modification |= CHANNELMOD_ID;
|
||||||
|
Channels.SetModified();
|
||||||
|
}
|
||||||
nid = Nid;
|
nid = Nid;
|
||||||
tid = Tid;
|
tid = Tid;
|
||||||
sid = Sid;
|
sid = Sid;
|
||||||
rid = Rid;
|
rid = Rid;
|
||||||
modification |= CHANNELMOD_ID;
|
|
||||||
Channels.SetModified();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cChannel::SetName(const char *Name, bool Log)
|
void cChannel::SetName(const char *Name)
|
||||||
{
|
{
|
||||||
if (!isempty(Name) && strcmp(name, Name) != 0) {
|
if (!isempty(Name) && strcmp(name, Name) != 0) {
|
||||||
if (Log)
|
if (Number()) {
|
||||||
dsyslog("changing name of channel %d from '%s' to '%s'", Number(), name, Name);
|
dsyslog("changing name of channel %d from '%s' to '%s'", Number(), name, Name);
|
||||||
strn0cpy(name, Name, MaxChannelName);
|
|
||||||
modification |= CHANNELMOD_NAME;
|
modification |= CHANNELMOD_NAME;
|
||||||
Channels.SetModified();
|
Channels.SetModified();
|
||||||
}
|
}
|
||||||
|
strn0cpy(name, Name, MaxChannelName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool IntArraysDiffer(const int *a, const int *b, const char na[][4] = NULL, const char nb[][4] = NULL)
|
static bool IntArraysDiffer(const int *a, const int *b, const char na[][4] = NULL, const char nb[][4] = NULL)
|
||||||
@ -880,10 +885,10 @@ cChannel *cChannels::NewChannel(const cChannel *Transponder, const char *Name, i
|
|||||||
if (Transponder) {
|
if (Transponder) {
|
||||||
dsyslog("creating new channel '%s' on %s transponder %d with id %d-%d-%d-%d", Name, cSource::ToString(Transponder->Source()), Transponder->Transponder(), Nid, Tid, Sid, Rid);
|
dsyslog("creating new channel '%s' on %s transponder %d with id %d-%d-%d-%d", Name, cSource::ToString(Transponder->Source()), Transponder->Transponder(), Nid, Tid, Sid, Rid);
|
||||||
cChannel *NewChannel = new cChannel(*Transponder);
|
cChannel *NewChannel = new cChannel(*Transponder);
|
||||||
|
NewChannel->SetId(Nid, Tid, Sid, Rid);
|
||||||
|
NewChannel->SetName(Name);
|
||||||
Add(NewChannel);
|
Add(NewChannel);
|
||||||
ReNumber();
|
ReNumber();
|
||||||
NewChannel->SetId(Nid, Tid, Sid, Rid, false);
|
|
||||||
NewChannel->SetName(Name, false);
|
|
||||||
return NewChannel;
|
return NewChannel;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
12
channels.h
12
channels.h
@ -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: channels.h 1.18 2004/10/17 10:33:38 kls Exp $
|
* $Id: channels.h 1.19 2004/10/17 11:52:07 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CHANNELS_H
|
#ifndef __CHANNELS_H
|
||||||
@ -167,11 +167,11 @@ public:
|
|||||||
bool IsTerr(void) const { return (source & cSource::st_Mask) == cSource::stTerr; }
|
bool IsTerr(void) const { return (source & cSource::st_Mask) == cSource::stTerr; }
|
||||||
tChannelID GetChannelID(void) const;
|
tChannelID GetChannelID(void) const;
|
||||||
int Modification(int Mask = CHANNELMOD_ALL);
|
int Modification(int Mask = CHANNELMOD_ALL);
|
||||||
bool SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH, bool Log = true);
|
bool SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH);
|
||||||
bool SetCableTransponderData(int Source, int Frequency, int Modulation, int Srate, int CoderateH, bool Log = true);
|
bool SetCableTransponderData(int Source, int Frequency, int Modulation, int Srate, int CoderateH);
|
||||||
bool SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CodeRateH, int CodeRateL, int Guard, int Transmission, bool Log = true);
|
bool SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CodeRateH, int CodeRateL, int Guard, int Transmission);
|
||||||
void SetId(int Nid, int Tid, int Sid, int Rid = 0, bool Log = true);
|
void SetId(int Nid, int Tid, int Sid, int Rid = 0);
|
||||||
void SetName(const char *Name, bool Log = true);
|
void SetName(const char *Name);
|
||||||
void SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][4], int *Dpids, char DLangs[][4], int Tpid);
|
void SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][4], int *Dpids, char DLangs[][4], int Tpid);
|
||||||
void SetCaIds(const int *CaIds); // list must be zero-terminated
|
void SetCaIds(const int *CaIds); // list must be zero-terminated
|
||||||
void SetCaDescriptors(int Level);
|
void SetCaDescriptors(int Level);
|
||||||
|
14
nit.c
14
nit.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: nit.c 1.9 2004/10/16 10:00:27 kls Exp $
|
* $Id: nit.c 1.10 2004/10/17 12:00:54 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "nit.h"
|
#include "nit.h"
|
||||||
@ -123,8 +123,8 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
}
|
}
|
||||||
if (!found && Setup.UpdateChannels >= 4) {
|
if (!found && Setup.UpdateChannels >= 4) {
|
||||||
cChannel *Channel = new cChannel;
|
cChannel *Channel = new cChannel;
|
||||||
Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0, false);
|
Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0);
|
||||||
if (Channel->SetSatTransponderData(Source, Frequency, Polarization, SymbolRate, CodeRate, false))
|
if (Channel->SetSatTransponderData(Source, Frequency, Polarization, SymbolRate, CodeRate))
|
||||||
EITScanner.AddTransponder(Channel);
|
EITScanner.AddTransponder(Channel);
|
||||||
else
|
else
|
||||||
delete Channel;
|
delete Channel;
|
||||||
@ -158,8 +158,8 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
}
|
}
|
||||||
if (!found && Setup.UpdateChannels >= 4) {
|
if (!found && Setup.UpdateChannels >= 4) {
|
||||||
cChannel *Channel = new cChannel;
|
cChannel *Channel = new cChannel;
|
||||||
Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0, false);
|
Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0);
|
||||||
if (Channel->SetCableTransponderData(Source, Frequency, Modulation, SymbolRate, CodeRate, false))
|
if (Channel->SetCableTransponderData(Source, Frequency, Modulation, SymbolRate, CodeRate))
|
||||||
EITScanner.AddTransponder(Channel);
|
EITScanner.AddTransponder(Channel);
|
||||||
else
|
else
|
||||||
delete Channel;
|
delete Channel;
|
||||||
@ -200,8 +200,8 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
|
|||||||
}
|
}
|
||||||
if (!found && Setup.UpdateChannels >= 4) {
|
if (!found && Setup.UpdateChannels >= 4) {
|
||||||
cChannel *Channel = new cChannel;
|
cChannel *Channel = new cChannel;
|
||||||
Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0, false);
|
Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0);
|
||||||
if (Channel->SetTerrTransponderData(Source, Frequency, Bandwidth, Constellation, Hierarchy, CodeRateHP, CodeRateLP, GuardInterval, TransmissionMode, false))
|
if (Channel->SetTerrTransponderData(Source, Frequency, Bandwidth, Constellation, Hierarchy, CodeRateHP, CodeRateLP, GuardInterval, TransmissionMode))
|
||||||
EITScanner.AddTransponder(Channel);
|
EITScanner.AddTransponder(Channel);
|
||||||
else
|
else
|
||||||
delete Channel;
|
delete Channel;
|
||||||
|
Loading…
Reference in New Issue
Block a user