MediaX v1.0.0rc7 [7e6cb74]
Video streaming for military vehicles
Loading...
Searching...
No Matches
mediax::RtpSapRecieve< T > Class Template Reference

A RTP SAP receiver helper class. More...

#include <rtp_sap_wrapper.h>

Collaboration diagram for mediax::RtpSapRecieve< T >:
Collaboration graph

Public Member Functions

 RtpSapRecieve (std::string_view hostname, uint16_t port, std::string_view session_name, uint16_t height, uint16_t width, uint16_t framerate, std::string_view encoding)
 Construct a new Rtp Sap Recieve object.
 
 ~RtpSapRecieve ()
 Destroy the Rtp Sap Receive object.
 
std::vector< uint8_t > & GetBuffer ()
 Get the frame buffer, resized and ready to use.
 
bool Receive (::mediax::rtp::RtpFrameData *data, size_t size)
 The frame receive function, this will receive the frame over RTP.
 

Static Public Member Functions

static void Callback (const sap::SdpMessage *sdp, void *data)
 The SAP callback.
 

Private Member Functions

bool CheckSapOk () const
 Check that the SAP announcement has been received and is OK.
 

Private Attributes

rtp_depayloader_
 The RTP depayloader.
 
sap::SapListenersap_listener_ = ::mediax::sap::SapListener::GetInstance()
 The SAP listener.
 
::mediax::rtp::StreamInformation stream_info_
 The stream information.
 
std::vector< uint8_t > data_buffer_
 The vectored data buffer.
 

Detailed Description

template<typename T>
class mediax::RtpSapRecieve< T >

A RTP SAP receiver helper class.

Constructor & Destructor Documentation

◆ RtpSapRecieve()

template<typename T >
mediax::RtpSapRecieve< T >::RtpSapRecieve ( std::string_view  hostname,
uint16_t  port,
std::string_view  session_name,
uint16_t  height,
uint16_t  width,
uint16_t  framerate,
std::string_view  encoding 
)
inline

Construct a new Rtp Sap Recieve object.

Parameters
hostnameThe IPV4 multicast address
portThe IPV4 multicast port
session_nameThe name of the stream
heightStream height
widthStream width
framerateStream framerate
encodingStream encoding

Member Function Documentation

◆ CheckSapOk()

template<typename T >
bool mediax::RtpSapRecieve< T >::CheckSapOk ( ) const
inlineprivate

Check that the SAP announcement has been received and is OK.

Returns
true
false

◆ GetBuffer()

template<typename T >
std::vector< uint8_t > & mediax::RtpSapRecieve< T >::GetBuffer ( )
inline

Get the frame buffer, resized and ready to use.

Returns
vector<uint8_t>&

◆ Receive()

template<typename T >
bool mediax::RtpSapRecieve< T >::Receive ( ::mediax::rtp::RtpFrameData data,
size_t  size 
)
inline

The frame receive function, this will receive the frame over RTP.

Parameters
dataThe RGB frame data
sizeThe size of the RGB frame data

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