45 m_rawPacketQueueLock(QMutex::Recursive)
95 if (transparams == 0) {
96 params = &defaultparams;
257 std::list<RTPAddress>::const_iterator it =
m_destinations.begin();
261 m_rtpsock->writeDatagram((
const char*) data, (qint64) len, it->getAddress(), it->getPort());
281 std::list<RTPAddress>::const_iterator it =
m_destinations.begin();
285 m_rtcpsock->writeDatagram((
const char*) data, (qint64) len, it->getAddress(), it->getRtcpsendport());
311 QAbstractSocket::SocketState rtpSocketState =
m_rtpsock->state();
312 QAbstractSocket::SocketState rtcpSocketState =
m_rtcpsock->state();
314 && (rtpSocketState & QAbstractSocket::BoundState)
315 && (rtcpSocketState & QAbstractSocket::BoundState)
316 && (flags & QNetworkInterface::CanMulticast)
317 && (flags & QNetworkInterface::IsRunning)
318 && !(flags & QNetworkInterface::IsLoopBack);
461 QHostAddress remoteAddress;
463 qint64 pendingDataSize =
m_rtpsock->pendingDatagramSize();
464 qint64 bytesRead =
m_rtpsock->readDatagram(
m_rtpBuffer, pendingDataSize, &remoteAddress, &remotePort);
465 qDebug(
"RTPUDPTransmitter::readRTPPendingDatagrams: %lld bytes read from %s:%d",
467 qPrintable(remoteAddress.toString()),
472 rtpAddress.
setPort(remotePort);
485 if (packettype >= 200 && packettype <= 204) {
507 QHostAddress remoteAddress;
509 qint64 pendingDataSize =
m_rtcpsock->pendingDatagramSize();
511 qDebug(
"RTPUDPTransmitter::readRTCPPendingDatagrams: %lld bytes read from %s:%d",
513 qPrintable(remoteAddress.toString()),
518 rtpAddress.
setPort(remotePort);
virtual ~RTPUDPTransmitter()
virtual int BindSockets()
virtual bool ComesFromThisTransmitter(const RTPAddress &addr)
int GetRTCPReceiveBufferSize() const
void setPort(uint16_t port)
std::list< RTPAddress > m_destinations
#define ERR_RTP_UDPV4TRANS_ILLEGALPARAMETERS
std::list< RTPAddress > m_ignoreList
void readRTCPPendingDatagrams()
QQueue< RTPRawPacket * > m_rawPacketQueue
void setAddress(const QHostAddress &address)
#define ERR_RTP_UDPV6TRANS_NOMULTICASTSUPPORT
#define ERR_RTP_UDPV4TRANS_COULDNTJOINMULTICASTGROUP
virtual int AddDestination(const RTPAddress &addr)
uint16_t GetForcedRTCPPort() const
bool GetUseExistingSockets(QUdpSocket **rtpsocket, QUdpSocket **rtcpsocket) const
virtual void ClearDestinations()
virtual int SetMaximumPacketSize(std::size_t s)
virtual RTPTransmissionInfo * GetTransmissionInfo()
virtual bool SupportsMulticasting()
RTPTransmitter::ReceiveMode m_receivemode
int GetRTPReceiveBufferSize() const
virtual int SendRTPData(const void *data, std::size_t len)
virtual int DeleteFromAcceptList(const RTPAddress &addr)
virtual int Create(std::size_t maxpacksize, const RTPTransmissionParams *transparams)
QNetworkInterface m_multicastInterface
from parameters multicast interface
#define ERR_RTP_UDPV4TRANS_NOTINIT
char m_rtpBuffer[m_absoluteMaxPackSize]
RTPTransmitter::TransmissionProtocol GetTransmissionProtocol() const
bool ShouldAcceptData(const RTPAddress &address)
const QHostAddress & getAddress() const
QHostAddress m_localIP
from parameters bind IP
virtual int AddToAcceptList(const RTPAddress &addr)
virtual int DeleteDestination(const RTPAddress &addr)
uint16_t GetPortbase() const
#define ERR_RTP_UDPV4TRANS_PORTBASENOTEVEN
virtual int AddToIgnoreList(const RTPAddress &addr)
bool GetRTCPMultiplexing() const
QNetworkInterface GetMulticastInterface() const
char m_rtcpBuffer[m_absoluteMaxPackSize]
virtual int LeaveMulticastGroup(const RTPAddress &addr)
bool m_deletesocketswhendone
virtual int SendRTCPData(const void *data, std::size_t len)
QMutex m_rawPacketQueueLock
virtual void ClearIgnoreList()
virtual void ClearAcceptList()
std::list< RTPAddress > m_acceptList
#define ERR_RTP_UDPV4TRANS_CANTBINDRTPSOCKET
static RTPTime CurrentTime()
void readRTPPendingDatagrams()
#define ERR_RTP_UDPV4TRANS_ALREADYCREATED
static const std::size_t m_absoluteMaxPackSize
virtual void DeleteTransmissionInfo(RTPTransmissionInfo *inf)
std::size_t m_maxpacksize
uint16_t getRtcpsendport() const
virtual RTPRawPacket * GetNextPacket()
#define ERR_RTP_UDPV4TRANS_CANTBINDRTCPSOCKET
#define ERR_RTP_UDPV4TRANS_ALREADYINIT
QHostAddress GetBindIP() const
virtual int JoinMulticastGroup(const RTPAddress &addr)
#define ERR_RTP_UDPV4TRANS_NOTCREATED
bool GetAllowOddPortbase() const
virtual int DeleteFromIgnoreList(const RTPAddress &addr)
virtual int SetReceiveMode(RTPTransmitter::ReceiveMode m)
#define ERR_RTP_UDPV4TRANS_SPECIFIEDSIZETOOBIG