SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Types | Public Member Functions | Protected Member Functions | List of all members
qrtplib::RTPTransmitter Class Referenceabstract

#include <rtptransmitter.h>

+ Inheritance diagram for qrtplib::RTPTransmitter:

Public Types

enum  TransmissionProtocol {
  IPv4UDPProto, IPv6UDPProto, TCPProto, ExternalProto,
  UserDefinedProto
}
 
enum  ReceiveMode { AcceptAll, AcceptSome, IgnoreSome }
 

Public Member Functions

virtual ~RTPTransmitter ()
 
virtual int Init ()=0
 
virtual int Create (std::size_t maxpacksize, const RTPTransmissionParams *transparams)=0
 
virtual int BindSockets ()=0
 
virtual void Destroy ()=0
 
virtual RTPTransmissionInfoGetTransmissionInfo ()=0
 
virtual void DeleteTransmissionInfo (RTPTransmissionInfo *inf)=0
 
virtual bool ComesFromThisTransmitter (const RTPAddress &addr)=0
 
virtual std::size_t GetHeaderOverhead ()=0
 
virtual int SendRTPData (const void *data, std::size_t len)=0
 
virtual int SendRTCPData (const void *data, std::size_t len)=0
 
virtual int AddDestination (const RTPAddress &addr)=0
 
virtual int DeleteDestination (const RTPAddress &addr)=0
 
virtual void ClearDestinations ()=0
 
virtual bool SupportsMulticasting ()=0
 
virtual int JoinMulticastGroup (const RTPAddress &addr)=0
 
virtual int LeaveMulticastGroup (const RTPAddress &addr)=0
 
virtual int SetReceiveMode (RTPTransmitter::ReceiveMode m)=0
 
virtual int AddToIgnoreList (const RTPAddress &addr)=0
 
virtual int DeleteFromIgnoreList (const RTPAddress &addr)=0
 
virtual void ClearIgnoreList ()=0
 
virtual int AddToAcceptList (const RTPAddress &addr)=0
 
virtual int DeleteFromAcceptList (const RTPAddress &addr)=0
 
virtual void ClearAcceptList ()=0
 
virtual int SetMaximumPacketSize (std::size_t s)=0
 
virtual RTPRawPacketGetNextPacket ()=0
 

Protected Member Functions

 RTPTransmitter ()
 

Detailed Description

Abstract class from which actual transmission components should be derived. Abstract class from which actual transmission components should be derived. The abstract class RTPTransmitter specifies the interface for actual transmission components. Currently, three implementations exist: an UDP over IPv4 transmitter, an UDP over IPv6 transmitter and a transmitter which can be used to use an external transmission mechanism.

Definition at line 62 of file rtptransmitter.h.

Member Enumeration Documentation

◆ ReceiveMode

Three kind of receive modes can be specified.

Enumerator
AcceptAll 

All incoming data is accepted, no matter where it originated from.

AcceptSome 

Only data coming from specific sources will be accepted.

IgnoreSome 

All incoming data is accepted, except for data coming from a specific set of sources.

Definition at line 80 of file rtptransmitter.h.

◆ TransmissionProtocol

Used to identify a specific transmitter. If UserDefinedProto is used in the RTPSession::Create function, the RTPSession virtual member function NewUserDefinedTransmitter will be called to create a transmission component.

Enumerator
IPv4UDPProto 

Specifies the internal UDP over IPv4 transmitter.

IPv6UDPProto 

Specifies the internal UDP over IPv6 transmitter.

TCPProto 

Specifies the internal TCP transmitter.

ExternalProto 

Specifies the transmitter which can send packets using an external mechanism, and which can have received packets injected into it - see RTPExternalTransmitter for additional information.

UserDefinedProto 

Specifies a user defined, external transmitter.

Definition at line 70 of file rtptransmitter.h.

Constructor & Destructor Documentation

◆ RTPTransmitter()

qrtplib::RTPTransmitter::RTPTransmitter ( )
inlineprotected

Constructor in which you can specify a memory manager to use.

Definition at line 88 of file rtptransmitter.h.

References qrtplib::RTPTimeInitializerObject::Dummy(), and qrtplib::timeinit.

89  {
90  timeinit.Dummy();
91  }
RTPTimeInitializerObject timeinit
+ Here is the call graph for this function:

◆ ~RTPTransmitter()

virtual qrtplib::RTPTransmitter::~RTPTransmitter ( )
inlinevirtual

Member Function Documentation

◆ AddDestination()

virtual int qrtplib::RTPTransmitter::AddDestination ( const RTPAddress addr)
pure virtual

