From cc34e523691b548479cf3b9a28921c74d1027ca0 Mon Sep 17 00:00:00 2001 From: Alwin Esch Date: Wed, 29 Apr 2020 20:47:22 +0200 Subject: [PATCH] [API related] change SignalStatus and GetDescrambleInfo (channelUid added) --- src/client.cpp | 6 +++--- src/rtsp_client.cpp | 8 ++++---- src/rtsp_client.hpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/client.cpp b/src/client.cpp index a46961b..3843772 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -231,15 +231,15 @@ long long SeekLiveStream(long long iPosition, int iWhence) { return -1; } long long LengthLiveStream(void) { return -1; } bool IsRealTimeStream(void) { return true; } -PVR_ERROR SignalStatus(PVR_SIGNAL_STATUS& signalStatus) { - memset(&signalStatus, 0, sizeof(PVR_SIGNAL_STATUS)); +PVR_ERROR GetSignalStatus(int channelUid, PVR_SIGNAL_STATUS* signalStatus) { + memset(signalStatus, 0, sizeof(PVR_SIGNAL_STATUS)); rtsp_fill_signal_status(signalStatus); return PVR_ERROR_NO_ERROR; } PVR_ERROR GetStreamTimes(PVR_STREAM_TIMES *times) { return PVR_ERROR_NOT_IMPLEMENTED; } PVR_ERROR GetStreamProperties(PVR_STREAM_PROPERTIES* pProperties) { return PVR_ERROR_NOT_IMPLEMENTED; } -PVR_ERROR GetDescrambleInfo(PVR_DESCRAMBLE_INFO*) { return PVR_ERROR_NOT_IMPLEMENTED; } +PVR_ERROR GetDescrambleInfo(int, PVR_DESCRAMBLE_INFO*) { return PVR_ERROR_NOT_IMPLEMENTED; } /* Recording stream handling */ bool OpenRecordedStream(const PVR_RECORDING& recording) { return false; } diff --git a/src/rtsp_client.cpp b/src/rtsp_client.cpp index fee28c0..68ad800 100644 --- a/src/rtsp_client.cpp +++ b/src/rtsp_client.cpp @@ -471,10 +471,10 @@ void rtsp_close() } } -void rtsp_fill_signal_status(PVR_SIGNAL_STATUS& signal_status) { +void rtsp_fill_signal_status(PVR_SIGNAL_STATUS* signal_status) { if(rtsp) { - strncpy(signal_status.strServiceName, rtsp->name.c_str(), PVR_ADDON_NAME_STRING_LENGTH - 1); - signal_status.iSNR = 0x1111 * rtsp->quality; - signal_status.iSignal = 0x101 * rtsp->level; + strncpy(signal_status->strServiceName, rtsp->name.c_str(), PVR_ADDON_NAME_STRING_LENGTH - 1); + signal_status->iSNR = 0x1111 * rtsp->quality; + signal_status->iSignal = 0x101 * rtsp->level; } } diff --git a/src/rtsp_client.hpp b/src/rtsp_client.hpp index 9538766..bcd893b 100644 --- a/src/rtsp_client.hpp +++ b/src/rtsp_client.hpp @@ -7,6 +7,6 @@ bool rtsp_open(const std::string& name, 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); +void rtsp_fill_signal_status(PVR_SIGNAL_STATUS* signal_status); #endif