ofxHTTP
A collection of tools for HTTP.
ofx::HTTP::IPVideoConnection Class Reference

The IPVideo route handler. More...

#include <IPVideoRoute.h>

Inheritance diagram for ofx::HTTP::IPVideoConnection:
ofx::HTTP::BaseRouteHandler_< IPVideoRoute > ofx::HTTP::IPVideoFrameQueue ofx::HTTP::AbstractRouteHandler ofx::HTTP::AbstractHTTPRequestHandler ofx::HTTP::AbstractServerEventRequestHandler

Public Member Functions

 IPVideoConnection (IPVideoRoute &route)
 Create an IPVideoConnection. More...
 
virtual ~IPVideoConnection ()
 Destroy the IPVideoConnection.
 
void handleRequest (ServerEventArgs &evt) override
 Handle the ServerEventArgs. More...
 
void stop () override
 Interrupt the handleRequest method if possible.
 
float currentBitRate () const
 Get the current bit rate in bits / second. More...
 
float currentFrameRate () const
 Get the current frame rate in frames / second. More...
 
IPVideoFrameSettings frameSettings () const
 Get the current frame settings. More...
 
- Public Member Functions inherited from ofx::HTTP::BaseRouteHandler_< IPVideoRoute >
 BaseRouteHandler_ (IPVideoRoute &route)
 Create a BaseRoute.
 
virtual ~BaseRouteHandler_ ()
 Destroy a BaseRoute.
 
void handleRequest (Poco::Net::HTTPServerRequest &request, Poco::Net::HTTPServerResponse &response) override
 
IPVideoRouteroute ()
 Get the dispatching route.
 
- Public Member Functions inherited from ofx::HTTP::AbstractRouteHandler
virtual ~AbstractRouteHandler ()
 Destroy the AbstractRouteHandler instance.
 
- Public Member Functions inherited from ofx::HTTP::AbstractHTTPRequestHandler
virtual ~AbstractHTTPRequestHandler ()
 Destroy the AbstractHTTPRequestHandler.
 
- Public Member Functions inherited from ofx::HTTP::AbstractServerEventRequestHandler
virtual ~AbstractServerEventRequestHandler ()
 Destroy the AbstractServerEventRequestHandler.
 
- Public Member Functions inherited from ofx::HTTP::IPVideoFrameQueue
 IPVideoFrameQueue (std::size_t maxSize)
 Create an IPVideoFrameQueue with a given maxSize. More...
 
virtual ~IPVideoFrameQueue ()
 Destroy the IPVideoFrameQueue.
 
std::shared_ptr< IPVideoFramepop ()
 
void push (std::shared_ptr< IPVideoFrame > frame)
 Push a frame onto the queue. More...
 
std::size_t getMaxSize () const
 
void setMaxSize (std::size_t maxSize)
 Set the maximum size of the queue. More...
 
std::size_t size () const
 
bool empty () const
 
void clear ()
 Clear all frames from the frame queue.
 

Protected Attributes

IPVideoFrameSettings _frameSettings
 The frame settings for this handler.
 
bool _isRunning = true
 True if the handler is running.
 
uint64_t _startTime = 0
 The start time fo the connection.
 
uint64_t _bytesSent = 0
 The number of bytes sent to the client from this connection.
 
uint64_t _framesSent = 0
 The number of frames sent to the client from this connection.
 
uint64_t _lastFrameSent = 0
 The time of the last frame sent.
 
uint64_t _lastFrameDuration = 0
 The amount of time required for the last frame.
 
uint64_t _targetFrameDuration = 0
 The target frame duration.
 
uint64_t _nextScheduledFrame = 0
 The time the next frame should be sent.
 
std::mutex _mutex
 The mutex for protecting data.
 
- Protected Attributes inherited from ofx::HTTP::BaseRouteHandler_< IPVideoRoute >
IPVideoRoute_route
 The route.
 

Detailed Description

The IPVideo route handler.

Constructor & Destructor Documentation

◆ IPVideoConnection()

ofx::HTTP::IPVideoConnection::IPVideoConnection ( IPVideoRoute route)

Create an IPVideoConnection.

Parameters
routeThe parent route.

Member Function Documentation

◆ currentBitRate()

float ofx::HTTP::IPVideoConnection::currentBitRate ( ) const

Get the current bit rate in bits / second.

Returns
the current bit rate in bits / second.

◆ currentFrameRate()

float ofx::HTTP::IPVideoConnection::currentFrameRate ( ) const

Get the current frame rate in frames / second.

Returns
the current frame rate in frames / second.

◆ frameSettings()

IPVideoFrameSettings ofx::HTTP::IPVideoConnection::frameSettings ( ) const

Get the current frame settings.

Returns
the frame settings.

◆ handleRequest()

void ofx::HTTP::IPVideoConnection::handleRequest ( ServerEventArgs evt)
overridevirtual

Handle the ServerEventArgs.

Parameters
evtThe server request event.

Implements ofx::HTTP::BaseRouteHandler_< IPVideoRoute >.


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