Pass signal quality and snr to Kodi core

This commit is contained in:
Dennis Hamester 2016-11-09 15:43:01 +01:00
parent c5b90f130b
commit 838c0094b7
3 changed files with 14 additions and 1 deletions

View File

@ -270,7 +270,11 @@ bool SwitchChannel(const PVR_CHANNEL& channel) {
return OpenLiveStream(channel);
}
PVR_ERROR SignalStatus(PVR_SIGNAL_STATUS& signalStatus) { return PVR_ERROR_NOT_IMPLEMENTED; }
PVR_ERROR SignalStatus(PVR_SIGNAL_STATUS& signalStatus) {
rtsp_fill_signal_status(signalStatus);
return PVR_ERROR_NO_ERROR;
}
const char* GetLiveStreamURL(const PVR_CHANNEL& channel) { return NULL; }
PVR_ERROR GetStreamProperties(PVR_STREAM_PROPERTIES* pProperties) { return PVR_ERROR_NOT_IMPLEMENTED; }

View File

@ -468,3 +468,10 @@ void rtsp_close()
rtsp = NULL;
}
}
void rtsp_fill_signal_status(PVR_SIGNAL_STATUS& signal_status) {
if(rtsp) {
signal_status.iSNR = 0x1111 * rtsp->quality;
signal_status.iSignal = 0x101 * rtsp->level;
}
}

View File

@ -2,9 +2,11 @@
#define _RTSP_CLIENT_HPP_
#include <string>
#include <xbmc_pvr_types.h>
bool rtsp_open(const std::string& url_str);
void rtsp_close();
int rtsp_read(void *buf, unsigned buf_size);
void rtsp_fill_signal_status(PVR_SIGNAL_STATUS& signal_status);
#endif