1
0
mirror of https://github.com/rofafor/vdr-plugin-satip.git synced 2023-10-10 13:37:42 +02:00
vdr-plugin-satip/rtcp.c
Nafets227 ede0294943 Refactored polling.
The original patch is polished and tweaked by Rolf Ahrenberg.
2014-11-15 02:12:35 +02:00

41 lines
806 B
C

/*
* rtcp.c: SAT>IP plugin for the Video Disk Recorder
*
* See the README file for copyright information and how to reach the author.
*
*/
#include "common.h"
#include "rtcp.h"
cSatipRtcp::cSatipRtcp(cSatipTunerIf &tunerP, unsigned int bufferLenP)
: tunerM(&tunerP),
bufferLenM(bufferLenP),
bufferM(MALLOC(unsigned char, bufferLenM))
{
if (bufferM)
memset(bufferM, 0, bufferLenM);
else
error("Cannot create RTCP buffer!");
}
cSatipRtcp::~cSatipRtcp()
{
DELETE_POINTER(bufferM);
}
int cSatipRtcp::GetFd(void)
{
return Fd();
}
void cSatipRtcp::Action(int fdP)
{
//debug("cSatipRtcp::%s(%d)", __FUNCTION__, fdP);
if (bufferM) {
int length = ReadApplication(bufferM, bufferLenM);
if (length > 0)
tunerM->ParseReceptionParameters(bufferM, length);
}
}