Stream Library - Class List

g is the description of classes presented in the Stream Library.

VideoCapabilities

Video capabilities.

Public Attributes

    <li><a href = "#VideoCapabilities@videoCodec">videoCodec</a></li>
    
    <li><a href = "#VideoCapabilities@videoResolution">videoResolution</a></li>
    
    <li><a href = "#VideoCapabilities@fps">fps</a></li>
    
    <li><a href = "#VideoCapabilities@bitRate">bitRate</a></li>
    
    <li><a href = "#VideoCapabilities@triggerList">triggerList</a></li>
    

Public Member Data Documentation

Following is the detailed documentation of the public variables declared under the VideoCapabilities class.

videoCodec

/// Video codec.
VideoCodec videoCodec;

videoResolution

/// Video resolution.
VideoResolution videoResolution;

fps

/// Maximum video frame per second.
int fps;

bitRate

/// Maximum video bitrate.
long bitRate;

triggerList

/// List of recording triggers.
std::vector<RecordingTriggers> triggerList;

AudioCapabilities

Audio capabilities.

Public Attributes

    <li><a href = "#AudioCapabilities@audioCodec">audioCodec</a></li>
    
    <li><a href = "#AudioCapabilities@audioSampleRate">audioSampleRate</a></li>
    
    <li><a href = "#AudioCapabilities@bitRate">bitRate</a></li>
    
    <li><a href = "#AudioCapabilities@triggerList">triggerList</a></li>
    

Public Member Data Documentation

Following is the detailed documentation of the public variables declared under the AudioCapabilities class.

audioCodec

/// Audio codec.
AudioCodec audioCodec;

audioSampleRate

/// Maximum audio sample rate.
SampleRate audioSampleRate;

bitRate

/// Maximum audio bitrate.
long bitRate;

triggerList

/// List of recording triggers.
std::vector<RecordingTriggers> triggerList;

RingBuffer

Buffer for Raw data
which will come from media layer

Public Attributes

    <li><a href = "#RingBuffer@bufferSize">bufferSize</a></li>
    
    <li><a href = "#RingBuffer@writeIndex">writeIndex</a></li>
    
    <li><a href = "#RingBuffer@readIndex">readIndex</a></li>
    
    <li><a href = "#RingBuffer@bigMask">bigMask</a></li>
    
    <li><a href = "#RingBuffer@smallMask">smallMask</a></li>
    
    <li><a href = "#RingBuffer@start_frame">start_frame</a></li>
    
    <li><a href = "#RingBuffer@inputSource">inputSource</a></li>
    
    <li><a href = "#RingBuffer@width">width</a></li>
    
    <li><a href = "#RingBuffer@height">height</a></li>
    
    <li><a href = "#RingBuffer@buffer">buffer</a></li>
    
    <li><a href = "#RingBuffer@isMotionData">isMotionData</a></li>
    
    <li><a href = "#RingBuffer@timestamp">timestamp</a></li>
    

Public Member Data Documentation

Following is the detailed documentation of the public variables declared under the RingBuffer class.

bufferSize

int32_t   bufferSize;   ///< Number of bytes in FIFO. Power of 2.

writeIndex

int32_t   writeIndex;   ///< Index of next writable byte.

readIndex

int32_t   readIndex;    ///< Index of next readable byte.

bigMask

int32_t   bigMask;      ///< Used for wrapping indices with extra bit to distinguish full/empty.

smallMask

int32_t   smallMask;    ///< Used for fitting indices to buffer.

start_frame

int32_t   start_frame;

inputSource

std::string inputSource;///< Used for input source name of this data.

width

int width;

height

int height;

buffer

unsigned char *buffer;

isMotionData

bool isMotionData;

timestamp

u_int64_t timestamp;

StreamStatistics

Supported media types: audio, video and image.

Public Attributes

    <li><a href = "#StreamStatistics@codecType">codecType</a></li>
    
    <li><a href = "#StreamStatistics@codecDescription">codecDescription</a></li>
    
    <li><a href = "#StreamStatistics@framesLost">framesLost</a></li>
    
    <li><a href = "#StreamStatistics@framesReceived">framesReceived</a></li>
    
    <li><a href = "#StreamStatistics@framesDropped">framesDropped</a></li>
    
    <li><a href = "#StreamStatistics@framesRecovered">framesRecovered</a></li>
    
    <li><a href = "#StreamStatistics@framesDisplayed">framesDisplayed</a></li>
    
    <li><a href = "#StreamStatistics@framesImpaired">framesImpaired</a></li>
    
    <li><a href = "#StreamStatistics@frameRate">frameRate</a></li>
    
    <li><a href = "#StreamStatistics@packetsReceived">packetsReceived</a></li>
    
    <li><a href = "#StreamStatistics@packetsLost">packetsLost</a></li>
    
    <li><a href = "#StreamStatistics@bitRateVideoData">bitRateVideoData</a></li>
    
    <li><a href = "#StreamStatistics@bitRateOverHead">bitRateOverHead</a></li>
    
    <li><a href = "#StreamStatistics@packetLossRate">packetLossRate</a></li>
    
    <li><a href = "#StreamStatistics@iFrameRate">iFrameRate</a></li>
    
    <li><a href = "#StreamStatistics@bFrameRate">bFrameRate</a></li>
    
    <li><a href = "#StreamStatistics@pFrameRate">pFrameRate</a></li>
    
    <li><a href = "#StreamStatistics@senderQualityFactor">senderQualityFactor</a></li>
    
    <li><a href = "#StreamStatistics@videoResolution">videoResolution</a></li>
    
    <li><a href = "#StreamStatistics@averageDelay">averageDelay</a></li>
    
    <li><a href = "#StreamStatistics@jitter">jitter</a></li>
    
    <li><a href = "#StreamStatistics@averageRTT">averageRTT</a></li>
    
    <li><a href = "#StreamStatistics@windowSize">windowSize</a></li>
    
    <li><a href = "#StreamStatistics@bufferSize">bufferSize</a></li>
    
    <li><a href = "#StreamStatistics@framesSent">framesSent</a></li>
    
    <li><a href = "#StreamStatistics@packetsSent">packetsSent</a></li>
    
    <li><a href = "#StreamStatistics@sampleRate">sampleRate</a></li>
    

