37 #ifndef RTPEXTERNALTRANSMITTER_H
39 #define RTPEXTERNALTRANSMITTER_H
41 #include "rtpconfig.h"
46 #ifdef RTP_SUPPORT_THREAD
47 #include <jthread/jmutex.h>
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;
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; }
115 RTPExternalSender *sender;
147 int Init(
bool treadsafe);
153 int GetLocalHostName(uint8_t *buffer,
size_t *bufferlength);
154 bool ComesFromThisTransmitter(
const RTPAddress *addr);
155 size_t GetHeaderOverhead() {
return headersize; }
158 int WaitForIncomingData(
const RTPTime &delay,
bool *dataavailable = 0);
161 int SendRTPData(
const void *data,
size_t len);
162 int SendRTCPData(
const void *data,
size_t len);
165 int DeleteDestination(
const RTPAddress &addr);
166 void ClearDestinations();
168 bool SupportsMulticasting();
169 int JoinMulticastGroup(
const RTPAddress &addr);
170 int LeaveMulticastGroup(
const RTPAddress &addr);
171 void LeaveAllMulticastGroups();
175 int DeleteFromIgnoreList(
const RTPAddress &addr);
176 void ClearIgnoreList();
178 int DeleteFromAcceptList(
const RTPAddress &addr);
179 void ClearAcceptList();
180 int SetMaximumPacketSize(
size_t s);
182 bool NewDataAvailable();
188 void InjectRTP(
const void *data,
size_t len,
const RTPAddress &a);
189 void InjectRTCP(
const void *data,
size_t len,
const RTPAddress &a);
190 void InjectRTPorRTCP(
const void *data,
size_t len,
const RTPAddress &a);
200 std::list<RTPRawPacket*> rawpacketlist;
202 uint8_t *localhostname;
203 size_t localhostnamelength;
210 #ifdef RTP_SUPPORT_THREAD
211 jthread::JMutex mainmutex,waitmutex;
218 transmitter->InjectRTP(data, len, a);
223 transmitter->InjectRTCP(data, len, a);
228 transmitter->InjectRTPorRTCP(data, len, a);
Helper class for several RTPTransmitter instances, to be able to cancel a call to 'select',...
Definition: rtpabortdescriptors.h:65
This class is an abstract class which is used to specify destinations, multicast groups etc.
Definition: rtpaddress.h:51
Interface to inject incoming RTP and RTCP packets into the library.
Definition: rtpexternaltransmitter.h:87
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:226
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:216
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:221
Base class to specify a mechanism to transmit RTP packets outside of this library.
Definition: rtpexternaltransmitter.h:64
virtual bool ComesFromThisSender(const RTPAddress *a)=0
Used to identify if an RTPAddress instance originated from this sender (to be able to detect own pack...
virtual bool SendRTCP(const void *data, size_t len)=0
This member function will be called when an RTCP packet needs to be transmitted.
virtual bool SendRTP(const void *data, size_t len)=0
This member function will be called when RTP data needs to be transmitted.
Additional information about the external transmission component.
Definition: rtpexternaltransmitter.h:121
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
Parameters to initialize a transmitter of type RTPExternalTransmitter.
Definition: rtpexternaltransmitter.h:106
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
A transmission component which will use user specified functions to transmit the data and which will ...
Definition: rtpexternaltransmitter.h:141
A memory manager.
Definition: rtpmemorymanager.h:151
This class is used by the transmission component to store the incoming RTP and RTCP data in.
Definition: rtprawpacket.h:53
This class is used to specify wallclock time, delay intervals etc.
Definition: rtptimeutilities.h:86
Base class for additional information about the transmitter.
Definition: rtptransmitter.h:249
Base class for transmission parameters.
Definition: rtptransmitter.h:230
Abstract class from which actual transmission components should be derived.
Definition: rtptransmitter.h:63
ReceiveMode
Three kind of receive modes can be specified.
Definition: rtptransmitter.h:81
@ ExternalProto
Specifies the transmitter which can send packets using an external mechanism, and which can have rece...
Definition: rtptransmitter.h:75