ifw-rtmstools 3.0.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
ifw::rtmstools::rtmslib_llnetio::RtmsReceiver Class Referenceabstract

RtmsReceiver class. More...

#include <rtmsReceiver.hpp>

Inheritance diagram for ifw::rtmstools::rtmslib_llnetio::RtmsReceiver:
ifw::rtmstools::llnetio::RtmsReceiverTool ifw::rtmstools::rtms2ddtlib_llnetio::Rtms2DdtGateway

Public Member Functions

 RtmsReceiver (const std::string &receiver_ip, const std::string &interface_name, const int port, const ifw::fnd::datatype::DataType data_type, const ReceiverConfig &rcv_cfg=ReceiverConfig())
 RTMS Receiver class.
 
virtual ~RtmsReceiver ()
 
void ReceiveLoop ()
 Receiver loop running until RtmsReceiver::StopReceiver() is invoked.
 
virtual void StopReceiver ()
 Signal to RTMS receiver to stop execution.
 
bool ReceiveSample (SampleExtInfo &ext_info, std::vector< uint8_t > &sample_payload, std::chrono::nanoseconds timeout)
 Receives one sample. Returns true if a sample received within the timeout.
 
virtual void HandleSampleUser (SampleExtInfo &ext_info, std::vector< uint8_t > &sample_payload)=0
 User provided method to handle an RTMS Sample received.
 
int64_t GetLostFramesCount () const
 

Static Public Attributes

static std::atomic< bool > s_execute = true
 

Protected Member Functions

int64_t GetSampleId () const
 
ifw::fnd::datatype::DataType GetDataType () const
 
ReceiverConfig GetConfig () const
 

Detailed Description

RtmsReceiver class.

This class is used to receive RTMS samples. It is based on the llnetio library. It is expected that the Extended Info of the Leader packet contains the following information:

<ext info> ::= <offset_x><offset_y><width><height>

All fields shall have type int32_t.

Constructor & Destructor Documentation

◆ RtmsReceiver()

ifw::rtmstools::rtmslib_llnetio::RtmsReceiver::RtmsReceiver ( const std::string & receiver_ip,
const std::string & interface_name,
const int port,
const ifw::fnd::datatype::DataType data_type,
const ReceiverConfig & rcv_cfg = ReceiverConfig() )

RTMS Receiver class.

Parameters
receiver_ipIp where the data is received (unicast or multicast address)
interface_nameName of the network interface where the packets are received when using multicast address.
portPort used for the UDP socket.
data_typeType of data received.
rcv_cfgAdditional configuration data for the receiver.

◆ ~RtmsReceiver()

ifw::rtmstools::rtmslib_llnetio::RtmsReceiver::~RtmsReceiver ( )
virtual

Member Function Documentation

◆ GetConfig()

ReceiverConfig ifw::rtmstools::rtmslib_llnetio::RtmsReceiver::GetConfig ( ) const
protected

◆ GetDataType()

ifw::fnd::datatype::DataType ifw::rtmstools::rtmslib_llnetio::RtmsReceiver::GetDataType ( ) const
protected

◆ GetLostFramesCount()

int64_t ifw::rtmstools::rtmslib_llnetio::RtmsReceiver::GetLostFramesCount ( ) const

◆ GetSampleId()

int64_t ifw::rtmstools::rtmslib_llnetio::RtmsReceiver::GetSampleId ( ) const
protected

◆ HandleSampleUser()

virtual void ifw::rtmstools::rtmslib_llnetio::RtmsReceiver::HandleSampleUser ( SampleExtInfo & ext_info,
std::vector< uint8_t > & sample_payload )
pure virtual

User provided method to handle an RTMS Sample received.

Parameters
ext_infoExtended Header Info.
sample_payloadImage data pixels.

Implemented in ifw::rtmstools::rtms2ddtlib_llnetio::Rtms2DdtGateway, and ifw::rtmstools::llnetio::RtmsReceiverTool.

◆ ReceiveLoop()

void ifw::rtmstools::rtmslib_llnetio::RtmsReceiver::ReceiveLoop ( )

Receiver loop running until RtmsReceiver::StopReceiver() is invoked.

◆ ReceiveSample()

bool ifw::rtmstools::rtmslib_llnetio::RtmsReceiver::ReceiveSample ( SampleExtInfo & ext_info,
std::vector< uint8_t > & sample_payload,
std::chrono::nanoseconds timeout )

Receives one sample. Returns true if a sample received within the timeout.

Parameters
ext_infoExtended Header Info.
sample_payloadImage data pixels.
timeoutTimeout in seconds to apply, waiting for the next image.
Returns
Returns true if a sample was received.

◆ StopReceiver()

void ifw::rtmstools::rtmslib_llnetio::RtmsReceiver::StopReceiver ( )
virtual

Signal to RTMS receiver to stop execution.

Member Data Documentation

◆ s_execute

std::atomic< bool > ifw::rtmstools::rtmslib_llnetio::RtmsReceiver::s_execute = true
static

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