2.1 Common

This module contains basic objects and functions used in all libraries. Below you can find detailed description of the most significant objects. Complete list of available objects can be found in the Reference section.

IEchoCanceller is a platform independent interface describing EchoCanceller, which can be used in two-way communication implementations. A specific implementation of this object is platform-dependent and available only for Windows and Xamarin.Android at the moment. To create EchoCanceller object, a user has to call EchoCancellerFactory. EchoCancellerFactory creates an object or returns null if EchoCanceller is not supported on a current platform.

IAudioCaptureSource is an interface inherited from IMediaSource, described above. It provides platform independent properties and methods specific for audio capturing. Objects implementing IAudioCaptureSource can be seen below in descriptions of platform dependent modules.

It is important to understand the difference between the parameters set in SetCaptureMode and SetCaptureDevice. In SetCaptureMode, user sets capture parameters which are valid as long as IAudioCaptureSource is active, and cannot be changed. These parameters are set before starting an object. Whilst AudioCaptureAdditionalParameters (transmitted to SetCaptureDevice) contains parameters which user can change as long as this object is in Started state.

IVideoCaptureSource is an interface inherited from IMediaSource, described above. It provides platform independent properties and methods specific for video capturing. Objects implementing IVideoCaptureSource can be seen below in descriptions of platform dependent modules. IVideoCaptureSource allows setting UI control for preview of video capturing and exposes ICameraControl to control a camera. There are some platforms, on which it allows mixing several video sources into one output video stream, including overlay of images or texts over a captured video. For now, the mixing functionality is supported on Windows and Xamarin.Android. It is also available for native Android, native iOS and macOS libraries.

It is important to understand the difference between the parameters set in SetCaptureMode and SetSource. In SetCaptureMode, user sets capture parameters which are valid as long as IVideoCaptureSource is active and cannot be changed. These parameters are set before starting the object. Whilst VideoCaptureAdditionalParameters (transmitted to SetSource) contains parameters which user changes as long as this object is in Started state.

IPreviewControl is a platform independent interface used for setting UI control for a preview of captured video.

ICameraControl is used to control camera while capturing video e.g., zoom etc. It is available only for Xamarin.Android and Xamarin.iOS now.

The interface is available only after an object is in the state Started. Before that, a request of ICameraControl returns null.

OverlayImage/OverlayText. These objects are used to set image or text overlay for video capture. They both allow user to set where to place overlay. OverlayText also provides parameters for text decorations (e.g., size, bold, color etc.).

VAST.Codecs parsers - VAST.Codecs namespace includes several parsers of codecs, such as H.264, H.265, AAC, MP3, JPEG, etc. These parsers are intended for low level parsing of codec bitstreams. User can use these parsers to access such low level functions, however, it implies having deep knowledge of low level formats of codecs.

IInteractiveMediaSource. This interface is inherited from IMediaSource as it is mentioned above and intended for an interactive source e.g., a file. User usually does not utilize this interface directly, because it is automatically handled by a multi-protocol streaming server.

ProxySource. This object can be helpful in order to create one more layer between a media content consumer and an original source. It can be used if original source change is not feasible, but there is a need in decoding one. Then, ProxySource gets encoded data of an original source, and user receives decoded data from ProxySource.

SinkFactory. User can create sink objects by calling constructor of required objects, but a sink can also be created automatically by calling SinkFactory and providing URI as a parameter. SinkFactory creates a sink object depending on a protocol set in URI.

SourceFactory. User can create source objects by calling constructor of required objects, but a source can also be created automatically by calling SourceFactory and providing URI as a parameter. SourceFactory creates a source object depending on a protocol set in URI.

AggregatedNetworkSource is a special type of source which gets several other sources and aggregates them into one source with several streams. It is needed, for example, when user has two different sources for video and audio.

IMessaging is an interface implemented for RTSP protocol for now, allowing user to send custom messages (including text and binary messages) between a VASTreaming client and server. This kind of messaging is an extension over standard protocols and is possible only between VASTreaming peers.

INetworkSink is inherited from IMediaSink described above and includes additional properties specific for a network peer.

INetworkSource is inherited from IMediaSource described above and includes additional properties specific for a network peer.

INetworkStat & NetworkStat. There are several sources and sinks in VASTreaming library implementing interface INetworkStat which returns object NetworkStat with current connection statistics.

VirtualNetworkSource is intended for creating a fake network source around an IMediaSource object. It is needed because some interfaces of VASTreaming library require INetworkSource interface.

MediaTime carries out two main functions. The first one is to provide high resolution timestamps. The actual resolution depends on a platform but not worse than 1 millisecond. The second function is to convert timestamps between different timescales.

NtpTime is intended for synchronization of a running application time with NTP server. Usually, it is needed when server uses absolute time for synchronization of different sources. NtpTime allows synchronizing different sources with accuracy up to tens of milliseconds (limited by NTP protocol itself).

contact us

info@vastreaming.net