CVB++ 15.0
Stream Class Referencefinal

A RTP stream to send images. More...

#include <cvb/rtpstreaming/stream.hpp>

Public Member Functions

void PushImage (const Image &image)
 Push an image over the network. More...
 

Static Public Member Functions

static std::unique_ptr< StreamCreate (const StreamConfig &streamConfig)
 Creates a stream with a given configuration. More...
 

Detailed Description

A RTP stream to send images.

A stream may encode encode the images before sending.

Member Function Documentation

◆ Create()

static std::unique_ptr< Stream > Create ( const StreamConfig streamConfig)
inlinestatic

Creates a stream with a given configuration.

Parameters
[in]streamConfigThe configuration.
Returns
A pointer to a encoder object.
Exceptions
Anyexception derived from std::exception including CvbException.

As encoders may use exclusive system resources the number of streams active simultaneously may by limited by the encoder configured.

◆ PushImage()

void PushImage ( const Image image)
inline

Push an image over the network.

Parameters
[in]imageThe image.
Exceptions
Anyexception derived from std::exception including CvbException.

The images are sent as fast as possible. This is usually faster than the desired frame rate Which can lead to buffer overflow on the receiver side on the long run. In such scenarios manually delaying the next push is recommended.

The image must either be Mono8 or RGB8.