EdgeVisDecoderSDK::PassThruStream Class Reference

Detailed Description

This object sends data to a port on an Encoder.

Remote ports can include serial ports. Only one client at a time can have the Pass Thru Stream open for sending to the Encoder and received pass thru data will be received in the DataReceived function attached to this stream.

When the Encoder is configured for one-to-one mode for sending back received data the PassThruData will only be received on the DataReceived function attached to the PassThruStream.

If the Encoder has been configured for one-to-many mode for sending back received data then the client application will also require the Encoder's MediaStream to be open in order to receive any PassThruData from this stream. The PassThruData data will be received on the DataReceived function attached to the PassThruStream and also on the function attached to the MediaStream. N.B. The client which has the PassThruStream open will receive the same PassThruData object twice. Once from the PassThruStream itself and once from the MediaStream.

For more information on setting up the DataReceived callback function please refer to Handling Stream Events .

Availability

Available in version 6.0 of Decoder SDK. Requires a server version greater than 6.0

#include <PassThruStream.h>

Public Member Functions

virtual DB_EDGEVIS_SDK bool IsConnected () const
 Determines if the stream is currently connected (in use). More...
 
DB_EDGEVIS_SDK bool SendData (byte_array data)
 Send some data on this pass thru stream,. More...
 
DB_EDGEVIS_SDK int32_t GetBytesFree () const
 A frame of data will be transmitted to the Encoder. More...
 
DB_EDGEVIS_SDK int32_t GetBufferSize () const
 Get the size of the pass thru stream buffer. More...
 
- Public Member Functions inherited from EdgeVisDecoderSDK::Stream
DB_EDGEVIS_SDK StreamType Type () const
 Gets the stream type. More...
 
DB_EDGEVIS_SDK std::wstring Name () const
 Gets the stream's name. More...
 
virtual DB_EDGEVIS_SDK OpResult SetTransport (TransportType trans)
 This is underlying transport type. More...
 
virtual DB_EDGEVIS_SDK TransportType GetTransport ()
 Gets the stream's transport. More...
 
DB_EDGEVIS_SDK Encoder GetEncoder () const
 Gets the Encoder object that the Stream is on. More...
 
DB_EDGEVIS_SDK OpResult Open ()
 Opens the stream. More...
 
DB_EDGEVIS_SDK void Close ()
 Closes this stream. More...
 
DB_EDGEVIS_SDK void RegisterListener (IStreamListener *listener)
 Registers the specified listener to be notified when stream data is received. More...
 
DB_EDGEVIS_SDK void UnregisterListener (IStreamListener *listener)
 Removes the specified listener from the set of listeners to be notified about incoming stream data. More...
 
DB_EDGEVIS_SDK int64_t GetTotalBytesSent ()
 Returns the current total number of bytes sent on this stream. More...
 
DB_EDGEVIS_SDK int64_t GetTotalBytesReceived ()
 Returns the current total number of bytes received on this stream. More...
 
DB_EDGEVIS_SDK void ResetDataUsageStats ()
 Resets the count of the total number of bytes sent and received for this stream.
 
DB_EDGEVIS_SDK int64_t GetStreamUseDuration () const
 Get the duration in milliseconds that the stream has been open. More...
 
DB_EDGEVIS_SDK int64_t GetLastStreamUseDuration () const
 Get the duration in milliseconds that the stream was open on last use. More...
 
DB_EDGEVIS_SDK void SetEnableAnalyticsSync (bool enable)
 Enables or disables synchronization of analytics metadata with audio and video Enabled by default, to disable set to false. More...
 
DB_EDGEVIS_SDK bool GetEnableAnalyticsSync () const
 Returns true if Analytics Sync is enabled. More...
 

Member Function Documentation

virtual DB_EDGEVIS_SDK bool EdgeVisDecoderSDK::PassThruStream::IsConnected ( ) const
virtual

Determines if the stream is currently connected (in use).

Returns
True if the stream is open, false otherwise.

Reimplemented from EdgeVisDecoderSDK::Stream.

DB_EDGEVIS_SDK bool EdgeVisDecoderSDK::PassThruStream::SendData ( byte_array  data)

Send some data on this pass thru stream,.

Parameters
dataBuffer holding the data to send
Returns
True if all bytes were sent, false if not enough free space to send bytes.
DB_EDGEVIS_SDK int32_t EdgeVisDecoderSDK::PassThruStream::GetBytesFree ( ) const

A frame of data will be transmitted to the Encoder.

The format of the data is unknown and requires knowledge of the device attached to the remote port.

The maximum number of bytes in a single call to SendData is 16384 bytes. If a call to SendData exceeds this size an Error will be returned.

The sent rate must not exceed the baud rate that the Encoder has been configured to use. If this rate is exceeded then an Error could be returned or data could be lost.

Also, the send rate must not exceed the available bandwidth of the link from the client to the Server or from the Server to the Encoder. The Encoder's maximum bandwidth setting provides an indication of the capacity of the link. Exceeding the capacity of the link may result in Errors being returned or data being lost.

Returns
Returns the maximum number of bytes that can be sent at present. This will return 0 if the pass thru stream has not been opened.
DB_EDGEVIS_SDK int32_t EdgeVisDecoderSDK::PassThruStream::GetBufferSize ( ) const

Get the size of the pass thru stream buffer.

Returns
Returns the size, in bytes, of the pass thru stream buffer. This will return 0 if the pass thru stream has not been opened.

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