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
|
That way every recording will store the actual summary data at the time of
|
||||||
the recording.
|
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
|
- Fixed behaviour in case the shutdown didn't take place (there were many
|
||||||
"next timer event at..." messages in that case).
|
"next timer event at..." messages in that case).
|
||||||
- Reduced the default value for MinEventTimeout to 30 minutes.
|
- Reduced the default value for MinEventTimeout to 30 minutes.
|
||||||
- Fixed detecting manual start in shutdown feature.
|
- 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
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "config.h"
|
||||||
@ -303,14 +303,19 @@ bool cChannel::Switch(cDvbApi *DvbApi, bool Log)
|
|||||||
isyslog(LOG_INFO, "switching to channel %d", number);
|
isyslog(LOG_INFO, "switching to channel %d", number);
|
||||||
}
|
}
|
||||||
for (int i = 3; i--;) {
|
for (int i = 3; i--;) {
|
||||||
if (DvbApi->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid1, apid2, dpid1, dpid2, tpid, ca, pnr))
|
switch (DvbApi->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid1, apid2, dpid1, dpid2, tpid, ca, pnr)) {
|
||||||
return true;
|
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");
|
esyslog(LOG_ERR, "retrying");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (DvbApi->Recording())
|
if (DvbApi->Recording())
|
||||||
Interface->Info(tr("Channel locked (recording)!"));
|
Interface->Error(tr("Channel locked (recording)!"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
26
dvbapi.c
26
dvbapi.c
@ -7,7 +7,7 @@
|
|||||||
* DVD support initially written by Andreas Schultz <aschultz@warp10.net>
|
* DVD support initially written by Andreas Schultz <aschultz@warp10.net>
|
||||||
* based on dvdplayer-0.5 by Matjaz Thaler <matjaz.thaler@guest.arnes.si>
|
* 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
|
//#define DVDDEBUG 1
|
||||||
@ -3031,7 +3031,7 @@ bool cDvbApi::SetPids(bool ForRecording)
|
|||||||
SetDpid2(ForRecording ? dPid2 : 0, DMX_OUT_TS_TAP);
|
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
|
// Make sure the siProcessor won't access the device while switching
|
||||||
cThreadLock ThreadLock(siProcessor);
|
cThreadLock ThreadLock(siProcessor);
|
||||||
@ -3162,21 +3162,21 @@ bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
esyslog(LOG_ERR, "ERROR: attempt to set channel without DVB-S or DVB-C device");
|
esyslog(LOG_ERR, "ERROR: attempt to set channel without DVB-S or DVB-C device");
|
||||||
return false;
|
return scrFailed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ChannelSynced) {
|
if (!ChannelSynced) {
|
||||||
esyslog(LOG_ERR, "ERROR: channel %d not sync'ed on DVB card %d!", ChannelNumber, CardIndex() + 1);
|
esyslog(LOG_ERR, "ERROR: channel %d not sync'ed on DVB card %d!", ChannelNumber, CardIndex() + 1);
|
||||||
if (this == PrimaryDvbApi)
|
if (this == PrimaryDvbApi)
|
||||||
cThread::RaisePanic();
|
cThread::RaisePanic();
|
||||||
return false;
|
return scrFailed;
|
||||||
}
|
}
|
||||||
|
|
||||||
// PID settings:
|
// PID settings:
|
||||||
|
|
||||||
if (!SetPids(false)) {
|
if (!SetPids(false)) {
|
||||||
esyslog(LOG_ERR, "ERROR: failed to set PIDs for channel %d", ChannelNumber);
|
esyslog(LOG_ERR, "ERROR: failed to set PIDs for channel %d", ChannelNumber);
|
||||||
return false;
|
return scrFailed;
|
||||||
}
|
}
|
||||||
SetTpid(Tpid, DMX_OUT_DECODER);
|
SetTpid(Tpid, DMX_OUT_DECODER);
|
||||||
if (fd_audio >= 0)
|
if (fd_audio >= 0)
|
||||||
@ -3186,19 +3186,21 @@ bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization,
|
|||||||
if (this == PrimaryDvbApi && siProcessor)
|
if (this == PrimaryDvbApi && siProcessor)
|
||||||
siProcessor->SetCurrentServiceID(Pnr);
|
siProcessor->SetCurrentServiceID(Pnr);
|
||||||
|
|
||||||
|
eSetChannelResult Result = scrOk;
|
||||||
|
|
||||||
// If this DVB card can't receive this channel, let's see if we can
|
// 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:
|
// use the card that actually can receive it and transfer data from there:
|
||||||
|
|
||||||
if (NeedsTransferMode) {
|
if (NeedsTransferMode) {
|
||||||
cDvbApi *CaDvbApi = GetDvbApi(Ca, 0);
|
cDvbApi *CaDvbApi = GetDvbApi(Ca, 0);
|
||||||
if (CaDvbApi) {
|
if (CaDvbApi && !CaDvbApi->Recording()) {
|
||||||
if (!CaDvbApi->Recording()) {
|
if ((Result = CaDvbApi->SetChannel(ChannelNumber, FrequencyMHz, Polarization, Diseqc, Srate, Vpid, Apid1, Apid2, Dpid1, Dpid2, Tpid, Ca, Pnr)) == scrOk) {
|
||||||
if (CaDvbApi->SetChannel(ChannelNumber, FrequencyMHz, Polarization, Diseqc, Srate, Vpid, Apid1, Apid2, Dpid1, Dpid2, Tpid, Ca, Pnr)) {
|
SetModeReplay();
|
||||||
SetModeReplay();
|
transferringFromDvbApi = CaDvbApi->StartTransfer(fd_video);
|
||||||
transferringFromDvbApi = CaDvbApi->StartTransfer(fd_video);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
Result = scrNoTransfer;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fd_video >= 0 && fd_audio >= 0) {
|
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));
|
CHECK(ioctl(fd_video, VIDEO_SET_BLANK, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cDvbApi::Transferring(void)
|
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
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
#ifndef __DVBAPI_H
|
||||||
@ -56,6 +56,8 @@ const char *IndexToHMSF(int Index, bool WithFrame = false);
|
|||||||
int HMSFToIndex(const char *HMSF);
|
int HMSFToIndex(const char *HMSF);
|
||||||
// Converts the given string (format: "hh:mm:ss.ff") to an index.
|
// Converts the given string (format: "hh:mm:ss.ff") to an index.
|
||||||
|
|
||||||
|
enum eSetChannelResult { scrOk, scrNoTransfer, scrFailed };
|
||||||
|
|
||||||
class cChannel;
|
class cChannel;
|
||||||
|
|
||||||
class cRecordBuffer;
|
class cRecordBuffer;
|
||||||
@ -203,7 +205,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
int currentChannel;
|
int currentChannel;
|
||||||
public:
|
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; }
|
static int CurrentChannel(void) { return PrimaryDvbApi ? PrimaryDvbApi->currentChannel : 0; }
|
||||||
int Channel(void) { return currentChannel; }
|
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
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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>
|
* Slovenian translations provided by Miha Setina <mihasetina@softhome.net>
|
||||||
* Italian translations provided by Alberto Carraro <bertocar@tin.it>
|
* Italian translations provided by Alberto Carraro <bertocar@tin.it>
|
||||||
@ -658,6 +658,15 @@ const tPhrase Phrases[] = {
|
|||||||
"Chaîne verrouillée (enregistrement en cours)!",
|
"Chaîne verrouillée (enregistrement en cours)!",
|
||||||
"Kanalen er låst (opptak)!",
|
"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!",
|
{ "Can't start editing process!",
|
||||||
"Schnitt kann nicht gestartet werden!",
|
"Schnitt kann nicht gestartet werden!",
|
||||||
"Ne morem zaceti urejanja!",
|
"Ne morem zaceti urejanja!",
|
||||||
|
Loading…
Reference in New Issue
Block a user