Public Methods

    <li><a href = "#StreamStatistics@StreamStatistics">StreamStatistics</a></li>
    
    <li><a href = "#StreamStatistics@~StreamStatistics">~StreamStatistics</a></li>
    

Typedefs

    <li><a href = "#StreamStatistics@Ptr">Ptr</a></li>
    

Public Member Data Documentation

Following is the detailed documentation of the public variables declared under the StreamStatistics class.

codecType

/// Media codec type.
std::string codecType;

codecDescription

/// Media codec description.
std::string codecDescription;

framesLost

/// The number of lost frames.
unsigned int framesLost;

framesReceived

/// The number of received frames.
unsigned int framesReceived;

framesDropped

/// The number of dropped frames. These frames are completely received,
/// but not decoded and rendered, due to CPU overload.
unsigned int framesDropped;

framesRecovered

/// The number of recovered frames. These frames are partially received but
/// can be recovered.
unsigned int framesRecovered;

framesDisplayed

/// The number of displayed frames.
unsigned int framesDisplayed;

framesImpaired

/// The number of impaired frames. These frames are partially received.
unsigned int framesImpaired;

frameRate

/// Received frame rate.
double frameRate;

packetsReceived

/// The number of received packets.
unsigned int packetsReceived;

packetsLost

/// The number of lost packets.
unsigned int packetsLost;

bitRateVideoData

/// Bitrate of video payload.
double bitRateVideoData;

bitRateOverHead

/// Bitrate of stream header. Includes TCP/IP header, RTP header, Video
/// header and header extension.
double bitRateOverHead;

packetLossRate

/// Packet loss rate.
double packetLossRate;

iFrameRate

/// Received I-Frame rate.
double iFrameRate;

bFrameRate

/// Received B-Frame rate.
double bFrameRate;

pFrameRate

/// Received P-Frame rate.
double pFrameRate;

senderQualityFactor

/// Video sending quality.
int senderQualityFactor;

videoResolution

/// Video resolution.
VideoResolution videoResolution;

averageDelay

/// Average delay in milliseconds for the preceding one second.
int averageDelay;

jitter

/// The jitter for the preceding one second.
unsigned int jitter;

averageRTT

/// The average packet round-trip time in milliseconds for the preceding one second.
double averageRTT;

windowSize

/// The window size.
unsigned int windowSize;

bufferSize

/// The buffer size.
unsigned int bufferSize;

framesSent

/// The number of frames sent.
unsigned int framesSent;

packetsSent

/// The number of sent packets.
unsigned int packetsSent;

sampleRate

/// Audio sample rate.
SampleRate sampleRate;

Public Member Function Documentation

Following is the detailed documentation of the public methods declared under the StreamStatistics class.

StreamStatistics

StreamStatistics();

~StreamStatistics

virtual ~StreamStatistics();

Typedefs Documentation

Following is the detailed documentation of the typedefs declared under the StreamStatistics class.

Ptr

/// Definition of a shared pointer to StreamStatistics.
typedef std::shared_ptr<StreamStatistics> Ptr;

FrameProperties

FrameProperties are different given the media type and the encoding scheme.
A frame is a coherent piece of data marked by the sampling timestamp value.
This is also called an access unit.

Public Attributes

    <li><a href = "#FrameProperties@format">format</a></li>
    
    <li><a href = "#FrameProperties@structure">structure</a></li>
    

Public Member Data Documentation

Following is the detailed documentation of the public variables declared under the FrameProperties class.

format

Format format;

structure

Structure structure;

Stream

Interface for audio, video and image streaming.
Stream interface definition for the Stream object.

