mirror of
https://github.com/rofafor/vdr-plugin-satip.git
synced 2023-10-10 11:37:42 +00:00
Compare commits
73 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43373b6951 | ||
|
|
0a15717245 | ||
|
|
82cf5488a7 | ||
|
|
8dc4844db8 | ||
|
|
e008ee04b2 | ||
|
|
8be58070ad | ||
|
|
72c3247dc2 | ||
|
|
dbe67a2242 | ||
|
|
f4454b0f0d | ||
|
|
0a9bb96dd4 | ||
|
|
3cc63dadac | ||
|
|
46a197d8f8 | ||
|
|
ece52576dd | ||
|
|
5159508f2d | ||
|
|
c4c2ba8d14 | ||
|
|
e90926d5f6 | ||
|
|
27e86dd3ea | ||
|
|
7e6b722747 | ||
|
|
97097f74af | ||
|
|
1de063ca38 | ||
|
|
bf5b058725 | ||
|
|
470fee436f | ||
|
|
c10372bb4f | ||
|
|
1984ec662c | ||
|
|
537c0ad000 | ||
|
|
732e28d0f0 | ||
|
|
3a9dc9a634 | ||
|
|
438f5c9254 | ||
|
|
5e524a969e | ||
|
|
8b1d8de468 | ||
|
|
12b5dac447 | ||
|
|
40943b8bd2 | ||
|
|
e092d085b8 | ||
|
|
1158141d35 | ||
|
|
c6145e1ed9 | ||
|
|
c5da1074f3 | ||
|
|
69795ec82a | ||
|
|
3cf32a64eb | ||
|
|
3fd4928d75 | ||
|
|
941a13b794 | ||
|
|
20e9dc99f9 | ||
|
|
d26658a22e | ||
|
|
a5d57e9390 | ||
|
|
af64cb3011 | ||
|
|
48862f99d3 | ||
|
|
6ed729c153 | ||
|
|
0fc044a316 | ||
|
|
94b7f1132f | ||
|
|
e7c9b04ad2 | ||
|
|
9c91e01a87 | ||
|
|
7a84ba78c8 | ||
|
|
c2fe2b748d | ||
|
|
13a6b5938f | ||
|
|
5db9f93a11 | ||
|
|
cede4743cb | ||
|
|
4e9b6f11eb | ||
|
|
4b1892d754 | ||
|
|
473e016152 | ||
|
|
793aab17d7 | ||
|
|
8222d05f5d | ||
|
|
9d7c745fe1 | ||
|
|
c8a5245b6c | ||
|
|
ff459f426e | ||
|
|
4c216d81c8 | ||
|
|
23e2b4d54d | ||
|
|
954e1be6b3 | ||
|
|
e46340f5f3 | ||
|
|
d5e9b1050e | ||
|
|
6e9b5fc414 | ||
|
|
6e9b43b0d8 | ||
|
|
97aba6db0f | ||
|
|
660c48a9f4 | ||
|
|
67b6c9f4f7 |
28
HISTORY
28
HISTORY
@@ -165,3 +165,31 @@ VDR Plugin 'satip' Revision History
|
|||||||
- Added support for FRITZ!Box 6490 Cable (Thanks to 9000h).
|
- Added support for FRITZ!Box 6490 Cable (Thanks to 9000h).
|
||||||
- Updated FRITZ!WLAN Repeater DVB-C detection for the latest firmware (Thanks to 9000h).
|
- Updated FRITZ!WLAN Repeater DVB-C detection for the latest firmware (Thanks to 9000h).
|
||||||
- Added GCC7 compatibility (Thanks to Sascha Kuehndel).
|
- Added GCC7 compatibility (Thanks to Sascha Kuehndel).
|
||||||
|
|
||||||
|
|
||||||
|
===================================
|
||||||
|
VDR Plugin 'satip' Revision History
|
||||||
|
===================================
|
||||||
|
|
||||||
|
2016-12-18: Version 2.3.0
|
||||||
|
|
||||||
|
- Updated for vdr-2.3.1.
|
||||||
|
- Updated German translation (Thanks to Frank Neumann).
|
||||||
|
- Fixed Panasonic CXW804 support (Thanks to Tobias Grimm).
|
||||||
|
- Fixed C++11 support (Thanks to Tobias Grimm).
|
||||||
|
- Fixed server assigment with source validation (Thanks to Patrick Boettcher).
|
||||||
|
- Added configurable RTP/RTCP ports (Thanks to chriszero).
|
||||||
|
- Added support for X-SATIP-RTSP-Port header.
|
||||||
|
- Added multicast and RTP-over-TCP support.
|
||||||
|
- Added support for activating/deactivating server on-the-fly.
|
||||||
|
- Extended command-line parameters for setting server quirks.
|
||||||
|
|
||||||
|
2017-08-15: Version 2.3.1
|
||||||
|
|
||||||
|
- Updated for vdr-2.3.7 (Thanks to Klaus Schmidinger).
|
||||||
|
- Added Polish translation (Thanks to Tomasz Nowak).
|
||||||
|
- Updated Catalan and Spanish translations (Thanks to Gabriel Bonich).
|
||||||
|
- Added support for KATHREIN SatIP Server (Thanks to kavanu).
|
||||||
|
- Added support for FRITZ!Box 6490 Cable (Thanks to 9000h).
|
||||||
|
- Updated FRITZ!WLAN Repeater DVB-C detection for the latest firmware (Thanks to 9000h).
|
||||||
|
- Added GCC7 compatibility (Thanks to Sascha Kuehndel).
|
||||||
|
|||||||
27
Makefile
27
Makefile
@@ -88,14 +88,15 @@ all: $(SOFILE) i18n
|
|||||||
### Implicit rules:
|
### Implicit rules:
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
|
@echo CC $@
|
||||||
|
$(Q)$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
|
||||||
|
|
||||||
### Dependencies:
|
### Dependencies:
|
||||||
|
|
||||||
MAKEDEP = $(CXX) -MM -MG
|
MAKEDEP = $(CXX) -MM -MG
|
||||||
DEPFILE = .dependencies
|
DEPFILE = .dependencies
|
||||||
$(DEPFILE): Makefile
|
$(DEPFILE): Makefile
|
||||||
@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
|
$(Q)$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
|
||||||
|
|
||||||
-include $(DEPFILE)
|
-include $(DEPFILE)
|
||||||
|
|
||||||
@@ -108,17 +109,21 @@ I18Nmsgs = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLU
|
|||||||
I18Npot = $(PODIR)/$(PLUGIN).pot
|
I18Npot = $(PODIR)/$(PLUGIN).pot
|
||||||
|
|
||||||
%.mo: %.po
|
%.mo: %.po
|
||||||
msgfmt -c -o $@ $<
|
@echo MO $@
|
||||||
|
$(Q)msgfmt -c -o $@ $<
|
||||||
|
|
||||||
$(I18Npot): $(wildcard *.c)
|
$(I18Npot): $(wildcard *.c)
|
||||||
xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='<see README>' -o $@ `ls $^`
|
@echo GT $@
|
||||||
|
$(Q)xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='<see README>' -o $@ `ls $^`
|
||||||
|
|
||||||
%.po: $(I18Npot)
|
%.po: $(I18Npot)
|
||||||
msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
|
@echo PO $@
|
||||||
|
$(Q)msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
|
||||||
@touch $@
|
@touch $@
|
||||||
|
|
||||||
$(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
|
$(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
|
||||||
install -D -m644 $< $@
|
@echo IN $@
|
||||||
|
$(Q)install -D -m644 $< $@
|
||||||
|
|
||||||
.PHONY: i18n
|
.PHONY: i18n
|
||||||
i18n: $(I18Nmo) $(I18Npot)
|
i18n: $(I18Nmo) $(I18Npot)
|
||||||
@@ -128,11 +133,13 @@ install-i18n: $(I18Nmsgs)
|
|||||||
### Targets:
|
### Targets:
|
||||||
|
|
||||||
$(SOFILE): $(OBJS)
|
$(SOFILE): $(OBJS)
|
||||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) -o $@
|
@echo LD $@
|
||||||
@$(STRIP) $@
|
$(Q)$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) $(LIBS) -o $@
|
||||||
|
$(Q)$(STRIP) $@
|
||||||
|
|
||||||
install-lib: $(SOFILE)
|
install-lib: $(SOFILE)
|
||||||
install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
|
@echo IN $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
|
||||||
|
$(Q)install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
|
||||||
|
|
||||||
install-conf:
|
install-conf:
|
||||||
@mkdir -p $(DESTDIR)$(CFGDIR)/plugins/$(PLUGIN)
|
@mkdir -p $(DESTDIR)$(CFGDIR)/plugins/$(PLUGIN)
|
||||||
@@ -153,4 +160,4 @@ clean:
|
|||||||
|
|
||||||
.PHONY: cppcheck
|
.PHONY: cppcheck
|
||||||
cppcheck:
|
cppcheck:
|
||||||
@cppcheck --language=c++ --enable=all -v -f $(OBJS:%.o=%.c)
|
$(Q)cppcheck --language=c++ --enable=all -v -f $(OBJS:%.o=%.c)
|
||||||
|
|||||||
56
device.c
56
device.c
@@ -19,8 +19,9 @@ cMutex cSatipDevice::mutexS = cMutex();
|
|||||||
|
|
||||||
cSatipDevice::cSatipDevice(unsigned int indexP)
|
cSatipDevice::cSatipDevice(unsigned int indexP)
|
||||||
: deviceIndexM(indexP),
|
: deviceIndexM(indexP),
|
||||||
isPacketDeliveredM(false),
|
bytesDeliveredM(0),
|
||||||
isOpenDvrM(false),
|
isOpenDvrM(false),
|
||||||
|
checkTsBufferM(false),
|
||||||
deviceNameM(*cString::sprintf("%s %d", *DeviceType(), deviceIndexM)),
|
deviceNameM(*cString::sprintf("%s %d", *DeviceType(), deviceIndexM)),
|
||||||
channelM(),
|
channelM(),
|
||||||
createdM(0),
|
createdM(0),
|
||||||
@@ -107,12 +108,8 @@ cString cSatipDevice::GetSatipStatus(void)
|
|||||||
bool live = (device == cDevice::ActualDevice());
|
bool live = (device == cDevice::ActualDevice());
|
||||||
bool lock = device->HasLock();
|
bool lock = device->HasLock();
|
||||||
const cChannel *channel = device->GetCurrentlyTunedTransponder();
|
const cChannel *channel = device->GetCurrentlyTunedTransponder();
|
||||||
#if defined(APIVERSNUM) && APIVERSNUM >= 20301
|
|
||||||
LOCK_TIMERS_READ;
|
LOCK_TIMERS_READ;
|
||||||
for (const cTimer *timer = Timers->First(); timer; timer = Timers->Next(timer)) {
|
for (const cTimer *timer = Timers->First(); timer; timer = Timers->Next(timer)) {
|
||||||
#else
|
|
||||||
for (cTimer *timer = Timers.First(); timer; timer = Timers.Next(timer)) {
|
|
||||||
#endif
|
|
||||||
if (timer->Recording()) {
|
if (timer->Recording()) {
|
||||||
cRecordControl *control = cRecordControls::GetRecordControl(timer);
|
cRecordControl *control = cRecordControls::GetRecordControl(timer);
|
||||||
if (control && control->Device() == device)
|
if (control && control->Device() == device)
|
||||||
@@ -141,20 +138,14 @@ cString cSatipDevice::GetSatipStatus(void)
|
|||||||
cString cSatipDevice::GetGeneralInformation(void)
|
cString cSatipDevice::GetGeneralInformation(void)
|
||||||
{
|
{
|
||||||
debug16("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
|
debug16("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
|
||||||
#if defined(APIVERSNUM) && APIVERSNUM >= 20301
|
|
||||||
LOCK_CHANNELS_READ;
|
LOCK_CHANNELS_READ;
|
||||||
#endif
|
|
||||||
return cString::sprintf("SAT>IP device: %d\nCardIndex: %d\nStream: %s\nSignal: %s\nStream bitrate: %s\n%sChannel: %s\n",
|
return cString::sprintf("SAT>IP device: %d\nCardIndex: %d\nStream: %s\nSignal: %s\nStream bitrate: %s\n%sChannel: %s\n",
|
||||||
deviceIndexM, CardIndex(),
|
deviceIndexM, CardIndex(),
|
||||||
pTunerM ? *pTunerM->GetInformation() : "",
|
pTunerM ? *pTunerM->GetInformation() : "",
|
||||||
pTunerM ? *pTunerM->GetSignalStatus() : "",
|
pTunerM ? *pTunerM->GetSignalStatus() : "",
|
||||||
pTunerM ? *pTunerM->GetTunerStatistic() : "",
|
pTunerM ? *pTunerM->GetTunerStatistic() : "",
|
||||||
*GetBufferStatistic(),
|
*GetBufferStatistic(),
|
||||||
#if defined(APIVERSNUM) && APIVERSNUM >= 20301
|
|
||||||
*Channels->GetByNumber(cDevice::CurrentChannel())->ToText());
|
*Channels->GetByNumber(cDevice::CurrentChannel())->ToText());
|
||||||
#else
|
|
||||||
*Channels.GetByNumber(cDevice::CurrentChannel())->ToText());
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cString cSatipDevice::GetPidsInformation(void)
|
cString cSatipDevice::GetPidsInformation(void)
|
||||||
@@ -225,6 +216,21 @@ bool cSatipDevice::AvoidRecording(void) const
|
|||||||
return SatipConfig.IsOperatingModeLow();
|
return SatipConfig.IsOperatingModeLow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cSatipDevice::SignalStats(int &Valid, double *Strength, double *Cnr, double *BerPre, double *BerPost, double *Per, int *Status) const
|
||||||
|
{
|
||||||
|
debug16("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
|
||||||
|
Valid = DTV_STAT_VALID_NONE;
|
||||||
|
if (Strength && pTunerM) {
|
||||||
|
*Strength = pTunerM->SignalStrengthDBm();
|
||||||
|
Valid |= DTV_STAT_VALID_STRENGTH;
|
||||||
|
}
|
||||||
|
if (Status) {
|
||||||
|
*Status = HasLock() ? (DTV_STAT_HAS_SIGNAL | DTV_STAT_HAS_CARRIER | DTV_STAT_HAS_VITERBI | DTV_STAT_HAS_SYNC | DTV_STAT_HAS_LOCK) : DTV_STAT_HAS_NONE;
|
||||||
|
Valid |= DTV_STAT_VALID_STATUS;
|
||||||
|
}
|
||||||
|
return Valid != DTV_STAT_VALID_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
int cSatipDevice::SignalStrength(void) const
|
int cSatipDevice::SignalStrength(void) const
|
||||||
{
|
{
|
||||||
debug16("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
|
debug16("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
|
||||||
@@ -419,7 +425,7 @@ void cSatipDevice::CloseFilter(int handleP)
|
|||||||
bool cSatipDevice::OpenDvr(void)
|
bool cSatipDevice::OpenDvr(void)
|
||||||
{
|
{
|
||||||
debug9("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
|
debug9("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
|
||||||
isPacketDeliveredM = false;
|
bytesDeliveredM = 0;
|
||||||
tsBufferM->Clear();
|
tsBufferM->Clear();
|
||||||
if (pTunerM)
|
if (pTunerM)
|
||||||
pTunerM->Open();
|
pTunerM->Open();
|
||||||
@@ -505,13 +511,17 @@ bool cSatipDevice::IsIdle(void)
|
|||||||
return !Receiving();
|
return !Receiving();
|
||||||
}
|
}
|
||||||
|
|
||||||
uchar *cSatipDevice::GetData(int *availableP)
|
uchar *cSatipDevice::GetData(int *availableP, bool checkTsBuffer)
|
||||||
{
|
{
|
||||||
debug16("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
|
debug16("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
|
||||||
if (isOpenDvrM && tsBufferM) {
|
if (isOpenDvrM && tsBufferM) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
if (isPacketDeliveredM)
|
if (bytesDeliveredM) {
|
||||||
SkipData(TS_SIZE);
|
tsBufferM->Del(bytesDeliveredM);
|
||||||
|
bytesDeliveredM = 0;
|
||||||
|
}
|
||||||
|
if (checkTsBuffer && tsBufferM->Available() < TS_SIZE)
|
||||||
|
return NULL;
|
||||||
uchar *p = tsBufferM->Get(count);
|
uchar *p = tsBufferM->Get(count);
|
||||||
if (p && count >= TS_SIZE) {
|
if (p && count >= TS_SIZE) {
|
||||||
if (*p != TS_SYNC_BYTE) {
|
if (*p != TS_SYNC_BYTE) {
|
||||||
@@ -525,7 +535,7 @@ uchar *cSatipDevice::GetData(int *availableP)
|
|||||||
info("Skipped %d bytes to sync on TS packet", count);
|
info("Skipped %d bytes to sync on TS packet", count);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
isPacketDeliveredM = true;
|
bytesDeliveredM = TS_SIZE;
|
||||||
if (availableP)
|
if (availableP)
|
||||||
*availableP = count;
|
*availableP = count;
|
||||||
// Update pid statistics
|
// Update pid statistics
|
||||||
@@ -539,8 +549,7 @@ uchar *cSatipDevice::GetData(int *availableP)
|
|||||||
void cSatipDevice::SkipData(int countP)
|
void cSatipDevice::SkipData(int countP)
|
||||||
{
|
{
|
||||||
debug16("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
|
debug16("%s [device %u]", __PRETTY_FUNCTION__, deviceIndexM);
|
||||||
tsBufferM->Del(countP);
|
bytesDeliveredM = countP;
|
||||||
isPacketDeliveredM = false;
|
|
||||||
// Update buffer statistics
|
// Update buffer statistics
|
||||||
AddBufferStatistic(countP, tsBufferM->Available());
|
AddBufferStatistic(countP, tsBufferM->Available());
|
||||||
}
|
}
|
||||||
@@ -554,11 +563,12 @@ bool cSatipDevice::GetTSPacket(uchar *&dataP)
|
|||||||
if (cCamSlot *cs = CamSlot()) {
|
if (cCamSlot *cs = CamSlot()) {
|
||||||
if (cs->WantsTsData()) {
|
if (cs->WantsTsData()) {
|
||||||
int available;
|
int available;
|
||||||
dataP = GetData(&available);
|
dataP = GetData(&available, checkTsBufferM);
|
||||||
if (dataP) {
|
if (!dataP)
|
||||||
dataP = cs->Decrypt(dataP, available);
|
available = 0;
|
||||||
SkipData(available);
|
dataP = cs->Decrypt(dataP, available);
|
||||||
}
|
SkipData(available);
|
||||||
|
checkTsBufferM = dataP != NULL;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
8
device.h
8
device.h
@@ -32,8 +32,9 @@ private:
|
|||||||
eTuningTimeoutMs = 1000 // in milliseconds
|
eTuningTimeoutMs = 1000 // in milliseconds
|
||||||
};
|
};
|
||||||
unsigned int deviceIndexM;
|
unsigned int deviceIndexM;
|
||||||
bool isPacketDeliveredM;
|
int bytesDeliveredM;
|
||||||
bool isOpenDvrM;
|
bool isOpenDvrM;
|
||||||
|
bool checkTsBufferM;
|
||||||
cString deviceNameM;
|
cString deviceNameM;
|
||||||
cChannel channelM;
|
cChannel channelM;
|
||||||
cRingBufferLinear *tsBufferM;
|
cRingBufferLinear *tsBufferM;
|
||||||
@@ -64,6 +65,7 @@ public:
|
|||||||
virtual cString DeviceType(void) const;
|
virtual cString DeviceType(void) const;
|
||||||
virtual cString DeviceName(void) const;
|
virtual cString DeviceName(void) const;
|
||||||
virtual bool AvoidRecording(void) const;
|
virtual bool AvoidRecording(void) const;
|
||||||
|
virtual bool SignalStats(int &Valid, double *Strength = NULL, double *Cnr = NULL, double *BerPre = NULL, double *BerPost = NULL, double *Per = NULL, int *Status = NULL) const;
|
||||||
virtual int SignalStrength(void) const;
|
virtual int SignalStrength(void) const;
|
||||||
virtual int SignalQuality(void) const;
|
virtual int SignalQuality(void) const;
|
||||||
|
|
||||||
@@ -83,7 +85,7 @@ protected:
|
|||||||
|
|
||||||
// for recording
|
// for recording
|
||||||
private:
|
private:
|
||||||
uchar *GetData(int *availableP = NULL);
|
uchar *GetData(int *availableP = NULL, bool checkTsBuffer = false);
|
||||||
void SkipData(int countP);
|
void SkipData(int countP);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -99,7 +101,7 @@ public:
|
|||||||
|
|
||||||
// for transponder lock
|
// for transponder lock
|
||||||
public:
|
public:
|
||||||
virtual bool HasLock(int timeoutMsP) const;
|
virtual bool HasLock(int timeoutMsP = 0) const;
|
||||||
|
|
||||||
// for common interface
|
// for common interface
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-satip 2.2.5\n"
|
"Project-Id-Version: vdr-satip 2.3.1\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2017-08-15 08:15+0300\n"
|
"POT-Creation-Date: 2017-08-15 08:15+0300\n"
|
||||||
"PO-Revision-Date: 2017-08-15 08:15+0300\n"
|
"PO-Revision-Date: 2017-08-15 08:15+0300\n"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-satip 2.2.5\n"
|
"Project-Id-Version: vdr-satip 2.3.1\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2017-08-15 08:15+0300\n"
|
"POT-Creation-Date: 2017-08-15 08:15+0300\n"
|
||||||
"PO-Revision-Date: 2017-08-15 08:15+0300\n"
|
"PO-Revision-Date: 2017-08-15 08:15+0300\n"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-satip 2.2.5\n"
|
"Project-Id-Version: vdr-satip 2.3.1\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2017-08-15 08:15+0300\n"
|
"POT-Creation-Date: 2017-08-15 08:15+0300\n"
|
||||||
"PO-Revision-Date: 2017-08-15 08:15+0300\n"
|
"PO-Revision-Date: 2017-08-15 08:15+0300\n"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-satip 2.2.5\n"
|
"Project-Id-Version: vdr-satip 2.3.1\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2017-08-15 08:15+0300\n"
|
"POT-Creation-Date: 2017-08-15 08:15+0300\n"
|
||||||
"PO-Revision-Date: 2017-08-15 08:15+0300\n"
|
"PO-Revision-Date: 2017-08-15 08:15+0300\n"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: vdr-satip 2.2.5\n"
|
"Project-Id-Version: vdr-satip 2.3.1\n"
|
||||||
"Report-Msgid-Bugs-To: <see README>\n"
|
"Report-Msgid-Bugs-To: <see README>\n"
|
||||||
"POT-Creation-Date: 2017-08-15 08:15+0300\n"
|
"POT-Creation-Date: 2017-08-15 08:15+0300\n"
|
||||||
"PO-Revision-Date: 2017-08-15 08:15+0300\n"
|
"PO-Revision-Date: 2017-08-15 08:15+0300\n"
|
||||||
|
|||||||
6
satip.c
6
satip.c
@@ -20,15 +20,15 @@
|
|||||||
#warning "CURL version >= 7.36.0 is recommended"
|
#warning "CURL version >= 7.36.0 is recommended"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(APIVERSNUM) && APIVERSNUM < 20200
|
#if defined(APIVERSNUM) && APIVERSNUM < 20307
|
||||||
#error "VDR-2.2.0 API version or greater is required!"
|
#error "VDR-2.3.7 API version or greater is required!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GITVERSION
|
#ifndef GITVERSION
|
||||||
#define GITVERSION ""
|
#define GITVERSION ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char VERSION[] = "2.2.5" GITVERSION;
|
const char VERSION[] = "2.3.1" GITVERSION;
|
||||||
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
|
static const char DESCRIPTION[] = trNOOP("SAT>IP Devices");
|
||||||
|
|
||||||
class cPluginSatip : public cPlugin {
|
class cPluginSatip : public cPlugin {
|
||||||
|
|||||||
12
tuner.c
12
tuner.c
@@ -40,6 +40,7 @@ cSatipTuner::cSatipTuner(cSatipDeviceIf &deviceP, unsigned int packetLenP)
|
|||||||
externalStateM(),
|
externalStateM(),
|
||||||
timeoutM(eMinKeepAliveIntervalMs),
|
timeoutM(eMinKeepAliveIntervalMs),
|
||||||
hasLockM(false),
|
hasLockM(false),
|
||||||
|
signalStrengthDBmM(0.0),
|
||||||
signalStrengthM(-1),
|
signalStrengthM(-1),
|
||||||
signalQualityM(-1),
|
signalQualityM(-1),
|
||||||
frontendIdM(-1),
|
frontendIdM(-1),
|
||||||
@@ -135,6 +136,7 @@ void cSatipTuner::Action(void)
|
|||||||
// Quirk for devices without valid reception data
|
// Quirk for devices without valid reception data
|
||||||
if (currentServerM.IsQuirk(cSatipServer::eSatipQuirkForceLock)) {
|
if (currentServerM.IsQuirk(cSatipServer::eSatipQuirkForceLock)) {
|
||||||
hasLockM = true;
|
hasLockM = true;
|
||||||
|
signalStrengthDBmM = eDefaultSignalStrengthDBm;
|
||||||
signalStrengthM = eDefaultSignalStrength;
|
signalStrengthM = eDefaultSignalStrength;
|
||||||
signalQualityM = eDefaultSignalQuality;
|
signalQualityM = eDefaultSignalQuality;
|
||||||
}
|
}
|
||||||
@@ -264,6 +266,7 @@ bool cSatipTuner::Disconnect(void)
|
|||||||
|
|
||||||
// Reset signal parameters
|
// Reset signal parameters
|
||||||
hasLockM = false;
|
hasLockM = false;
|
||||||
|
signalStrengthDBmM = 0.0;
|
||||||
signalStrengthM = -1;
|
signalStrengthM = -1;
|
||||||
signalQualityM = -1;
|
signalQualityM = -1;
|
||||||
frontendIdM = -1;
|
frontendIdM = -1;
|
||||||
@@ -333,8 +336,9 @@ void cSatipTuner::ProcessApplicationData(u_char *bufferP, int lengthP)
|
|||||||
// No signal corresponds to 0
|
// No signal corresponds to 0
|
||||||
c = strstr(c, ",");
|
c = strstr(c, ",");
|
||||||
value = min(atoi(++c), 255);
|
value = min(atoi(++c), 255);
|
||||||
|
signalStrengthDBmM = (value >= 0) ? 40.0 * (value - 32) / 192.0 - 65.0 : 0.0;
|
||||||
// Scale value to 0-100
|
// Scale value to 0-100
|
||||||
signalStrengthM = (value >= 0) ? (value * 100 / 255) : -1;
|
signalStrengthM = (value >= 0) ? value * 100 / 255 : -1;
|
||||||
|
|
||||||
// lock:
|
// lock:
|
||||||
// lock Set to one of the following values:
|
// lock Set to one of the following values:
|
||||||
@@ -670,6 +674,12 @@ int cSatipTuner::SignalStrength(void)
|
|||||||
return signalStrengthM;
|
return signalStrengthM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
double cSatipTuner::SignalStrengthDBm(void)
|
||||||
|
{
|
||||||
|
debug16("%s [device %d]", __PRETTY_FUNCTION__, deviceIdM);
|
||||||
|
return signalStrengthDBmM;
|
||||||
|
}
|
||||||
|
|
||||||
int cSatipTuner::SignalQuality(void)
|
int cSatipTuner::SignalQuality(void)
|
||||||
{
|
{
|
||||||
debug16("%s [device %d]", __PRETTY_FUNCTION__, deviceIdM);
|
debug16("%s [device %d]", __PRETTY_FUNCTION__, deviceIdM);
|
||||||
|
|||||||
23
tuner.h
23
tuner.h
@@ -78,16 +78,17 @@ class cSatipTuner : public cThread, public cSatipTunerStatistics, public cSatipT
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
enum {
|
enum {
|
||||||
eDummyPid = 100,
|
eDummyPid = 100,
|
||||||
eDefaultSignalStrength = 15,
|
eDefaultSignalStrengthDBm = -25,
|
||||||
eDefaultSignalQuality = 224,
|
eDefaultSignalStrength = 224,
|
||||||
eSleepTimeoutMs = 250, // in milliseconds
|
eDefaultSignalQuality = 15,
|
||||||
eStatusUpdateTimeoutMs = 1000, // in milliseconds
|
eSleepTimeoutMs = 250, // in milliseconds
|
||||||
ePidUpdateIntervalMs = 250, // in milliseconds
|
eStatusUpdateTimeoutMs = 1000, // in milliseconds
|
||||||
eConnectTimeoutMs = 5000, // in milliseconds
|
ePidUpdateIntervalMs = 250, // in milliseconds
|
||||||
eIdleCheckTimeoutMs = 15000, // in milliseconds
|
eConnectTimeoutMs = 5000, // in milliseconds
|
||||||
eTuningTimeoutMs = 20000, // in milliseconds
|
eIdleCheckTimeoutMs = 15000, // in milliseconds
|
||||||
eMinKeepAliveIntervalMs = 30000 // in milliseconds
|
eTuningTimeoutMs = 20000, // in milliseconds
|
||||||
|
eMinKeepAliveIntervalMs = 30000 // in milliseconds
|
||||||
};
|
};
|
||||||
enum eTunerState { tsIdle, tsRelease, tsSet, tsTuned, tsLocked };
|
enum eTunerState { tsIdle, tsRelease, tsSet, tsTuned, tsLocked };
|
||||||
enum eStateMode { smInternal, smExternal };
|
enum eStateMode { smInternal, smExternal };
|
||||||
@@ -115,6 +116,7 @@ private:
|
|||||||
cVector<eTunerState> externalStateM;
|
cVector<eTunerState> externalStateM;
|
||||||
int timeoutM;
|
int timeoutM;
|
||||||
bool hasLockM;
|
bool hasLockM;
|
||||||
|
double signalStrengthDBmM;
|
||||||
int signalStrengthM;
|
int signalStrengthM;
|
||||||
int signalQualityM;
|
int signalQualityM;
|
||||||
int frontendIdM;
|
int frontendIdM;
|
||||||
@@ -149,6 +151,7 @@ public:
|
|||||||
bool Close(void);
|
bool Close(void);
|
||||||
int FrontendId(void);
|
int FrontendId(void);
|
||||||
int SignalStrength(void);
|
int SignalStrength(void);
|
||||||
|
double SignalStrengthDBm(void);
|
||||||
int SignalQuality(void);
|
int SignalQuality(void);
|
||||||
bool HasLock(void);
|
bool HasLock(void);
|
||||||
cString GetSignalStatus(void);
|
cString GetSignalStatus(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user