mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Error message if Transfer Mode can't be started
This commit is contained in:
parent
3b6782a774
commit
0c8cc01b1a
5
HISTORY
5
HISTORY
@ -716,9 +716,12 @@ Video Disk Recorder Revision History
|
||||
That way every recording will store the actual summary data at the time of
|
||||
the recording.
|
||||
|
||||
2001-09-03: Version 0.95
|
||||
2001-09-08: Version 0.95
|
||||
|
||||
- Fixed behaviour in case the shutdown didn't take place (there were many
|
||||
"next timer event at..." messages in that case).
|
||||
- Reduced the default value for MinEventTimeout to 30 minutes.
|
||||
- Fixed detecting manual start in shutdown feature.
|
||||
- An error message is now displayed in case the Transfer Mode can't be
|
||||
started because the necessary DVB card is currently recording (or there
|
||||
is no DVB card that can access this channel).
|
||||
|
13
config.c
13
config.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: config.c 1.65 2001/09/03 16:01:46 kls Exp $
|
||||
* $Id: config.c 1.66 2001/09/08 11:41:12 kls Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -303,14 +303,19 @@ bool cChannel::Switch(cDvbApi *DvbApi, bool Log)
|
||||
isyslog(LOG_INFO, "switching to channel %d", number);
|
||||
}
|
||||
for (int i = 3; i--;) {
|
||||
if (DvbApi->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid1, apid2, dpid1, dpid2, tpid, ca, pnr))
|
||||
return true;
|
||||
switch (DvbApi->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid1, apid2, dpid1, dpid2, tpid, ca, pnr)) {
|
||||
case scrOk: return true;
|
||||
case scrNoTransfer: if (Interface)
|
||||
Interface->Error(tr("Can't start Transfer Mode!"));
|
||||
return false;
|
||||
case scrFailed: break; // loop will retry
|
||||
}
|
||||
esyslog(LOG_ERR, "retrying");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (DvbApi->Recording())
|
||||
Interface->Info(tr("Channel locked (recording)!"));
|
||||
Interface->Error(tr("Channel locked (recording)!"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
22
dvbapi.c
22
dvbapi.c
@ -7,7 +7,7 @@
|
||||
* DVD support initially written by Andreas Schultz <aschultz@warp10.net>
|
||||
* based on dvdplayer-0.5 by Matjaz Thaler <matjaz.thaler@guest.arnes.si>
|
||||
*
|
||||
* $Id: dvbapi.c 1.111 2001/09/01 13:27:52 kls Exp $
|
||||
* $Id: dvbapi.c 1.112 2001/09/08 11:36:12 kls Exp $
|
||||
*/
|
||||
|
||||
//#define DVDDEBUG 1
|
||||
@ -3031,7 +3031,7 @@ bool cDvbApi::SetPids(bool ForRecording)
|
||||
SetDpid2(ForRecording ? dPid2 : 0, DMX_OUT_TS_TAP);
|
||||
}
|
||||
|
||||
bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization, int Diseqc, int Srate, int Vpid, int Apid1, int Apid2, int Dpid1, int Dpid2, int Tpid, int Ca, int Pnr)
|
||||
eSetChannelResult cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization, int Diseqc, int Srate, int Vpid, int Apid1, int Apid2, int Dpid1, int Dpid2, int Tpid, int Ca, int Pnr)
|
||||
{
|
||||
// Make sure the siProcessor won't access the device while switching
|
||||
cThreadLock ThreadLock(siProcessor);
|
||||
@ -3162,21 +3162,21 @@ bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization,
|
||||
}
|
||||
else {
|
||||
esyslog(LOG_ERR, "ERROR: attempt to set channel without DVB-S or DVB-C device");
|
||||
return false;
|
||||
return scrFailed;
|
||||
}
|
||||
|
||||
if (!ChannelSynced) {
|
||||
esyslog(LOG_ERR, "ERROR: channel %d not sync'ed on DVB card %d!", ChannelNumber, CardIndex() + 1);
|
||||
if (this == PrimaryDvbApi)
|
||||
cThread::RaisePanic();
|
||||
return false;
|
||||
return scrFailed;
|
||||
}
|
||||
|
||||
// PID settings:
|
||||
|
||||
if (!SetPids(false)) {
|
||||
esyslog(LOG_ERR, "ERROR: failed to set PIDs for channel %d", ChannelNumber);
|
||||
return false;
|
||||
return scrFailed;
|
||||
}
|
||||
SetTpid(Tpid, DMX_OUT_DECODER);
|
||||
if (fd_audio >= 0)
|
||||
@ -3186,19 +3186,21 @@ bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization,
|
||||
if (this == PrimaryDvbApi && siProcessor)
|
||||
siProcessor->SetCurrentServiceID(Pnr);
|
||||
|
||||
eSetChannelResult Result = scrOk;
|
||||
|
||||
// If this DVB card can't receive this channel, let's see if we can
|
||||
// use the card that actually can receive it and transfer data from there:
|
||||
|
||||
if (NeedsTransferMode) {
|
||||
cDvbApi *CaDvbApi = GetDvbApi(Ca, 0);
|
||||
if (CaDvbApi) {
|
||||
if (!CaDvbApi->Recording()) {
|
||||
if (CaDvbApi->SetChannel(ChannelNumber, FrequencyMHz, Polarization, Diseqc, Srate, Vpid, Apid1, Apid2, Dpid1, Dpid2, Tpid, Ca, Pnr)) {
|
||||
if (CaDvbApi && !CaDvbApi->Recording()) {
|
||||
if ((Result = CaDvbApi->SetChannel(ChannelNumber, FrequencyMHz, Polarization, Diseqc, Srate, Vpid, Apid1, Apid2, Dpid1, Dpid2, Tpid, Ca, Pnr)) == scrOk) {
|
||||
SetModeReplay();
|
||||
transferringFromDvbApi = CaDvbApi->StartTransfer(fd_video);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
Result = scrNoTransfer;
|
||||
}
|
||||
|
||||
if (fd_video >= 0 && fd_audio >= 0) {
|
||||
@ -3206,7 +3208,7 @@ bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization,
|
||||
CHECK(ioctl(fd_video, VIDEO_SET_BLANK, false));
|
||||
}
|
||||
|
||||
return true;
|
||||
return Result;
|
||||
}
|
||||
|
||||
bool cDvbApi::Transferring(void)
|
||||
|
6
dvbapi.h
6
dvbapi.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: dvbapi.h 1.47 2001/08/25 13:37:00 kls Exp $
|
||||
* $Id: dvbapi.h 1.48 2001/09/08 11:35:25 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __DVBAPI_H
|
||||
@ -56,6 +56,8 @@ const char *IndexToHMSF(int Index, bool WithFrame = false);
|
||||
int HMSFToIndex(const char *HMSF);
|
||||
// Converts the given string (format: "hh:mm:ss.ff") to an index.
|
||||
|
||||
enum eSetChannelResult { scrOk, scrNoTransfer, scrFailed };
|
||||
|
||||
class cChannel;
|
||||
|
||||
class cRecordBuffer;
|
||||
@ -203,7 +205,7 @@ public:
|
||||
private:
|
||||
int currentChannel;
|
||||
public:
|
||||
bool SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization, int Diseqc, int Srate, int Vpid, int Apid1, int Apid2, int Dpid1, int Dpid2, int Tpid, int Ca, int Pnr);
|
||||
eSetChannelResult SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization, int Diseqc, int Srate, int Vpid, int Apid1, int Apid2, int Dpid1, int Dpid2, int Tpid, int Ca, int Pnr);
|
||||
static int CurrentChannel(void) { return PrimaryDvbApi ? PrimaryDvbApi->currentChannel : 0; }
|
||||
int Channel(void) { return currentChannel; }
|
||||
|
||||
|
11
i18n.c
11
i18n.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: i18n.c 1.39 2001/09/02 15:17:33 kls Exp $
|
||||
* $Id: i18n.c 1.40 2001/09/08 11:43:28 kls Exp $
|
||||
*
|
||||
* Slovenian translations provided by Miha Setina <mihasetina@softhome.net>
|
||||
* Italian translations provided by Alberto Carraro <bertocar@tin.it>
|
||||
@ -658,6 +658,15 @@ const tPhrase Phrases[] = {
|
||||
"Chaîne verrouillée (enregistrement en cours)!",
|
||||
"Kanalen er låst (opptak)!",
|
||||
},
|
||||
{ "Can't start Transfer Mode!",
|
||||
"Transfer-Mode kann nicht gestartet werden!",
|
||||
"", // TODO
|
||||
"", // TODO
|
||||
"", // TODO
|
||||
"", // TODO
|
||||
"", // TODO
|
||||
"", // TODO
|
||||
},
|
||||
{ "Can't start editing process!",
|
||||
"Schnitt kann nicht gestartet werden!",
|
||||
"Ne morem zaceti urejanja!",
|
||||
|
Loading…
Reference in New Issue
Block a user