Public Methods

    <li><a href = "#Stream@~Stream">~Stream</a></li>
    
    <li><a href = "#Stream@start">start</a></li>
    
    <li><a href = "#Stream@stop">stop</a></li>
    
    <li><a href = "#Stream@getInputSources">getInputSources</a></li>
    
    <li><a href = "#Stream@setInputSources">setInputSources</a></li>
    
    <li><a href = "#Stream@removeInputSources">removeInputSources</a></li>
    
    <li><a href = "#Stream@setAudioCapabilities">setAudioCapabilities</a></li>
    
    <li><a href = "#Stream@setVideoCapabilities">setVideoCapabilities</a></li>
    
    <li><a href = "#Stream@attachPreviewVideoWindow">attachPreviewVideoWindow</a></li>
    
    <li><a href = "#Stream@attachVideoWindow">attachVideoWindow</a></li>
    
    <li><a href = "#Stream@startStream">startStream</a></li>
    
    <li><a href = "#Stream@onStreamReceive">onStreamReceive</a></li>
    
    <li><a href = "#Stream@onStreamStart">onStreamStart</a></li>
    
    <li><a href = "#Stream@stopStream">stopStream</a></li>
    
    <li><a href = "#Stream@onStreamStop">onStreamStop</a></li>
    
    <li><a href = "#Stream@pauseStream">pauseStream</a></li>
    
    <li><a href = "#Stream@onStreamPause">onStreamPause</a></li>
    
    <li><a href = "#Stream@resumeStream">resumeStream</a></li>
    
    <li><a href = "#Stream@onStreamResume">onStreamResume</a></li>
    
    <li><a href = "#Stream@onStreamConnectivityChange">onStreamConnectivityChange</a></li>
    
    <li><a href = "#Stream@onReceivedVideoResolutionChange">onReceivedVideoResolutionChange</a></li>
    
    <li><a href = "#Stream@onReceivedVideoSpecificData">onReceivedVideoSpecificData</a></li>
    
    <li><a href = "#Stream@setRecordingBuffer">setRecordingBuffer</a></li>
    
    <li><a href = "#Stream@startRecording">startRecording</a></li>
    
    <li><a href = "#Stream@stopRecording">stopRecording</a></li>
    
    <li><a href = "#Stream@getRecordingList">getRecordingList</a></li>
    
    <li><a href = "#Stream@onRecordingCompleted">onRecordingCompleted</a></li>
    
    <li><a href = "#Stream@pushEncodedFrame">pushEncodedFrame</a></li>
    
    <li><a href = "#Stream@onReceiveFrame">onReceiveFrame</a></li>
    
    <li><a href = "#Stream@setQoSTable">setQoSTable</a></li>
    
    <li><a href = "#Stream@setQoS">setQoS</a></li>
    
    <li><a href = "#Stream@setAEC">setAEC</a></li>
    
    <li><a href = "#Stream@setAGC">setAGC</a></li>
    
    <li><a href = "#Stream@setVideoQualityProfile">setVideoQualityProfile</a></li>
    
    <li><a href = "#Stream@getSendStatistics">getSendStatistics</a></li>
    
    <li><a href = "#Stream@getReceiveStatistics">getReceiveStatistics</a></li>
    
    <li><a href = "#Stream@setRawDataCallback">setRawDataCallback</a></li>
    

Typedefs

    <li><a href = "#Stream@Ptr">Ptr</a></li>
    

Public Member Function Documentation

Following is the detailed documentation of the public methods declared under the Stream class.

~Stream

virtual ~Stream() {};

start

Starting Stream library. Resources are allocated waiting in idle state for a request to come in or to send a request issued by the application.

virtual StreamRet start() = 0;

Return Value: StreamRet::OK on successful resource allocation, other values on failure.

stop

Stopping Stream library. Graceful shutdown of recording and any other cloud service running, gracefully stops media processing. Close active streams and free resources.

virtual StreamRet stop(stopHandler handler) = 0;
MemberDatatypeDefinition
handlerstopHandlercom::anyconnect::stream::stopHandler function invoked when stream has fully stopped. No callbacks will be invoked after stopHandler is called.

Return Value: StreamRet::OK on successful resource releasion, other values on failure.

getInputSources

Get the list of input sources.

virtual StreamRet getInputSources(MediaType mediaType, std::vector<std::string> &sourceList) = 0;
MemberDatatypeDefinition
mediaTypeMediaTypeselected media type
sourceListstd::vector<std::string> &list of input sources for the mediaType

Return Value: StreamRet::OK on success, other values on failure.

setInputSources

Set the input sources.

virtual StreamRet setInputSources(MediaType mediaType, const std::vector<std::string> &sourceList, onSetInputSourcesHandler handler) = 0;
MemberDatatypeDefinition
mediaTypeMediaTypeselected media type
sourceListconst std::vector<std::string> &list of input sources are going to be used by stream library in the following streaming
handleronSetInputSourcesHandlerfunction pointer called on setting input sources

Return Value: StreamRet::OK on success, other values on failure.

removeInputSources

Remove the input sources.

virtual StreamRet removeInputSources(MediaType mediaType, const std::vector<std::string> &sourceList, onSetInputSourcesHandler handler) = 0;
MemberDatatypeDefinition
mediaTypeMediaTypeselected media type
sourceListconst std::vector<std::string> &list of input sources are going to be removed from stream library
handleronSetInputSourcesHandlerfunction pointer called on removing input sources

