RtmsReceiver class.
More...
#include <rtmsReceiver.hpp>
RtmsReceiver class.
This class is used to receive RTMS samples. It is based on the llnetio library. The extended leader header is decoded with SampleExtInfo (timestamp, datatype, width, height, offset-x, offset-y). Only valid packed sizes (0, 8, or the full SampleExtInfo block) are accepted.
◆ RtmsReceiver()
| ifw::rtmslib::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_ip | Ip where the data is received (unicast or multicast address) |
| interface_name | Name of the network interface where the packets are received when using multicast address. |
| port | Port used for the UDP socket. |
| data_type | Type of data received. |
| rcv_cfg | Additional configuration data for the receiver. |
◆ ~RtmsReceiver()
| ifw::rtmslib::RtmsReceiver::~RtmsReceiver |
( |
| ) |
|
|
virtual |
◆ GetConfig()
◆ GetDataType()
| ifw::fnd::datatype::DataType ifw::rtmslib::RtmsReceiver::GetDataType |
( |
| ) |
const |
|
protected |
◆ GetLostFramesCount()
| int64_t ifw::rtmslib::RtmsReceiver::GetLostFramesCount |
( |
| ) |
const |
◆ GetSampleId()
| int64_t ifw::rtmslib::RtmsReceiver::GetSampleId |
( |
| ) |
const |
|
protected |
◆ HandleSampleUser()
| virtual void ifw::rtmslib::RtmsReceiver::HandleSampleUser |
( |
SampleExtInfo & | ext_info, |
|
|
std::vector< uint8_t > & | sample_payload ) |
|
pure virtual |
User provided method to handle an RTMS Sample received.
- Parameters
-
| ext_info | Extended Header Info. |
| sample_payload | Image data pixels. |
◆ ReceiveLoop()
| void ifw::rtmslib::RtmsReceiver::ReceiveLoop |
( |
| ) |
|
◆ ReceiveSample()
| bool ifw::rtmslib::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_info | Extended Header Info decoded via SampleExtInfo::Unpack(). |
| sample_payload | Image data pixels. |
| timeout | Timeout in seconds to apply, waiting for the next image. |
- Returns
- Returns true if a sample was received.
◆ RequestStop()
| void ifw::rtmslib::RtmsReceiver::RequestStop |
( |
| ) |
|
|
protected |
◆ StopReceiver()
| void ifw::rtmslib::RtmsReceiver::StopReceiver |
( |
| ) |
|
|
virtual |
Signal to RTMS receiver to stop execution.
◆ s_execute
| std::atomic< bool > ifw::rtmslib::RtmsReceiver::s_execute = true |
|
static |
The documentation for this class was generated from the following files: