UgCS video streamer
Classes | Public Types | Public Member Functions | List of all members
Streamer Class Reference

#include <streamer.h>

Classes

class  EventsListener
 
struct  Params
 

Public Types

enum  Status {
  Status::INITIALIZING, Status::OPERATIONAL, Status::CONNECTION_FAILURE, Status::STREAMING_PROTOCOL_BAD_VERSION,
  Status::OTHER_FAILURE, Status::FINISHED
}
 

Public Member Functions

 Streamer (const Params &params, std::unique_ptr< EventsListener > &&eventsListener=nullptr)
 
void Start ()
 
void Stop ()
 
void SetTailNumber (const std::string &tailNumber)
 
void FeedData (const net::SingleBuffer::Ptr &pkt)
 
void FeedTelemetry (const Telemetry &telemetry)
 
StructuredData GetStatistics () const
 
int GetUrtpPeerVersion () const
 

Detailed Description

Top-level component for producing MISP-compliant video stream.

Member Enumeration Documentation

◆ Status

enum Streamer::Status
strong

Should match MispStreamer.Status in managed code.

Enumerator
INITIALIZING 

Stream is being initialized (format is probed, codec parameters determined etc.).

OPERATIONAL 

Stream is being sent normally.

CONNECTION_FAILURE 

Connection has been closed unexpectedly.

STREAMING_PROTOCOL_BAD_VERSION 

Streaming protocol version mismatch.

OTHER_FAILURE 

Other streaming failure (e.g. network interface lost).

FINISHED 

Streamer was stopped normally.

Constructor & Destructor Documentation

◆ Streamer()

Streamer::Streamer ( const Params params,
std::unique_ptr< EventsListener > &&  eventsListener = nullptr 
)
Parameters
paramsStreaming parameters.
eventsListenerOptional listener for several event types.

Member Function Documentation

◆ FeedData()

void Streamer::FeedData ( const net::SingleBuffer::Ptr &  pkt)

Feed next chunk of raw H.264 video stream. There are no requirements for chunks alignment and sizes respectively to H.264 protocol data units.

◆ FeedTelemetry()

void Streamer::FeedTelemetry ( const Telemetry telemetry)

Set most recent telemetry values to send in next metadata packet. Fields may be updated selectively, only non-empty values are accounted in each invocation.

◆ GetStatistics()

StructuredData Streamer::GetStatistics ( ) const

Get various streaming statistics. The statistics does not have any fixed structure (actual content is a subject for change at any time) and is intended for display/logging only. No any logic should be bound to.

◆ GetUrtpPeerVersion()

int Streamer::GetUrtpPeerVersion ( ) const
Returns
Peer protocol version if known, zero if not known. The call is legal only for URTP target.

◆ SetTailNumber()

void Streamer::SetTailNumber ( const std::string &  tailNumber)

Set new tail number.

◆ Start()

void Streamer::Start ( )

Start the component. It cannot be used until started.

◆ Stop()

void Streamer::Stop ( )

Stop the component releasing all used resources. The component cannot be used after that.


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