Adds the address specified by addr to the list of destinations.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::AddDestination(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ AddToAcceptList()

virtual int qrtplib::RTPTransmitter::AddToAcceptList ( const RTPAddress addr)
pure virtual

Adds addr to the list of addresses to accept.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::AddToAcceptList(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ AddToIgnoreList()

virtual int qrtplib::RTPTransmitter::AddToIgnoreList ( const RTPAddress addr)
pure virtual

Adds addr to the list of addresses to ignore.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::AddToIgnoreList(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ BindSockets()

virtual int qrtplib::RTPTransmitter::BindSockets ( )
pure virtual

Bind the RTP and RTCP sockets to ports that were set at creation time

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ ClearAcceptList()

virtual void qrtplib::RTPTransmitter::ClearAcceptList ( )
pure virtual

Clears the list of addresses to accept.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::ClearAcceptList(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ ClearDestinations()

virtual void qrtplib::RTPTransmitter::ClearDestinations ( )
pure virtual

Clears the list of destinations.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::ClearDestinations(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ ClearIgnoreList()

virtual void qrtplib::RTPTransmitter::ClearIgnoreList ( )
pure virtual

Clears the list of addresses to ignore.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::ClearIgnoreList(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ ComesFromThisTransmitter()

virtual bool qrtplib::RTPTransmitter::ComesFromThisTransmitter ( const RTPAddress addr)
pure virtual

Returns true if the address specified by addr is one of the addresses of the transmitter.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ Create()

virtual int qrtplib::RTPTransmitter::Create ( std::size_t  maxpacksize,
const RTPTransmissionParams transparams 
)
pure virtual

Prepares the component to be used. Prepares the component to be used. The parameter maxpacksize specifies the maximum size a packet can have: if the packet is larger it will not be transmitted. The transparams parameter specifies a pointer to an RTPTransmissionParams instance. This is also an abstract class and each actual component will define its own parameters by inheriting a class from RTPTransmissionParams. If transparams is NULL, the default transmission parameters for the component will be used.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ DeleteDestination()

virtual int qrtplib::RTPTransmitter::DeleteDestination ( const RTPAddress addr)
pure virtual

Deletes the address specified by addr from the list of destinations.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::DeleteDestination(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ DeleteFromAcceptList()

virtual int qrtplib::RTPTransmitter::DeleteFromAcceptList ( const RTPAddress addr)
pure virtual

Deletes addr from the list of addresses to accept.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::DeleteFromAcceptList(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ DeleteFromIgnoreList()

virtual int qrtplib::RTPTransmitter::DeleteFromIgnoreList ( const RTPAddress addr)
pure virtual

Deletes addr from the list of addresses to accept.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::DeleteFromIgnoreList(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ DeleteTransmissionInfo()

virtual void qrtplib::RTPTransmitter::DeleteTransmissionInfo ( RTPTransmissionInfo inf)
pure virtual

Deallocates the information returned by RTPTransmitter::GetTransmissionInfo . Deallocates the information returned by RTPTransmitter::GetTransmissionInfo .

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::DeleteTransmissionInfo(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ Destroy()

virtual void qrtplib::RTPTransmitter::Destroy ( )
pure virtual

By calling this function, buffers are cleared and the component cannot be used anymore. By calling this function, buffers are cleared and the component cannot be used anymore. Only when the Create function is called again can the component be used again.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ GetHeaderOverhead()

virtual std::size_t qrtplib::RTPTransmitter::GetHeaderOverhead ( )
pure virtual

Returns the amount of bytes that will be added to the RTP packet by the underlying layers (excluding the link layer).

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::InternalCreate(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ GetNextPacket()

virtual RTPRawPacket* qrtplib::RTPTransmitter::GetNextPacket ( )
pure virtual

Returns the raw data of a received RTP packet in an RTPRawPacket instance.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::ProcessPolledData(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ GetTransmissionInfo()

virtual RTPTransmissionInfo* qrtplib::RTPTransmitter::GetTransmissionInfo ( )
pure virtual

Returns additional information about the transmitter. This function returns an instance of a subclass of RTPTransmissionInfo which will give some additional information about the transmitter (a list of local IP addresses for example). Currently, either an instance of RTPUDPv4TransmissionInfo or RTPUDPv6TransmissionInfo is returned, depending on the type of the transmitter. The user has to deallocate the returned instance when it is no longer needed, which can be done using RTPTransmitter::DeleteTransmissionInfo.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::GetTransmissionInfo(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ Init()

virtual int qrtplib::RTPTransmitter::Init ( )
pure virtual

This function must be called before the transmission component can be used.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ JoinMulticastGroup()

virtual int qrtplib::RTPTransmitter::JoinMulticastGroup ( const RTPAddress addr)
pure virtual

Joins the multicast group specified by addr.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::JoinMulticastGroup(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ LeaveMulticastGroup()

virtual int qrtplib::RTPTransmitter::LeaveMulticastGroup ( const RTPAddress addr)
pure virtual

Leaves the multicast group specified by addr.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::LeaveMulticastGroup(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ SendRTCPData()

virtual int qrtplib::RTPTransmitter::SendRTCPData ( const void *  data,
std::size_t  len 
)
pure virtual

Send a packet with length len containing data to all RTCP addresses of the current destination list.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::SendRawData(), qrtplib::RTPSession::SendRTCPData(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ SendRTPData()

virtual int qrtplib::RTPTransmitter::SendRTPData ( const void *  data,
std::size_t  len 
)
pure virtual

Send a packet with length len containing data to all RTP addresses of the current destination list.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::SendRawData(), qrtplib::RTPSession::SendRTPData(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ SetMaximumPacketSize()

virtual int qrtplib::RTPTransmitter::SetMaximumPacketSize ( std::size_t  s)
pure virtual

Sets the maximum packet size which the transmitter should allow to s.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::Create(), qrtplib::RTPSession::SetMaximumPacketSize(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ SetReceiveMode()

virtual int qrtplib::RTPTransmitter::SetReceiveMode ( RTPTransmitter::ReceiveMode  m)
pure virtual

Sets the receive mode. Sets the receive mode to m, which is one of the following: RTPTransmitter::AcceptAll, RTPTransmitter::AcceptSome or RTPTransmitter::IgnoreSome. Note that if the receive mode is changed, all information about the addresses to ignore to accept is lost.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::InternalCreate(), qrtplib::RTPSession::SetReceiveMode(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

◆ SupportsMulticasting()

virtual bool qrtplib::RTPTransmitter::SupportsMulticasting ( )
pure virtual

Returns true if the transmission component supports multicasting.

Implemented in qrtplib::RTPUDPTransmitter.

Referenced by qrtplib::RTPSession::SupportsMulticasting(), and ~RTPTransmitter().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: