mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed disabling multiple recordings on a single DVB card
This commit is contained in:
parent
1c97d69c04
commit
f8950822dd
3
HISTORY
3
HISTORY
@ -1774,3 +1774,6 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed closing unused PID handles (thanks to Stefan Schluenss for reporting this
|
- Fixed closing unused PID handles (thanks to Stefan Schluenss for reporting this
|
||||||
one).
|
one).
|
||||||
- Added more examples to 'diseqc.conf' (thanks to Oliver Endriss).
|
- 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).
|
||||||
|
19
dvbdevice.c
19
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.36 2002/11/15 13:53:41 kls Exp $
|
* $Id: dvbdevice.c 1.37 2002/11/16 12:36:50 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dvbdevice.h"
|
#include "dvbdevice.h"
|
||||||
@ -33,6 +33,7 @@ extern "C" {
|
|||||||
#include "transfer.h"
|
#include "transfer.h"
|
||||||
|
|
||||||
#define DO_REC_AND_PLAY_ON_PRIMARY_DEVICE 1
|
#define DO_REC_AND_PLAY_ON_PRIMARY_DEVICE 1
|
||||||
|
#define DO_MULTIPLE_RECORDINGS 1
|
||||||
|
|
||||||
#define DEV_VIDEO "/dev/video"
|
#define DEV_VIDEO "/dev/video"
|
||||||
#define DEV_DVB_ADAPTER "/dev/dvb/adapter"
|
#define DEV_DVB_ADAPTER "/dev/dvb/adapter"
|
||||||
@ -343,6 +344,7 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne
|
|||||||
bool needsDetachReceivers = true;
|
bool needsDetachReceivers = true;
|
||||||
|
|
||||||
if (ProvidesSource(Channel->Source()) && ProvidesCa(Channel->Ca())) {
|
if (ProvidesSource(Channel->Source()) && ProvidesCa(Channel->Ca())) {
|
||||||
|
#ifdef DO_MULTIPLE_RECORDINGS
|
||||||
if (Receiving()) {
|
if (Receiving()) {
|
||||||
if (IsTunedTo(Channel)) {
|
if (IsTunedTo(Channel)) {
|
||||||
needsDetachReceivers = false;
|
needsDetachReceivers = false;
|
||||||
@ -365,6 +367,7 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne
|
|||||||
result = hasPriority;
|
result = hasPriority;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
result = hasPriority;
|
result = hasPriority;
|
||||||
}
|
}
|
||||||
if (NeedsDetachReceivers)
|
if (NeedsDetachReceivers)
|
||||||
@ -381,11 +384,6 @@ static unsigned int FrequencyToHz(unsigned int f)
|
|||||||
|
|
||||||
bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
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 IsEncrypted = Channel->Ca() > CACONFBASE;
|
||||||
|
|
||||||
bool DoTune = !IsTunedTo(Channel);
|
bool DoTune = !IsTunedTo(Channel);
|
||||||
@ -408,6 +406,11 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
|| LiveView
|
|| LiveView
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#ifndef DO_MULTIPLE_RECORDINGS
|
||||||
|
TurnOffLivePIDs = TurnOnLivePIDs = true;
|
||||||
|
StartTransferMode = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Stop setting system time:
|
// Stop setting system time:
|
||||||
|
|
||||||
if (siProcessor)
|
if (siProcessor)
|
||||||
@ -633,6 +636,10 @@ void cDvbDevice::SetAudioTrackDevice(int Index)
|
|||||||
|
|
||||||
bool cDvbDevice::CanReplay(void) const
|
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
|
return cDevice::CanReplay() && !Ca(); // we can only replay if there is no Ca recording going on
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user