37 #ifndef RTPEXTERNALTRANSMITTER_H
39 #define RTPEXTERNALTRANSMITTER_H
41 #include "rtpconfig.h"
45 #ifdef RTP_SUPPORT_THREAD
46 #include <jthread/jmutex.h>
47 #endif // RTP_SUPPORT_THREAD
52 class RTPExternalTransmitter;
69 virtual bool SendRTP(
const void *data,
size_t len) = 0;
72 virtual bool SendRTCP(
const void *data,
size_t len) = 0;
75 virtual bool ComesFromThisSender(
const RTPAddress *a) = 0;
92 void InjectRTP(
const void *data,
size_t len,
const RTPAddress &a);
95 void InjectRTCP(
const void *data,
size_t len,
const RTPAddress &a);
98 void InjectRTPorRTCP(
const void *data,
size_t len,
const RTPAddress &a);
112 int GetAdditionalHeaderSize()
const {
return headersize; }
114 RTPExternalSender *sender;
145 int Init(
bool treadsafe);
151 int GetLocalHostName(uint8_t *buffer,
size_t *bufferlength);
152 bool ComesFromThisTransmitter(
const RTPAddress *addr);
153 size_t GetHeaderOverhead() {
return headersize; }
156 int WaitForIncomingData(
const RTPTime &delay,
bool *dataavailable = 0);
159 int SendRTPData(
const void *data,
size_t len);
160 int SendRTCPData(
const void *data,
size_t len);
163 int DeleteDestination(
const RTPAddress &addr);
164 void ClearDestinations();
166 bool SupportsMulticasting();
167 int JoinMulticastGroup(
const RTPAddress &addr);
168 int LeaveMulticastGroup(
const RTPAddress &addr);
169 void LeaveAllMulticastGroups();
173 int DeleteFromIgnoreList(
const RTPAddress &addr);
174 void ClearIgnoreList();
176 int DeleteFromAcceptList(
const RTPAddress &addr);
177 void ClearAcceptList();
178 int SetMaximumPacketSize(
size_t s);
180 bool NewDataAvailable();
186 void InjectRTP(
const void *data,
size_t len,
const RTPAddress &a);
187 void InjectRTCP(
const void *data,
size_t len,
const RTPAddress &a);
188 void InjectRTPorRTCP(
const void *data,
size_t len,
const RTPAddress &a);
198 std::list<RTPRawPacket*> rawpacketlist;
200 uint8_t *localhostname;
201 size_t localhostnamelength;
207 #ifdef RTP_SOCKETTYPE_WINSOCK
211 #endif // RTP_SOCKETTYPE_WINSOCK
212 int CreateAbortDescriptors();
213 void DestroyAbortDescriptors();
214 void AbortWaitInternal();
215 #ifdef RTP_SUPPORT_THREAD
216 jthread::JMutex mainmutex,waitmutex;
218 #endif // RTP_SUPPORT_THREAD
223 transmitter->InjectRTP(data, len, a);
228 transmitter->InjectRTCP(data, len, a);
233 transmitter->InjectRTPorRTCP(data, len, a);
238 #endif // RTPTCPSOCKETTRANSMITTER_H
A transmission component which will use user specified functions to transmit the data and which will ...
Definition: rtpexternaltransmitter.h:139
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:104
Base class for transmission parameters.
Definition: rtptransmitter.h:228
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:226
RTPExternalPacketInjecter * GetPacketInjector() const
Tells you which RTPExternalPacketInjecter you need to use to pass RTP or RTCP data on to the transmis...
Definition: rtpexternaltransmitter.h:126
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:231
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:109
Additional information about the external transmission component.
Definition: rtpexternaltransmitter.h:119
Interface to inject incoming RTP and RTCP packets into the library.
Definition: rtpexternaltransmitter.h:85
Base class to specify a mechanism to transmit RTP packets outside of this library.
Definition: rtpexternaltransmitter.h:62
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:79
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:74
Base class for additional information about the transmitter.
Definition: rtptransmitter.h:247
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:221