Return Value: StreamRet::OK on success, other values on failure.

setAudioCapabilities

Set audio capabilities.

virtual StreamRet setAudioCapabilities(const std::string &inputSource, const AudioCapabilities &audioCapabilities) = 0;
MemberDatatypeDefinition
inputSourceconst std::string &the audio input source
audioCapabilitiesconst AudioCapabilities &the audio capabilities which are going to be used by stream library in the following streaming.

Return Value: StreamRet::OK on success, other values on failure.

setVideoCapabilities

Set video capabilities.

virtual StreamRet setVideoCapabilities(const std::string &inputSource, const VideoCapabilities &videoCapabilities) = 0;
MemberDatatypeDefinition
inputSourceconst std::string &the video input source
videoCapabilitiesconst VideoCapabilities &the video capabilites which are going to be used by stream library in the following streaming.

Return Value: StreamRet::OK on success, other values on failure.

attachPreviewVideoWindow

Attach the self-video preview window. Attaching the self-video preview window to render the captured video from the camera. This will start rendering self-camera video when stream start with any endpoint. Note: this API is only supported for Android and iOS platforms

virtual StreamRet attachPreviewVideoWindow(long long viewId) = 0;
MemberDatatypeDefinition
viewIdlong longID of the view where self-video should render

Return Value: StreamRet::OK on success, other values on failure.

attachVideoWindow

Attach video window for remote. Attaching the video window to render the video received from remote endpoint. This will start rendering remote endpoint's video when library starts receiving video from remote endpoint. Note: this API is only supported for Android and iOS platforms and this API need to be invoked multiple times for multiple endpoint's video sources.

virtual StreamRet attachVideoWindow(const EndPointUUID &fromEndPoint, long long viewId) = 0;
MemberDatatypeDefinition
fromEndPointconst EndPointUUID &stream source endpoint UUID
viewIdlong longID of the view where remote video should render

Return Value: StreamRet::OK on success, other values on failure.

startStream

Start a stream.

virtual void startStream(const EndPointUUID &fromEndPoint, const std::vector<MediaType> &mediaTypeList, onStreamRequestHandler handler) = 0;
MemberDatatypeDefinition
fromEndPointconst EndPointUUID &source endpoint UUID
mediaTypeListconst std::vector<MediaType> &of mediaTypes
handleronStreamRequestHandlerpointer called when the request is issued Note: this API can be invoked multiple times to stream with multiple remote endpoints.

onStreamReceive

Set callback to get notified when a stream requested.

virtual void onStreamReceive(onStreamReceiveHandler handler) = 0;
MemberDatatypeDefinition
handleronStreamReceiveHandlerpointer called when a stream has been requested.

onStreamStart

Set callback to get notified when a stream started.

virtual void onStreamStart(onStreamStartHandler handler) = 0;
MemberDatatypeDefinition
handleronStreamStartHandlerpointer called when the stream has started.

stopStream

Request to stop a stream.

virtual void stopStream(const EndPointUUID &fromEndPoint, onStreamStopHandler handler) = 0;
MemberDatatypeDefinition
fromEndPointconst EndPointUUID &source endpoint UUID concerned by the stop request.
handleronStreamStopHandlerpointer called when the stream has been stopped.

onStreamStop

Set callback to get notified when a stream stopped.

virtual void onStreamStop(onStreamStopHandler handler) = 0;
MemberDatatypeDefinition
handleronStreamStopHandlerpointer which will be called when any stream has been stopped.

pauseStream

Pause the transmission of selected media.

virtual void pauseStream(const EndPointUUID &fromEndPoint, const std::vector<MediaType> &mediaTypeList, onStreamPauseHandler handler) = 0;
MemberDatatypeDefinition
fromEndPointconst EndPointUUID &source endpoint UUID
mediaTypeListconst std::vector<MediaType> &media types
handleronStreamPauseHandlerpointer called when the stream has been paused.

onStreamPause

Set callback to get notified when a stream paused.

virtual void onStreamPause(onStreamPauseHandler handler) = 0;
MemberDatatypeDefinition
handleronStreamPauseHandlerpointer which will be called when any stream has been paused.

resumeStream

Resume the transmission of selected media.

virtual void resumeStream(const EndPointUUID &fromEndPoint, const std::vector<MediaType> &mediaTypeList, onStreamResumeHandler handler) = 0;
MemberDatatypeDefinition
fromEndPointconst EndPointUUID &source endpoint UUID
mediaTypeListconst std::vector<MediaType> &media types
handleronStreamResumeHandlerpointer called when the stream has been resumed.

onStreamResume

Set callback to get notified when a stream resumed.

virtual void onStreamResume(onStreamResumeHandler handler) = 0;
MemberDatatypeDefinition
handleronStreamResumeHandlerpointer which will be called when any stream has been resumed.

onStreamConnectivityChange

set callback to get notified when connectivity has changed for an ongoing stream session

