diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2002-11-24 18:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2002-11-24 18:00:00 +0100 |
commit | fe9499ba901f5c32dd0b3841a2b6e599fefc144f (patch) | |
tree | 3a9efdef4b928aeffea51fc36a011ef367c14b21 /dvbdevice.c | |
parent | 8b5d4040832f9a11119002fef5144a7d6705f19c (diff) | |
download | vdr-patch-lnbsharing-fe9499ba901f5c32dd0b3841a2b6e599fefc144f.tar.gz vdr-patch-lnbsharing-fe9499ba901f5c32dd0b3841a2b6e599fefc144f.tar.bz2 |
Version 1.1.17vdr-1.1.17
- Added new entries to 'ca.conf'.
- Fixed closing unused PID handles (thanks to Stefan Schluenss for reporting this
one).
- Added more examples to 'diseqc.conf' (thanks to Oliver Endriss).
- Fixed disabling multiple recordings on a single DVB card (comment out the definition
of the macros DO_REC_AND_PLAY_ON_PRIMARY_DEVICE and DO_MULTIPLE_RECORDINGS in
dvbdevice.c).
- Plugins can now have their very own OSD setup in the object they return from
a call to cPlugin::MainMenuAction(). In order to implement this, the return type
of cPlugin::MainMenuAction() had to be changed from (cOsdMenu *) to (cOsdObject *).
So in case you are compiling an existing plugin with this version of VDR and you
get an error message, simply change cOsdMenu to cOsdObject in the plugin's source
for the MainMenuAction() function.
Plugin authors who have so far (ab)used the cControl mechanism to implement their
own raw OSD should take a look at the new demo plugin 'osddemo'. It implements
a very primitive game that shows how a plugin can have its own raw OSD. Especially
look into cLineGame and see how it implements the Show() function. See also
the chapter on "User interaction" in PLUGINS.html.
- Added three new fields to the lines in 'channels.conf': NID, TID and RID. NID and
TID are the Network and Transport Stream IDs, respectively. RID is an additional ID
that can be used to tell apart channels that would otherwise be indistinguishable.
This is typically the case with radio channels, which may have the same NID, TID
and SID, but different "radio IDs". This new field is therefore called RID ("radio
ID"). Currently NID and TID are not yet used by VDR and should always be 0. The
RID is actually used when building the "unique channel ID", so if you have channels
in your 'channels.conf' file that cause error messages when loading, you can set
the RIDs of these channels to different values.
When reading an old 'channels.conf' these new fields will be automatically
initialized to 0 and once the file is written back to disk they will be appended
to the channel definitions.
Thanks to Régis Bossut for pointing out that with some providers the channels can
only be distinguished through the RID.
- The "unique channel ID" now contains an optional 5th part (the RID). See man vdr(5).
- Updated 'channels.conf.cable' and made some channels unique using the new RID
(thanks to Andreas Kool for pointing out the problems).
- Made some channels unique in 'channels.conf.terr' using the new RID.
- Extended the '-l' option to allow logging to LOG_LOCALn (n=0..7) by writing, for
instance, '-l 3.7' (suggested by Jürgen Schmidt).
- Now deleting stale lock files if they have a time stamp that is outside the window
'now +/- LOCKFILESTALETIME'. This improves things in cases where the system time
makes far jumps, so that a lock file might end up with a time stamp that lies
in the distant future (thanks to Oliver Endriss).
Diffstat (limited to 'dvbdevice.c')
-rw-r--r-- | dvbdevice.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/dvbdevice.c b/dvbdevice.c index 119a28e..3aa9f93 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.35 2002/11/10 12:57:17 kls Exp $ + * $Id: dvbdevice.c 1.37 2002/11/15 15:17:30 kls Exp $ */ #include "dvbdevice.h" @@ -33,6 +33,7 @@ extern "C" { #include "transfer.h" #define DO_REC_AND_PLAY_ON_PRIMARY_DEVICE 1 +#define DO_MULTIPLE_RECORDINGS 1 #define DEV_VIDEO "/dev/video" #define DEV_DVB_ADAPTER "/dev/dvb/adapter" @@ -311,11 +312,11 @@ bool cDvbDevice::SetPid(cPidHandle *Handle, int Type, bool On) pesFilterParams.pes_type= PesTypes[Type]; pesFilterParams.flags = DMX_IMMEDIATE_START; CHECK(ioctl(Handle->handle, DMX_SET_PES_FILTER, &pesFilterParams)); - close(Handle->handle); - Handle->handle = -1; if (PesTypes[Type] == DMX_PES_VIDEO) // let's only do this once SetPlayMode(pmNone); // necessary to switch a PID from DMX_PES_VIDEO/AUDIO to DMX_PES_OTHER } + close(Handle->handle); + Handle->handle = -1; } } return true; @@ -343,6 +344,7 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne bool needsDetachReceivers = true; if (ProvidesSource(Channel->Source()) && ProvidesCa(Channel->Ca())) { +#ifdef DO_MULTIPLE_RECORDINGS if (Receiving()) { if (IsTunedTo(Channel)) { needsDetachReceivers = false; @@ -365,6 +367,7 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne result = hasPriority; } else +#endif result = hasPriority; } if (NeedsDetachReceivers) @@ -381,11 +384,6 @@ static unsigned int FrequencyToHz(unsigned int f) bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) { -#ifndef DO_REC_AND_PLAY_ON_PRIMARY_DEVICE - if (HasDecoder()) - LiveView = true; -#endif - bool IsEncrypted = Channel->Ca() > CACONFBASE; bool DoTune = !IsTunedTo(Channel); @@ -393,10 +391,9 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) bool TurnOffLivePIDs = HasDecoder() && (DoTune || 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 - ) + || !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() && !IsEncrypted && !DoTune @@ -409,6 +406,11 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) || LiveView ); +#ifndef DO_MULTIPLE_RECORDINGS + TurnOffLivePIDs = TurnOnLivePIDs = true; + StartTransferMode = false; +#endif + // Stop setting system time: if (siProcessor) @@ -634,6 +636,10 @@ void cDvbDevice::SetAudioTrackDevice(int Index) bool cDvbDevice::CanReplay(void) const { +#ifndef DO_REC_AND_PLAY_ON_PRIMARY_DEVICE + if (Receiving()) + return false; +#endif return cDevice::CanReplay() && !Ca(); // we can only replay if there is no Ca recording going on } |