diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2002-10-27 17:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2002-10-27 17:00:00 +0100 |
commit | 57bd7eeed1c1aa84316f8299e1528b3bc63d7623 (patch) | |
tree | 6c523eb1727d488fabbf860db21dbcd39a7f9d97 /dvbdevice.c | |
parent | cd7ccd64fd51b77b8b75b6e85ef6891b1917aa59 (diff) | |
download | vdr-patch-lnbsharing-57bd7eeed1c1aa84316f8299e1528b3bc63d7623.tar.gz vdr-patch-lnbsharing-57bd7eeed1c1aa84316f8299e1528b3bc63d7623.tar.bz2 |
Version 1.1.14vdr-1.1.14
- Fixed some faulty default parameter initializations (thanks to Robert Schiele).
- Added further satellites to 'sources.conf' (thanks to Reinhard Walter Buchner
and Oliver Endriss).
- Updated Finnish OSD texts (thanks to Jaakko Hyvätti).
- Fixed a small glitch when switching channels (thanks to Dennis Noordsij for
reporting this one).
- Fixed handling multiple 'CaCaps' entries in 'setup.conf'.
- Group separators in 'channels.conf' may now be given like ':@201 My Channels',
where '@201' indicates the number to be given to the next channel. This can be
used to create 'gaps' in the channel numbering (see 'man 5 vdr'). BE CAREFUL
TO UPDATE YOUR 'timers.conf' ACCORDINGLY IF INSERTING THIS NEW FEATURE INTO YOUR
'channels.conf' FILE!
- Timers now internally have a pointer to their channel (this is necessary to
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).
- 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.
- Fixed skipping unavailable channels when zapping downwards.
- Fixed checking the Ca() status of a cDevice (thanks to Stefan Huelswitt).
- Fixed switching audio tracks in 'Transfer Mode' on the primary DVB device
(thanks to Steffen Barszus and Stefan Huelswitt for reporting this one and
helping to fix it).
- Fixed channel switching in case of an active 'Transfer Mode' on the primary
device ('Transfer Mode' is now launched with priority '-1').
- Fixed a ternary expression in dvbspu.c.
- Fixed handling 'Transfer Mode' on single device systems when recording an
encrypted channel (thanks to Stefan Huelswitt).
- Fixed blocking replaying in case an encrypted channel is being recorded on
the primary device.
- Now the name of the remote control is displayed when learning the keys.
- Fixed learning remote control keys in case there is more than one remote
control (thanks to Oliver Endriss for reporting this one).
- Implemented additional dedicated keys for "Play", "Pause", "Stop", "Record",
"FastFwd", "FastRew", "Channel+" and "Channel-". If your remote control supports
any of these keys you can delete your 'remote.conf' file and restart VDR to
go through the key learning procedure again in order to assign these new keys.
See MANUAL for more information.
Authors of player plugins should update their ProcessKey() functions so that
the new player keys have the same functionality as the "Up", "Down", "Left",
"Right" and "Blue" keys, respectively. Note that the existing functionality
of these keys should by all means be retained, since VDR (and any plugins)
shall be fully usable with just the basic set of keys. These new keys are only
for additional comfort in case the remote control in use supports them.
- Implemented new keys to directly access the VDR main menu functions "Schedule",
"Channels", "Timers", "Recordings", "Setup" and "Commands". If your remote
control provides keys you want to assign these functions to, you can delete
your 'remote.cof' file and restart VDR to go through the key learning procedure
again in order to assign these new keys. See MANUAL for more information.
- The new configuration file 'keymacros.conf' can be used to assign macros to
the color buttons in normal viewing mode, as well as to up to 9 user defined
keys. See MANUAL and man vdr(5) for more information. The default 'keymacros.conf'
implements the functionality of the "color button patch".
- Fixed a crash when learning the keys of several remote controls and pressing
buttons of those that have already been learned (thanks to Oliver Endriss for
reporting this one).
Diffstat (limited to 'dvbdevice.c')
-rw-r--r-- | dvbdevice.c | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/dvbdevice.c b/dvbdevice.c index a4a4308..a1a8913 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 1.24 2002/10/12 11:15:45 kls Exp $ + * $Id: dvbdevice.c 1.30 2002/10/26 11:37:03 kls Exp $ */ #include "dvbdevice.h" @@ -428,6 +428,13 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne 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) { #if (DVB_DRIVER_VERSION < MIN_DVB_DRIVER_VERSION_FOR_TIMESHIFT) @@ -435,24 +442,26 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) LiveView = true; #endif + bool IsEncrypted = Channel->Ca() > CACONFBASE; + bool DoTune = !IsTunedTo(Channel); bool TurnOffLivePIDs = HasDecoder() && (DoTune - || Channel->Ca() > CACONFBASE && pidHandles[ptVideo].pid != Channel->Vpid() // CA channels can only be decrypted in "live" mode + || IsEncrypted && pidHandles[ptVideo].pid != Channel->Vpid() // CA channels can only be decrypted in "live" mode || IsPrimaryDevice() && (LiveView // for a new live view the old PIDs need to be turned off || pidHandles[ptVideo].pid == Channel->Vpid() // for recording the PIDs must be shifted from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER ) ); - bool StartTransferMode = IsPrimaryDevice() && !DoTune + bool StartTransferMode = IsPrimaryDevice() && !IsEncrypted && !DoTune && (LiveView && HasPid(Channel->Vpid()) && pidHandles[ptVideo].pid != Channel->Vpid() // the PID is already set as DMX_PES_OTHER || !LiveView && pidHandles[ptVideo].pid == Channel->Vpid() // a recording is going to shift the PIDs from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER ); bool TurnOnLivePIDs = HasDecoder() && !StartTransferMode - && (Channel->Ca() > CACONFBASE // CA channels can only be decrypted in "live" mode + && (IsEncrypted // CA channels can only be decrypted in "live" mode || LiveView ); @@ -622,13 +631,13 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) // Frequency and symbol rate: #ifdef NEWSTRUCT - Frontend.frequency = Channel->Frequency() * 1000000UL; + Frontend.frequency = FrequencyToHz(Channel->Frequency()); Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion()); Frontend.u.qam.symbol_rate = Channel->Srate() * 1000UL; Frontend.u.qam.fec_inner = fe_code_rate_t(Channel->CoderateH()); Frontend.u.qam.modulation = fe_modulation_t(Channel->Modulation()); #else - Frontend.Frequency = Channel->Frequency() * 1000000UL; + Frontend.Frequency = FrequencyToHz(Channel->Frequency()); Frontend.Inversion = SpectralInversion(Channel->Inversion()); Frontend.u.qam.SymbolRate = Channel->Srate() * 1000UL; Frontend.u.qam.FEC_inner = CodeRate(Channel->CoderateH()); @@ -641,7 +650,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) // Frequency and OFDM paramaters: #ifdef NEWSTRUCT - Frontend.frequency = Channel->Frequency() * 1000UL; + Frontend.frequency = FrequencyToHz(Channel->Frequency()); Frontend.inversion = fe_spectral_inversion_t(Channel->Inversion()); Frontend.u.ofdm.bandwidth = fe_bandwidth_t(Channel->Bandwidth()); Frontend.u.ofdm.code_rate_HP = fe_code_rate_t(Channel->CoderateH()); @@ -651,7 +660,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) Frontend.u.ofdm.guard_interval = fe_guard_interval_t(Channel->Guard()); Frontend.u.ofdm.hierarchy_information = fe_hierarchy_t(Channel->Hierarchy()); #else - Frontend.Frequency = Channel->Frequency() * 1000UL; + Frontend.Frequency = FrequencyToHz(Channel->Frequency()); Frontend.Inversion = SpectralInversion(Channel->Inversion()); Frontend.u.ofdm.bandWidth = BandWidth(Channel->Bandwidth()); Frontend.u.ofdm.HP_CodeRate = CodeRate(Channel->CoderateH()); @@ -733,11 +742,9 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) if (IsPrimaryDevice()) AddPid(Channel->Tpid(), ptTeletext); CHECK(ioctl(fd_audio, AUDIO_SET_AV_SYNC, true)); - CHECK(ioctl(fd_audio, AUDIO_SET_MUTE, false)); - CHECK(ioctl(fd_video, VIDEO_SET_BLANK, false)); } else if (StartTransferMode) - cControl::Launch(new cTransferControl(this, Channel->Vpid(), Channel->Apid1(), 0, 0, 0)); + cControl::Launch(new cTransferControl(this, Channel->Vpid(), Channel->Apid1(), Channel->Apid2(), Channel->Dpid1(), Channel->Dpid2())); // Start setting system time: @@ -765,13 +772,15 @@ int cDvbDevice::NumAudioTracksDevice(void) const int n = 0; if (aPid1) n++; - if (aPid2 && aPid1 != aPid2) + if (!Ca() && aPid2 && aPid1 != aPid2) // a Ca recording session blocks switching live audio tracks n++; return n; } const char **cDvbDevice::GetAudioTracksDevice(int *CurrentTrack) const { + if (Ca()) + return NULL; // a Ca recording session blocks switching live audio tracks if (NumAudioTracks()) { if (CurrentTrack) *CurrentTrack = (pidHandles[ptAudio].pid == aPid1) ? 0 : 1; @@ -785,11 +794,19 @@ const char **cDvbDevice::GetAudioTracksDevice(int *CurrentTrack) const void cDvbDevice::SetAudioTrackDevice(int Index) { if (0 <= Index && Index < NumAudioTracks()) { + int vpid = pidHandles[ptVideo].pid; // need to turn video PID off/on to restart demux + DelPid(vpid); DelPid(pidHandles[ptAudio].pid); AddPid(Index ? aPid2 : aPid1, ptAudio); + AddPid(vpid, ptVideo); } } +bool cDvbDevice::CanReplay(void) const +{ + return cDevice::CanReplay() && !Ca(); // we can only replay if there is no Ca recording going on +} + bool cDvbDevice::SetPlayMode(ePlayMode PlayMode) { if (PlayMode != pmExtern_THIS_SHOULD_BE_AVOIDED && fd_video < 0 && fd_audio < 0) { |