Digital Barriers
Digital Barriers EdgeVis Decoder SDK
Loading...
Searching...
No Matches
EdgeVisDecoderSDK::Stream Class Reference

Detailed Description

The Stream interface represent a service that is available on an Encoder.

The different types of Stream available include:

  • Media Stream (incorporating Video, Audio & GPS Data)
  • PTZ Stream
  • Pass Thru Stream
  • Full resolution Download Stream
  • Remote archive Retrieval Stream
  • SecureConnect stream

The class itself is the superclass for different stream classes that can be opened against an Encoder interface. The methods in this class are mainly used to open/close the stream and to retrieve the name and type of the stream. The appropriate methods of the subclass should then be used to interact with the functionality of the opened stream.

Availability

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

#include <Stream.h>

Inheritance diagram for EdgeVisDecoderSDK::Stream:
EdgeVisDecoderSDK::AnalyticsStream EdgeVisDecoderSDK::ArchiveExporterService EdgeVisDecoderSDK::FullResService EdgeVisDecoderSDK::GOPDownloadService EdgeVisDecoderSDK::MediaStream EdgeVisDecoderSDK::PTZStream EdgeVisDecoderSDK::PassThruStream EdgeVisDecoderSDK::SecureConnectProxyService

Public Member Functions

DB_EDGEVIS_SDK StreamType Type () const
 Gets the stream type.
DB_EDGEVIS_SDK std::wstring Name () const
 Gets the stream's name.
virtual DB_EDGEVIS_SDK OpResult SetTransport (TransportType trans)
 This is underlying transport type.
virtual DB_EDGEVIS_SDK TransportType GetTransport ()
 Gets the stream's transport.
DB_EDGEVIS_SDK Encoder GetEncoder () const
 Gets the Encoder object that the Stream is on.
DB_EDGEVIS_SDK OpResult Open ()
 Opens the stream.
DB_EDGEVIS_SDK void Close ()
 Closes this stream.
virtual DB_EDGEVIS_SDK bool IsConnected () const
 Determines if the stream is currently connected (in use).
DB_EDGEVIS_SDK void RegisterListener (IStreamListener *listener)
 Registers the specified listener to be notified when stream data is received.
DB_EDGEVIS_SDK void UnregisterListener (IStreamListener *listener)
 Removes the specified listener from the set of listeners to be notified about incoming stream data.
DB_EDGEVIS_SDK int64_t GetTotalBytesSent ()
 Returns the current total number of bytes sent on this stream.
DB_EDGEVIS_SDK int64_t GetTotalBytesReceived ()
 Returns the current total number of bytes received on this stream.
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.
DB_EDGEVIS_SDK int64_t GetLastStreamUseDuration () const
 Get the duration in milliseconds that the stream was open on last use.

Member Function Documentation

◆ Type()

DB_EDGEVIS_SDK StreamType EdgeVisDecoderSDK::Stream::Type ( ) const

Gets the stream type.

Returns
The stream type.

◆ Name()

DB_EDGEVIS_SDK std::wstring EdgeVisDecoderSDK::Stream::Name ( ) const

Gets the stream's name.

Returns
The name of the stream.

◆ SetTransport()

virtual DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::Stream::SetTransport ( TransportType trans)
virtual

This is underlying transport type.

You can set this property before opening the stream, otherwise the most appropriate transport type will be determined based on the configuration of the Encoder.

Generally you should not set this as the SDK will normally use the best performing transport for the stream you are opening. The only time it would be appropriate is in a TCP only environment where you are willing to sacrifice bandwidth by using TCP instead of UDP/RUDP.

Please refer to TransportType for a list of possible values.

Note
Do not change this property after calling Open() as it may not reflect the true state of the transport type.
Parameters
transThe type of the transport

◆ GetTransport()

virtual DB_EDGEVIS_SDK TransportType EdgeVisDecoderSDK::Stream::GetTransport ( )
virtual

Gets the stream's transport.

See also
SetTransport()
Returns
The transport used by this stream

◆ GetEncoder()

DB_EDGEVIS_SDK Encoder EdgeVisDecoderSDK::Stream::GetEncoder ( ) const

Gets the Encoder object that the Stream is on.

Returns
Pointer to the Encoder object that the stream is on.

◆ Open()

DB_EDGEVIS_SDK OpResult EdgeVisDecoderSDK::Stream::Open ( )

Opens the stream.

This opens the stream from the Encoder. Data should be received by an object that implements the IStreamListener interface via the the DataReceived() method. If the stream is already open then any calls to this method will be ignored.

Potential OpResults Returned:

OR_NotConnected - Encoder not connected to server
OR_InvalidStream - m_pimpl is nil or destroyed. You must retrieve a fresh list of encoders from the server

◆ Close()

DB_EDGEVIS_SDK void EdgeVisDecoderSDK::Stream::Close ( )

Closes this stream.

This closes the stream from the Encoder. This call is ignored if the stream is not already open

◆ IsConnected()

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

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

Returns
True if the stream is open, false otherwise.

Reimplemented in EdgeVisDecoderSDK::AnalyticsStream, EdgeVisDecoderSDK::MediaStream, EdgeVisDecoderSDK::PassThruStream, and EdgeVisDecoderSDK::PTZStream.

◆ RegisterListener()

DB_EDGEVIS_SDK void EdgeVisDecoderSDK::Stream::RegisterListener ( IStreamListener * listener)

Registers the specified listener to be notified when stream data is received.

Parameters
listenerPointer to the listening object.

◆ UnregisterListener()

DB_EDGEVIS_SDK void EdgeVisDecoderSDK::Stream::UnregisterListener ( IStreamListener * listener)

Removes the specified listener from the set of listeners to be notified about incoming stream data.

Parameters
listenerPointer to the listening object to remove.

◆ GetTotalBytesSent()

DB_EDGEVIS_SDK int64_t EdgeVisDecoderSDK::Stream::GetTotalBytesSent ( )

Returns the current total number of bytes sent on this stream.

Returns
The current total number of bytes sent

◆ GetTotalBytesReceived()

DB_EDGEVIS_SDK int64_t EdgeVisDecoderSDK::Stream::GetTotalBytesReceived ( )

Returns the current total number of bytes received on this stream.

Returns
The current total number of bytes received

◆ GetStreamUseDuration()

DB_EDGEVIS_SDK int64_t EdgeVisDecoderSDK::Stream::GetStreamUseDuration ( ) const

Get the duration in milliseconds that the stream has been open.

Returns
The duration in milliseconds that the stream has been open, or 0 if the stream is closed.

◆ GetLastStreamUseDuration()

DB_EDGEVIS_SDK int64_t EdgeVisDecoderSDK::Stream::GetLastStreamUseDuration ( ) const

Get the duration in milliseconds that the stream was open on last use.

Returns
The duration in milliseconds that the stream was open on last use, or 0 if the stream has not been open this session.

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