virtual void onStreamConnectivityChange(onStreamConnectivityChangeHandler handler) = 0;
MemberDatatypeDefinition
handleronStreamConnectivityChangeHandlerpointer which will be called when connectivity of an ongoing streaming has changed.

onReceivedVideoResolutionChange

set callback to get notified when video resolution has changed for an ongoing stream session

virtual void onReceivedVideoResolutionChange(onReceivedVideoResolutionChangeHandler handler) = 0;
MemberDatatypeDefinition
handleronReceivedVideoResolutionChangeHandlerpointer which will be called when video resolution of an ongoing streaming has changed.

onReceivedVideoSpecificData

set callback to get notified when received video specific data

virtual void onReceivedVideoSpecificData(onReceivedVideoSpecificDataHandler handler) = 0;
MemberDatatypeDefinition
handleronReceivedVideoSpecificDataHandlerpointer which will be called when video specific data of an ongoing streaming has received.

setRecordingBuffer

Set video recording buffer.

virtual void setRecordingBuffer(int bufferTime, int duration) = 0;
MemberDatatypeDefinition
bufferTimeinttime of the recording buffer in seconds.
durationintduration of the recording in seconds.

startRecording

onStartRecordingHandler will tell if recording is started or not.

virtual bool startRecording(const EndPointUUID &fromEndPoint, time_t referenceTime, time_t actionTime, time_t duration, const std::vector<MediaType> &mediaTypeList, const std::vector<std::string> &sourceList, bool eventTrigger, onStartRecordingHandler handler) = 0;
MemberDatatypeDefinition
fromEndPointconst EndPointUUID &source endpoint UUID
referenceTimetime_tUTC time
actionTimetime_tstarting time of the recording
durationtime_tintended durtation of the recording. Setting it to 0 will cause the recording to continue indefinitely
mediaTypeListconst std::vector<MediaType> &media types (audio/video)
sourceListconst std::vector<std::string> &Id of the cameras for which recording has to be started
eventTriggerboolif the recording initiated for an event.
handleronStartRecordingHandlerpointer for the callback. Note that, this API will be used by both the camera and the application to start the recording. When invoked from the camera the fromEndPoint will be empty.

stopRecording

Request to stop the recording.

virtual void stopRecording(const EndPointUUID &fromEndPoint, const std::vector<MediaType> &mediaTypeList, onStopRecordingHandler handler) = 0;
MemberDatatypeDefinition
fromEndPointconst EndPointUUID &source endpoint UUID
mediaTypeListconst std::vector<MediaType> &media types
handleronStopRecordingHandlerpointer for the callback.

getRecordingList

Request the list of recordings from the endpoint.

virtual void getRecordingList(const EndPointUUID &fromEndPoint, std::time_t startTime, std::time_t endTime, onRecordingListHandler handler) = 0;
MemberDatatypeDefinition
fromEndPointconst EndPointUUID &source endpoint UUID
startTimestd::time_tof the newest recording.
endTimestd::time_tof the oldest recording.
handleronRecordingListHandlerpointer called when recording list has retrieved.

onRecordingCompleted

Set callback to get notified when a recording completed.

virtual void onRecordingCompleted(onStopRecordingHandler handler) = 0;
MemberDatatypeDefinition
handleronStopRecordingHandlerpointer which will be called when a recording has completed.

pushEncodedFrame

Provide compressed frame. This will send the already encoded frame to the endpoint

virtual int pushEncodedFrame(const EndPointUUID &toEndpoint, MediaType mediaType, void *framePtr, long size, FrameProperties frameProperties, time_t timestamp) = 0;
MemberDatatypeDefinition
toEndpointconst EndPointUUID &stream sink endpoint UUID
mediaTypeMediaTypeselected media type
framePtrvoid *frame data
sizelongsize of the frame
framePropertiesFramePropertiesproperties of the frame
timestamptime_ttime stamp of the frame

onReceiveFrame

Set callback to get notified when a frame received.

virtual void onReceiveFrame(onReceiveFrameHandler handler) = 0;
MemberDatatypeDefinition
handleronReceiveFrameHandlerpointer which will be called when received a frame.

setQoSTable

Set custom Video Quality Table in JSON format.

virtual void setQoSTable(const QoSjson &table) = 0;

setQoS

Enable or Disable Video Quality Control.

virtual void setQoS(bool enable) = 0;
MemberDatatypeDefinition
enablebooltrue enables it and false disables it.

setAEC

Enable or Disable Audio Acoustic Echo Cancellation.

virtual void setAEC(bool enable) = 0;

setAGC

Enable or Disable Audio Automatic Gain Control.

virtual void setAGC(bool enable) = 0;

setVideoQualityProfile

Select video quality profile.

virtual void setVideoQualityProfile(VideoQualityProfile profile) = 0;

getSendStatistics

This will provide sending media statistics.

virtual void getSendStatistics(const EndPointUUID &toEndpoint, MediaType mediaType, StreamStatistics::Ptr streamStatistics) = 0;
MemberDatatypeDefinition
toEndpointconst EndPointUUID &stream sink endpoint UUID
mediaTypeMediaTypeselected media type
streamStatisticsStreamStatistics::Ptrstatistics of audio sending to endpoint

