37 #ifndef RTPEXTERNALTRANSMITTER_H 39 #define RTPEXTERNALTRANSMITTER_H 41 #include "rtpconfig.h" 46 #ifdef RTP_SUPPORT_THREAD 47 #include <jthread/jmutex.h> 48 #endif // RTP_SUPPORT_THREAD 53 class RTPExternalTransmitter;
70 virtual bool SendRTP(
const void *data,
size_t len) = 0;
73 virtual bool SendRTCP(
const void *data,
size_t len) = 0;
76 virtual bool ComesFromThisSender(
const RTPAddress *a) = 0;
93 void InjectRTP(
const void *data,
size_t len,
const RTPAddress &a);
96 void InjectRTCP(
const void *data,
size_t len,
const RTPAddress &a);
99 void InjectRTPorRTCP(
const void *data,
size_t len,
const RTPAddress &a);
113 int GetAdditionalHeaderSize()
const {
return headersize; }
146 int Init(
bool treadsafe);
152 int GetLocalHostName(uint8_t *buffer,
size_t *bufferlength);
153 bool ComesFromThisTransmitter(
const RTPAddress *addr);
154 size_t GetHeaderOverhead() {
return headersize; }
157 int WaitForIncomingData(
const RTPTime &delay,
bool *dataavailable = 0);
160 int SendRTPData(
const void *data,
size_t len);
161 int SendRTCPData(
const void *data,
size_t len);
164 int DeleteDestination(
const RTPAddress &addr);
165 void ClearDestinations();
167 bool SupportsMulticasting();
168 int JoinMulticastGroup(
const RTPAddress &addr);
169 int LeaveMulticastGroup(
const RTPAddress &addr);
170 void LeaveAllMulticastGroups();
174 int DeleteFromIgnoreList(
const RTPAddress &addr);
175 void ClearIgnoreList();
177 int DeleteFromAcceptList(
const RTPAddress &addr);
178 void ClearAcceptList();
179 int SetMaximumPacketSize(
size_t s);
181 bool NewDataAvailable();
187 void InjectRTP(
const void *data,
size_t len,
const RTPAddress &a);
188 void InjectRTCP(
const void *data,
size_t len,
const RTPAddress &a);
189 void InjectRTPorRTCP(
const void *data,
size_t len,
const RTPAddress &a);
199 std::list<RTPRawPacket*> rawpacketlist;
201 uint8_t *localhostname;
202 size_t localhostnamelength;
208 #ifdef RTP_SUPPORT_THREAD 209 jthread::JMutex mainmutex,waitmutex;
211 #endif // RTP_SUPPORT_THREAD 216 transmitter->InjectRTP(data, len, a);
221 transmitter->InjectRTCP(data, len, a);
226 transmitter->InjectRTPorRTCP(data, len, a);
231 #endif // RTPTCPSOCKETTRANSMITTER_H A transmission component which will use user specified functions to transmit the data and which will ...
Definition: rtpexternaltransmitter.h:140
This class is used by the transmission component to store the incoming RTP and RTCP data in...
Definition: rtprawpacket.h:51
Parameters to initialize a transmitter of type RTPExternalTransmitter.
Definition: rtpexternaltransmitter.h:105
Base class for transmission parameters.
Definition: rtptransmitter.h:229
void InjectRTCP(const void *data, size_t len, const RTPAddress &a)
This function can be called to insert an RTCP packet into the transmission component.
Definition: rtpexternaltransmitter.h:219
RTPExternalPacketInjecter * GetPacketInjector() const
Tells you which RTPExternalPacketInjecter you need to use to pass RTP or RTCP data on to the transmis...
Definition: rtpexternaltransmitter.h:127
void InjectRTPorRTCP(const void *data, size_t len, const RTPAddress &a)
Use this function to inject an RTP or RTCP packet and the transmitter will try to figure out which ty...
Definition: rtpexternaltransmitter.h:224
This class is an abstract class which is used to specify destinations, multicast groups etc...
Definition: rtpaddress.h:50
RTPExternalTransmissionParams(RTPExternalSender *s, int headeroverhead)
Using this constructor you can specify which RTPExternalSender object you'll be using and how much th...
Definition: rtpexternaltransmitter.h:110
Additional information about the external transmission component.
Definition: rtpexternaltransmitter.h:120
Interface to inject incoming RTP and RTCP packets into the library.
Definition: rtpexternaltransmitter.h:86
Base class to specify a mechanism to transmit RTP packets outside of this library.
Definition: rtpexternaltransmitter.h:63
Abstract class from which actual transmission components should be derived.
Definition: rtptransmitter.h:62
ReceiveMode
Three kind of receive modes can be specified.
Definition: rtptransmitter.h:80
Definition: rtpfaketransmitter.h:64
This class is used to specify wallclock time, delay intervals etc.
Definition: rtptimeutilities.h:84
A memory manager.
Definition: rtpmemorymanager.h:150
Specifies the transmitter which can send packets using an external mechanism, and which can have rece...
Definition: rtptransmitter.h:75
Base class for additional information about the transmitter.
Definition: rtptransmitter.h:248
Helper class for several RTPTransmitter instances, to be able to cancel a call to 'select'...
Definition: rtpabortdescriptors.h:64
void InjectRTP(const void *data, size_t len, const RTPAddress &a)
This function can be called to insert an RTP packet into the transmission component.
Definition: rtpexternaltransmitter.h:214