diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2007-08-19 18:00:00 +0200 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2007-08-19 18:00:00 +0200 |
commit | e5a2aa41c9762bda4ce7b987aba1bcfa1cee6f70 (patch) | |
tree | cb794be1f7796ccbfdd1ce04bca0d75d997ead0b /nit.c | |
parent | 4c65b525dc1e3c62336b223d200a46fb30dc7e52 (diff) | |
download | vdr-patch-lnbsharing-e5a2aa41c9762bda4ce7b987aba1bcfa1cee6f70.tar.gz vdr-patch-lnbsharing-e5a2aa41c9762bda4ce7b987aba1bcfa1cee6f70.tar.bz2 |
Version 1.5.8vdr-1.5.8
- Added missing install-i18n to the install target in the Makefile (reported
by Joachim Wilke).
- Fixed a faulty comment in Make.config.template (reported by Marco Schlüßler).
- Improved i18n-to-gettext.pl (thanks to Matthias Schwarzott).
- Moved the "all" target in plugin Makefiles before the "Implicit rules",
so that a plain "make" will compile everything (suggested by Matthias
Schwarzott). The "newplugin" script has been changed accordingly.
Plugin authors may want to change their Makefiles, too.
- Added DESTDIR and PREFIX handling to the Makefile (thanks to Matthias
Schwarzott).
- Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
- Added internationalization to the "skincurses" plugin (thanks to Rolf
Ahrenberg).
- Checking the string for NULL in I18nTranslate().
- Updated the French OSD texts (thanks to Bruno Roussel).
- Some optimizations in cDvbDevice::SetChannelDevice() (thanks to Tobias Bratfisch).
- Optimized cMenuEditChrItem::Set() (thanks to Tobias Bratfisch).
- Optimized cNitFilter::Process() (thanks to Tobias Bratfisch).
- Reduced the number of time(NULL) calls in vdr.c's main loop to a single call
(thanks to Tobias Bratfisch).
- Changed cBitmap::DrawText() to always draw the background unless ColorBg
is clrTransparent (thanks to Christoph Haubrich).
- The "Setup/OSD/Language" menu now only shows those languages that actually
have a locale (suggested by Anssi Hannula).
- Now using setenv() instead of setlocale() to set the language for gettext()
(suggested by Anssi Hannula; thanks also to Ludwig Nussel for a hint on using
_nl_msg_cat_cntr).
- When scanning the locale directory, VDR now explicitly looks for a file named
vdr.mo. Text files for plugins are now named "vdr-name.mo", when "name" is the
name of the plugin. The "newplugin" script has been changed accordingly, and
plugin authors should change their Makefiles, too.
Diffstat (limited to 'nit.c')
-rw-r--r-- | nit.c | 99 |
1 files changed, 51 insertions, 48 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: nit.c 1.14 2007/04/29 11:35:33 kls Exp $ + * $Id: nit.c 1.15 2007/08/17 14:02:45 kls Exp $ */ #include "nit.h" @@ -140,13 +140,14 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length } break; } - bool found = false; - for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { - if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) { - if (Setup.UpdateChannels >= 5) { - if (!ISTRANSPONDER(cChannel::Transponder(Frequency, Polarization), Channel->Transponder())) { + if (Setup.UpdateChannels >= 5) { + bool found = false; + for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { + if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) { + int transponder = Channel->Transponder(); + if (!ISTRANSPONDER(cChannel::Transponder(Frequency, Polarization), transponder)) { for (int n = 0; n < NumFrequencies; n++) { - if (ISTRANSPONDER(cChannel::Transponder(Frequencies[n], Polarization), Channel->Transponder())) { + if (ISTRANSPONDER(cChannel::Transponder(Frequencies[n], Polarization), transponder)) { Frequency = Frequencies[n]; break; } @@ -157,16 +158,16 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length } found = true; } - } - if (!found && Setup.UpdateChannels >= 5) { - for (int n = 0; n < NumFrequencies; n++) { - cChannel *Channel = new cChannel; - Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0); - if (Channel->SetSatTransponderData(Source, Frequencies[n], Polarization, SymbolRate, CodeRate)) - EITScanner.AddTransponder(Channel); - else - delete Channel; - } + if (!found) { + for (int n = 0; n < NumFrequencies; n++) { + cChannel *Channel = new cChannel; + Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0); + if (Channel->SetSatTransponderData(Source, Frequencies[n], Polarization, SymbolRate, CodeRate)) + EITScanner.AddTransponder(Channel); + else + delete Channel; + } + } } } break; @@ -190,13 +191,14 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length } break; } - bool found = false; - for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { - if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) { - if (Setup.UpdateChannels >= 5) { - if (!ISTRANSPONDER(Frequency / 1000, Channel->Transponder())) { + if (Setup.UpdateChannels >= 5) { + bool found = false; + for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { + if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) { + int transponder = Channel->Transponder(); + if (!ISTRANSPONDER(Frequency / 1000, transponder)) { for (int n = 0; n < NumFrequencies; n++) { - if (ISTRANSPONDER(Frequencies[n] / 1000, Channel->Transponder())) { + if (ISTRANSPONDER(Frequencies[n] / 1000, transponder)) { Frequency = Frequencies[n]; break; } @@ -207,16 +209,16 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length } found = true; } - } - if (!found && Setup.UpdateChannels >= 5) { - for (int n = 0; n < NumFrequencies; n++) { - cChannel *Channel = new cChannel; - Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0); - if (Channel->SetCableTransponderData(Source, Frequencies[n], Modulation, SymbolRate, CodeRate)) - EITScanner.AddTransponder(Channel); - else - delete Channel; - } + if (!found) { + for (int n = 0; n < NumFrequencies; n++) { + cChannel *Channel = new cChannel; + Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0); + if (Channel->SetCableTransponderData(Source, Frequencies[n], Modulation, SymbolRate, CodeRate)) + EITScanner.AddTransponder(Channel); + else + delete Channel; + } + } } } break; @@ -247,13 +249,14 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length } break; } - bool found = false; - for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { - if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) { - if (Setup.UpdateChannels >= 5) { - if (!ISTRANSPONDER(Frequency / 1000000, Channel->Transponder())) { + if (Setup.UpdateChannels >= 5) { + bool found = false; + for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { + if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) { + int transponder = Channel->Transponder(); + if (!ISTRANSPONDER(Frequency / 1000000, transponder)) { for (int n = 0; n < NumFrequencies; n++) { - if (ISTRANSPONDER(Frequencies[n] / 1000000, Channel->Transponder())) { + if (ISTRANSPONDER(Frequencies[n] / 1000000, transponder)) { Frequency = Frequencies[n]; break; } @@ -264,15 +267,15 @@ void cNitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length } found = true; } - } - if (!found && Setup.UpdateChannels >= 5) { - for (int n = 0; n < NumFrequencies; n++) { - cChannel *Channel = new cChannel; - Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0); - if (Channel->SetTerrTransponderData(Source, Frequencies[n], Bandwidth, Constellation, Hierarchy, CodeRateHP, CodeRateLP, GuardInterval, TransmissionMode)) - EITScanner.AddTransponder(Channel); - else - delete Channel; + if (!found) { + for (int n = 0; n < NumFrequencies; n++) { + cChannel *Channel = new cChannel; + Channel->SetId(ts.getOriginalNetworkId(), ts.getTransportStreamId(), 0, 0); + if (Channel->SetTerrTransponderData(Source, Frequencies[n], Bandwidth, Constellation, Hierarchy, CodeRateHP, CodeRateLP, GuardInterval, TransmissionMode)) + EITScanner.AddTransponder(Channel); + else + delete Channel; + } } } } |