getReceiveStatistics

This will provide receiving media statistics.

virtual void getReceiveStatistics(const EndPointUUID &fromEndpoint, MediaType mediaType, StreamStatistics::Ptr streamStatistics) = 0;
MemberDatatypeDefinition
fromEndpointconst EndPointUUID &stream source endpoint UUID
mediaTypeMediaTypeselected media type
streamStatisticsStreamStatistics::PtrstreamStatistics of audio receiving from endpoint

setRawDataCallback

This will set RawData callback

virtual void setRawDataCallback(onRawDataHandler handler) = 0;
MemberDatatypeDefinition
handleronRawDataHandlercallback function for rawdata

Typedefs Documentation

Following is the detailed documentation of the typedefs declared under the Stream class.

Ptr

/// Definition of a shared pointer to Stream.
typedef std::shared_ptr<Stream> Ptr;

StreamBuilder

StreamBuilder builds a Stream object.
StreamBuilder builds a Stream object. It will return to
the caller an object which implements the Stream interface.

Private Attributes

    <li><a href = "#StreamBuilder@access">access</a></li>
    
    <li><a href = "#StreamBuilder@maxNetworkWaitTime">maxNetworkWaitTime</a></li>
    
    <li><a href = "#StreamBuilder@receiveTimeout">receiveTimeout</a></li>
    
    <li><a href = "#StreamBuilder@logDirectory">logDirectory</a></li>
    
    <li><a href = "#StreamBuilder@pluginLibraryDirectory">pluginLibraryDirectory</a></li>
    

Private Methods

    <li><a href = "#StreamBuilder@StreamBuilder">StreamBuilder</a></li>
    

Public Methods

    <li><a href = "#StreamBuilder@StreamBuilder">StreamBuilder</a></li>
    
    <li><a href = "#StreamBuilder@~StreamBuilder">~StreamBuilder</a></li>
    
    <li><a href = "#StreamBuilder@setAccess">setAccess</a></li>
    
    <li><a href = "#StreamBuilder@getAccess">getAccess</a></li>
    
    <li><a href = "#StreamBuilder@setReceiveTimeout">setReceiveTimeout</a></li>
    
    <li><a href = "#StreamBuilder@getReceiveTimeout">getReceiveTimeout</a></li>
    
    <li><a href = "#StreamBuilder@setMaxNetworkChangeTime">setMaxNetworkChangeTime</a></li>
    
    <li><a href = "#StreamBuilder@getMaxNetworkChangeTime">getMaxNetworkChangeTime</a></li>
    
    <li><a href = "#StreamBuilder@setLogDirectory">setLogDirectory</a></li>
    
    <li><a href = "#StreamBuilder@getLogDirectory">getLogDirectory</a></li>
    
    <li><a href = "#StreamBuilder@setPluginLibraryDirectory">setPluginLibraryDirectory</a></li>
    
    <li><a href = "#StreamBuilder@getPluginLibraryDirectory">getPluginLibraryDirectory</a></li>
    
    <li><a href = "#StreamBuilder@build">build</a></li>
    

Typedefs

    <li><a href = "#StreamBuilder@Ptr">Ptr</a></li>
    

Private Member Data Documentation

Following is the detailed documentation of the private variables declared under the StreamBuilder class.

access

com::anyconnect::access::Access::Ptr access;

maxNetworkWaitTime

unsigned int maxNetworkWaitTime;

receiveTimeout

unsigned int receiveTimeout;

logDirectory

std::string logDirectory;

pluginLibraryDirectory

std::string pluginLibraryDirectory;

Private Member Function Documentation

Following is the detailed documentation of the private methods declared under the StreamBuilder class.

StreamBuilder

StreamBuilder(const StreamBuilder &rsb) = delete;

Public Member Function Documentation

Following is the detailed documentation of the public methods declared under the StreamBuilder class.

StreamBuilder

StreamBuilder();

~StreamBuilder

virtual ~StreamBuilder();

setAccess

Set Access object. Set Access object.

void setAccess(com::anyconnect::access::Access::Ptr access)
MemberDatatypeDefinition
accesscom::anyconnect::access::Access::PtrAccess object.

getAccess

Get Access object.

com::anyconnect::access::Access::Ptr getAccess() const

Return Value: Access object.

setReceiveTimeout

Set the timeout for receiving media data. Set the timeout that Stream library will wait for receiving media data before closing any ongoing stream.

void setReceiveTimeout(unsigned int msTime) {receiveTimeout = msTime;}
MemberDatatypeDefinition
msTimeunsigned intTime in milliseconds to wait for receiving media data before closing stream.

getReceiveTimeout

Get the timeout for receiving media data. Get the timeout that Stream library will wait for media data before closing any ongoing stream.

unsigned int getReceiveTimeout() const {return receiveTimeout;}

Return Value: unsigned int - Time to wait in milliseconds.

setMaxNetworkChangeTime

