mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 17:16:51 +00:00
added support for VDR 1.7.19 SignalStrength/SignalQuality
This commit is contained in:
@@ -840,6 +840,7 @@ bool cConnectionVTP::Command(char *Cmd)
|
||||
else if (strcasecmp(Cmd, "TUNE") == 0) return CmdTUNE(param);
|
||||
else if (strcasecmp(Cmd, "PLAY") == 0) return CmdPLAY(param);
|
||||
else if (strcasecmp(Cmd, "PRIO") == 0) return CmdPRIO(param);
|
||||
else if (strcasecmp(Cmd, "SGNL") == 0) return CmdSGNL(param);
|
||||
else if (strcasecmp(Cmd, "ADDP") == 0) return CmdADDP(param);
|
||||
else if (strcasecmp(Cmd, "DELP") == 0) return CmdDELP(param);
|
||||
else if (strcasecmp(Cmd, "ADDF") == 0) return CmdADDF(param);
|
||||
@@ -1155,6 +1156,18 @@ bool cConnectionVTP::CmdPRIO(char *Opts)
|
||||
return Respond(550, "Priority not applicable");
|
||||
}
|
||||
|
||||
bool cConnectionVTP::CmdSGNL(char *Opts)
|
||||
{
|
||||
if (m_LiveStreamer) {
|
||||
int devnum = -1;
|
||||
int signal = -1;
|
||||
int quality = -1;
|
||||
m_LiveStreamer->GetSignal(&devnum, &signal, &quality);
|
||||
return Respond(220, "%d %d:%d", devnum, signal, quality);
|
||||
}
|
||||
return Respond(550, "Signal not applicable");
|
||||
}
|
||||
|
||||
bool cConnectionVTP::CmdADDP(char *Opts)
|
||||
{
|
||||
int pid;
|
||||
|
@@ -65,6 +65,7 @@ public:
|
||||
bool CmdTUNE(char *Opts);
|
||||
bool CmdPLAY(char *Opts);
|
||||
bool CmdPRIO(char *Opts);
|
||||
bool CmdSGNL(char *Opts);
|
||||
bool CmdADDP(char *Opts);
|
||||
bool CmdDELP(char *Opts);
|
||||
bool CmdADDF(char *Opts);
|
||||
|
@@ -440,6 +440,17 @@ void cStreamdevLiveStreamer::SetPriority(int Priority)
|
||||
StartReceiver();
|
||||
}
|
||||
|
||||
void cStreamdevLiveStreamer::GetSignal(int *DevNum, int *Strength, int *Quality) const
|
||||
{
|
||||
if (m_Device) {
|
||||
*DevNum = m_Device->DeviceNumber() + 1;
|
||||
#if APIVERSNUM >= 10719
|
||||
*Strength = m_Device->SignalStrength();
|
||||
*Quality = m_Device->SignalQuality();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void cStreamdevLiveStreamer::StartReceiver(void)
|
||||
{
|
||||
if (m_NumPids > 0) {
|
||||
|
@@ -39,6 +39,7 @@ public:
|
||||
bool SetPids(int Pid, const int *Pids1 = NULL, const int *Pids2 = NULL, const int *Pids3 = NULL);
|
||||
bool SetChannel(const cChannel *Channel, eStreamType StreamType, const int* Apid = NULL, const int* Dpid = NULL);
|
||||
void SetPriority(int Priority);
|
||||
void GetSignal(int *DevNum, int *Strength, int *Quality) const;
|
||||
|
||||
virtual int Put(const uchar *Data, int Count);
|
||||
virtual uchar *Get(int &Count);
|
||||
|
Reference in New Issue
Block a user