ifw-rtmslib 1.0.0
 
Loading...
Searching...
No Matches
RtmsSender Class Reference

RtmsSender class. More...

#include <rtmsSender.hpp>

Public Member Functions

 RtmsSender (const std::string &src_ip, const std::string &dest_ip, const int dest_port, const int8_t bytes_per_pixel, const size_t raw_image_size, const SenderConfig &sndr_cfg=SenderConfig())
 Simple RTMS Sender class.
 
virtual ~RtmsSender ()
 
int SendSample (const SampleExtInfo &ext_info, const std::vector< uint8_t > &sample_payload)
 User provided method to send an image as an RTMS Sample.
 
int GetPixelsPerSample () const
 

Public Attributes

uint32_t m_sample_id
 

Detailed Description

RtmsSender class.

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

<ext info> ::= <timestamp (seconds since epoch)>

All fields shall have type int32_t.

Constructor & Destructor Documentation

◆ RtmsSender()

ifw::rtmslib::RtmsSender::RtmsSender ( const std::string & src_ip,
const std::string & dest_ip,
const int dest_port,
const int8_t bytes_per_pixel,
const size_t raw_image_size,
const SenderConfig & sndr_cfg = SenderConfig() )

Simple RTMS Sender class.

Parameters
src_ipSource IPv4 address to bind the UDP socket.
dest_ipDestination IPv4 address (unicast or multicast) for outgoing packets.
dest_portDestination UDP port for outgoing packets.
data_typeType of pixels sent.
pixels_per_sampleNumber of pixels per image.
sndr_cfgAdditional sender configuration.

◆ ~RtmsSender()

ifw::rtmslib::RtmsSender::~RtmsSender ( )
virtual

Member Function Documentation

◆ GetPixelsPerSample()

int ifw::rtmslib::RtmsSender::GetPixelsPerSample ( ) const

◆ SendSample()

int ifw::rtmslib::RtmsSender::SendSample ( const SampleExtInfo & ext_info,
const std::vector< uint8_t > & sample_payload )

User provided method to send an image as an RTMS Sample.

Parameters
ext_infoExtended Header Info.
sample_payloadImage data to send.
Returns
0 in case of success. Non-zero if the sample was dropped (e.g. connection refused); internal sender state is reset so the next sample can proceed.

Member Data Documentation

◆ m_sample_id

uint32_t ifw::rtmslib::RtmsSender::m_sample_id

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