Set the maximum network change time. Set the time that Connect will keep a connection open without an underlying path to get to the endpoint. (For example, if this value is greater than the time it takes to move from Wi-Fi to 4G, then the connection will not close.) The default value is 0, meaning that loss of network results in immediate close of connection.

void setMaxNetworkChangeTime(unsigned int msTime) {maxNetworkWaitTime = msTime;}
MemberDatatypeDefinition
msTimeunsigned intTime to wait for a new network path in milliseconds.

getMaxNetworkChangeTime

Get the maximum network change time. Get the maximum time that Connect will keep a connection open without an underlying path to reach the endpoint.

unsigned int getMaxNetworkChangeTime() const {return maxNetworkWaitTime;}

Return Value: unsigned int - Time to wait in milliseconds.

setLogDirectory

Set the logging directory for Stream library. Set the Stream library's logging directory.

void setLogDirectory(const std::string &logDirectory) {this->logDirectory = logDirectory;}
MemberDatatypeDefinition
logDirectoryconst std::string &log directory where Stream library will write the logs

getLogDirectory

Get the Stream library's logging directory.

std::string getLogDirectory() const

Return Value: Stream library's logging directory.

setPluginLibraryDirectory

Set the plugin library's directory for Stream library. Set the directory of plugin library for Stream library.

void setPluginLibraryDirectory(const std::string &pluginLibraryDirectory) {this->pluginLibraryDirectory = pluginLibraryDirectory;}
MemberDatatypeDefinition
pluginLibraryDirectoryconst std::string &event library's directory where the event library is available to be used by Stream library.

getPluginLibraryDirectory

Get the event library's directory.

std::string getPluginLibraryDirectory() const

Return Value: Event library's directory.

build

Construct a Stream object using the builder.

Stream::Ptr build() throw (std::runtime_error);

Return Value: In success, returns Stream::Ptr containing Stream instance. In failure, returns null Stream::Ptr

Typedefs Documentation

Following is the detailed documentation of the typedefs declared under the StreamBuilder class.

Ptr

/// Definition of a shared pointer to StreamBuilder.
typedef std::shared_ptr<StreamBuilder> Ptr;

Enum Class Documentation

Following is the description of the enum classes.

StreamRet

/// \brief Stream return states.
/// Defines Stream success and failure states.
enum class StreamRet {
    OK,                  ///< Successful invocation.
    NOT_STARTED,         ///< Call start() before calling APIs.
    INVALID_PARAMETERS,  ///< Invalid parameters.
    FAIL,                ///< Generic failure.
};

MediaType

/// Supported stream media types: audio, video and image.
enum class MediaType {
    AUDIO,
    VIDEO,
    IMAGE
};

VideoResolution

/// Supported video resolutions.
enum class VideoResolution {
    WH_176x144,
    WH_192x144,
    WH_320x240,
    WH_352x288,
    WH_640x400,
    WH_640x480,
    WH_840x480,
    WH_848x480,
    WH_1280x720,
    WH_1920x1080,
    WH_3840x2160,
    WH_7680x4320,
    WH_15360x8640
};

ImageFormat

/// Supported image formats.
enum class ImageFormat {
    BMP,
    GIF,
    JPEG,
    PNG,
    RAW,
    SVG,
    TIFF
};

VideoCodec

/// Supported video codecs.
enum class VideoCodec {
    H263,
    H264,
    H264_SVC,
    H265,
    RAW
};

RecordingTriggers

/// Supported recording trigger types.
enum class RecordingTriggers {
    MOTION,
    SOUND,
    TIME
};

VideoQualityProfile

/// Supported video quality profiles.
enum class VideoQualityProfile {
    HIGH_FRAME_RATE,  // Optimized image quality
    STANDARD_QUALITY,  // Optimized frame rate and image quality
    HIGH_IMAGE_QUALITY  // Optimized frame rate
};

AudioCodec

/// Supported audio codecs.
enum class AudioCodec {
    AAC,
    G711,
    G722,
    OPUS,
    SIREN,
    SPEEX
};

SampleRate

/// Supported audio sample rates.
enum class SampleRate {
    Hz_8K,
    Hz_12K,
    Hz_16K,
    Hz_20K,
    Hz_32K,
    Hz_48K
};

InputSourceStatus

/// Defines input source states.
enum class InputSourceStatus {
    SUCCESS,
    BUSY,
    NOT_SUPPORTED,
    NOT_FOUND,
    INVALID,
    FAIL
};

StreamTransitionState

/// Indicates stopped/recovering/restarted/restart-failed/retrying state of a stream session.
enum class StreamTransitionState {
    STOPPED,
    RECOVERING,
    RESTARTED,
    RESTART_FAILED,
    RETRYING,
    RUNNING
};

Global Typedefs Documentation

Following is the detailed documentation of the Typedefs which do not belong to any structur class

EndPointUUID

/// \brief End Point Universally Unique Identifier.
typedef com::anyconnect::access::types::Endpoint EndPointUUID;

RecordingURL

/// \brief Recorded media definition.
typedef std::string RecordingURL;

Format

/// \brief Format of the frame.
typedef std::string Format;

Structure

/// \brief Structure of the frame.
typedef std::string Structure;

QoSjson

/// \brief QoS values in json format.
typedef std::string QoSjson;

stopHandler

/// Handler function for stopping Stream API session.
typedef std::function<void()> stopHandler;

onStreamRequestHandler

/// Handler function for stream request.
/// \param[in] fromEndPoint stream source endpoint UUID
/// \param[in] status stream request status
typedef std::function<void(const EndPointUUID &fromEndPoint, const int &status)> onStreamRequestHandler;

onStreamReceiveHandler

/// Handler function for stream receive.
/// \param[in] toEndPoint - stream sink endpoint UUID
/// \param[in] mediaType - selected media type
/// \return True - to accept the requested stream
///         False - to reject the requested stream
typedef std::function<bool(const EndPointUUID &toEndPoint, MediaType mediaType)> onStreamReceiveHandler;

onStreamStartHandler

/// Handler function for stream start.
/// \param[in] fromEndPoint stream source endpoint UUID
/// \param[in] connectionType stream's connection type
typedef std::function<bool(const EndPointUUID &fromEndPoint, const std::string& connectionType)> onStreamStartHandler;

onStreamStopHandler

/// Handler function for stream stop.
/// \param[in] fromEndPoint stream source endpoint UUID
/// \param[in] status stream stop status
typedef std::function<void(const EndPointUUID &fromEndPoint, const int &status)> onStreamStopHandler;

onStreamPauseHandler

/// Handler function for stream pause.
/// \param[in] fromEndPoint stream source endpoint UUID
/// \param[in] mediaTypeList selected media types
/// \param[in] status stream pause status
typedef std::function<void(const EndPointUUID &fromEndPoint, const std::vector<MediaType> &mediaTypeList, const int &status)> onStreamPauseHandler;

onStreamResumeHandler

/// Handler function for stream resume.
/// \param[in] fromEndPoint stream source endpoint UUID
/// \param[in] mediaTypeList selected media types
/// \param[in] status stream resume status
typedef std::function<void(const EndPointUUID &fromEndPoint, const std::vector<MediaType> &mediaTypeList, const int &status)> onStreamResumeHandler;

onStreamConnectivityChangeHandler

/// Handler function for stream connectivity transition.
typedef std::function<void(const EndPointUUID &fromEndpoint, const StreamTransitionState streamTransitionState, const std::string &connectionType)> onStreamConnectivityChangeHandler;

onReceivedVideoResolutionChangeHandler

/// Handler function to notify video resolution change.
/// \param[in] fromEndPoint stream source endpoint UUID
/// \param[in] updatedVideoResolution updated video resolution.
typedef std::function<void(const EndPointUUID &fromEndpoint, VideoResolution &updatedVideoResolution)> onReceivedVideoResolutionChangeHandler;

onReceivedVideoSpecificDataHandler

/// Handler function to notify video specific data received.
/// \param[in] fromEndPoint stream source endpoint UUID
/// \param[in] timestamp - time stamp of the video frame
/// \param[in] data - video specific data
typedef std::function<void(const EndPointUUID &fromEndpoint, uint32_t &ssrc, time_t timestamp, const std::string &data)> onReceivedVideoSpecificDataHandler;

onStartRecordingHandler

/// Handler function for start recording.
/// \param[in] fromEndPoint stream source endpoint UUID
/// \param[in] status requested recording status
typedef std::function<bool(const EndPointUUID &fromEndPoint, const int &status)> onStartRecordingHandler;

onStopRecordingHandler

/// Handler function for stop recording.
/// \param[in] fromEndPoint stream source endpoint UUID
/// \param[in] status recording status
typedef std::function<void(const EndPointUUID &fromEndPoint, const int &status)> onStopRecordingHandler;

onRecordingListHandler

/// Handler function for recording list.
/// \param[in] fromEndPoint stream source endpoint UUID
/// \param[in] recordingList List of recording URL
typedef std::function<void(const EndPointUUID &fromEndPoint, const std::map<MediaType, const std::vector<RecordingURL>> &recordingList)> onRecordingListHandler;

onReceiveFrameHandler

/// Handler function for receive frame.
/// \param[in] fromEndpoint - stream source endpoint UUID
/// \param[in] mediaType - media type of the frame
/// \param[in] framePtr - frame data
/// \param[in] size - size of the frame
/// \param[in] frameProperties - properties of the frame
/// \param[in] timestamp - time stamp of the frame
typedef std::function<void(const EndPointUUID &fromEndpoint, MediaType mediaType, void *framePtr, long size, FrameProperties frameProperties, time_t timestamp)> onReceiveFrameHandler;

onSetInputSourcesHandler

/// Handler function for set input sources.
/// \param[in] inputSourceList List of input sources
/// \param[in] status List of input sources status
typedef std::function<void(const std::vector<std::string> &inputSourceList, const std::vector<InputSourceStatus> &status)> onSetInputSourcesHandler;

onRawDataHandler

/// Handler function for RawData 
/// \param[in] Buffer for Rawdata 
typedef std::function<void(RingBuffer buffer)> onRawDataHandler;