VideoOS.Platform.Data.AVIExporter Class Reference

This class will use environment specific implementation to export either one video stream with zero or more audio streams, or multiple video streams, to an AVI file. More...

Inheritance diagram for VideoOS.Platform.Data.AVIExporter:
VideoOS.Platform.Data.IExporter

Public Member Functions

 AVIExporter ()
 Exports the currently defined devices in a number of data formats.
 
virtual void Cancel ()
 Cancels the current export operation.
 
virtual void Close ()
 Uninitialize managed wrapper. Should be called when done using any instance of Exporter, for example at exit.
 
virtual void EndExport ()
 Ends and cleans up the current export operation.
 
virtual void Init ()
 Initialize managed wrapper. Must be called by application before StartExport()
 
virtual bool SetOverlayImage (Bitmap overlayBitmap, int verticalOverlayPosition, int horizontalOverlayPosition, double scaleFactor, bool ignoreAspect)
 Applies an overlay image to the exported video. The positioning and size are relative to the zoomed/cropped exported image (video). The method must be called prior to StartExport. For platform integrations this feature is only supported in combination with StartExport(DateTime, DateTime) method.
 
virtual bool StartExport (DateTime start, DateTime end)
 Exports the currently defined devices as an AVI file. Returns error if already in progress.
 
virtual bool StartExport (IEnumerable< SequenceAviExportElement > sequences)
 Exports the specified sequences as one sequential AVI file. The sequences will be exported one after another in the order provided.
 
- Public Member Functions inherited from VideoOS.Platform.Data.IExporter

Static Public Attributes

const int HorizontalOverlayPositionCentered = 1
 Constant defining centered position for the overlay image, argument used with SetOverlayImage(Bitmap, int, int, double, bool) method.
 
const int HorizontalOverlayPositionLeft = 0
 Constant defining left position for the overlay image, argument used with SetOverlayImage(Bitmap, int, int, double, bool) method.
 
const int HorizontalOverlayPositionRight = 2
 Constant defining right position for the overlay image, argument used with SetOverlayImage(Bitmap, int, int, double, bool) method.
 
const int VerticalOverlayPositionBottom = 2
 Constant defining bottom position for the overlay image, argument used with SetOverlayImage(Bitmap, int, int, double, bool) method.
 
const int VerticalOverlayPositionCentered = 1
 Constant defining centered position for the overlay image, argument used with SetOverlayImage(Bitmap, int, int, double, bool) method.
 
const int VerticalOverlayPositionTop = 0
 Constant defining top position for the overlay image, argument used with SetOverlayImage(Bitmap, int, int, double, bool) method.
 

Properties

virtual List< ItemAudioList [get, set]
 The list of Audio sources to export. Can be both microphones and Speakers.
 
virtual int AudioSampleDepth [get, set]
 Audio bit per sample, default is 16 bits.
 
virtual int AudioSampleRate [get, set]
 Sample rate for Audio. Default is 8000.
 
virtual bool AutoSplitExportFile [get, set]
 Enable/disable the autoSplitExport feature. Default set to true (=enable splitting).
When this property is set to true, the resulting AVI file is split into AVI files of with size as set in the MaxAVIFileSize property.
When this property is set to false, the resulting AVI file is limited to a size of MaxAVIFileSize. If the file size is exceeded then the export fails.
 
virtual List< ItemCameraList [get, set]
 The list of cameras to export.
 
virtual int Channels [get, set]
 Number of audio channels.
 
virtual string Codec [get, set]
 Codec to be used for AVI.
 
virtual string[] CodecList [get]
 Returns a list of valid codecs to be used for the AVI export.
 
virtual string ExportName [get, set]
 Specific the name of the export. This value is used as a part of the path and a the name of the optical disc.
This property is valid for Smart Client plug-ins only.
Default value is a construction of current Date and Time.
 
virtual bool ExportToDisk [get, set]
 Specifies whether to export hard disk.
The path of where to store the export is defined in the Path property.
This property is valid for Smart Client plug-ins.
Default value is true.
 
virtual bool ExportToMediaBurner [get, set]
 Specifies whether to export to an optical disc (i.e. DVD).
The drive letter of where to burn the export is defined in the MediaBurnerDriverLetter property.
This property is valid for Smart Client plug-ins only.
Default value is false.
 
virtual string Filename [get, set]
 Name of the AVI file.
 
virtual int FrameRate [get, set]
 Target frame rate.
 
virtual int Height [get, set]
 Height of target AVI.
 
virtual int LastDetailedError [get]
 Gets the last export detailed error as a number.
 
virtual int LastError [get]
 Gets the last export error as a number.
 
virtual string LastErrorString [get]
 Gets the last export error as an English string.
 
virtual int MaxAVIFileSize [get, set]
 Set the max file size of the autoSplitExport feature.
Default value is 512 MB, e.g. value of 512*1024*1024.
 
virtual char MediaBurnerDriverLetter [get, set]
 When the ExportToMediaBurner is set to true, the MediaBurnerDriverLetter is used to identify which burner to use.
This property is valid for Smart Client plug-ins only.
There is no default value, must be specified for MediaBurner exports.
 
virtual string Path [get, set]
 Where to store the export on hard disk.

 
virtual int Progress [get]
 Gets the updated progress in percent.
 
virtual bool Timestamp [get, set]
 True if timestamp should be placed on top of video.
 
virtual int Width [get, set]
 Width of target AVI.
 
virtual Rectangle Window [get, set]
 A rectagle to export, if only a part should be exported.
 
- Properties inherited from VideoOS.Platform.Data.IExporter

Detailed Description

This class will use environment specific implementation to export either one video stream with zero or more audio streams, or multiple video streams, to an AVI file.

To export just a single video stream (optionally with one or more audio streams) use the CameraList and AudioList properties and then call the StartExport(DateTime, DateTime) method.

To export multiple video streams sequentially to the same AVI file use the StartExport(IEnumerable<SequenceAviExportElement>) method and specify the cameras to export in the argument to this method. Audio is not supported for sequential export.

Sequential export in the Smart Client is supported from 2017 R3.

Constructor & Destructor Documentation

◆ AVIExporter()

VideoOS.Platform.Data.AVIExporter.AVIExporter ( )
inline

Exports the currently defined devices in a number of data formats.

Member Function Documentation

◆ Cancel()

virtual void VideoOS.Platform.Data.AVIExporter.Cancel ( )
inlinevirtual

Cancels the current export operation.

Implements VideoOS.Platform.Data.IExporter.

◆ Close()

virtual void VideoOS.Platform.Data.AVIExporter.Close ( )
inlinevirtual

Uninitialize managed wrapper. Should be called when done using any instance of Exporter, for example at exit.

Implements VideoOS.Platform.Data.IExporter.

◆ EndExport()

virtual void VideoOS.Platform.Data.AVIExporter.EndExport ( )
inlinevirtual

Ends and cleans up the current export operation.

Implements VideoOS.Platform.Data.IExporter.

◆ Init()

virtual void VideoOS.Platform.Data.AVIExporter.Init ( )
inlinevirtual

Initialize managed wrapper. Must be called by application before StartExport()

Implements VideoOS.Platform.Data.IExporter.

◆ SetOverlayImage()

virtual bool VideoOS.Platform.Data.AVIExporter.SetOverlayImage ( Bitmap overlayBitmap,
int verticalOverlayPosition,
int horizontalOverlayPosition,
double scaleFactor,
bool ignoreAspect )
inlinevirtual

Applies an overlay image to the exported video. The positioning and size are relative to the zoomed/cropped exported image (video). The method must be called prior to StartExport. For platform integrations this feature is only supported in combination with StartExport(DateTime, DateTime) method.

Parameters
overlayBitmapThe overlay image to be used. Should be in an alpha-enabled image color format (RGBA or BGRA) to be able to handle (semi-)transparent areas. Any other format will not support transparency.
verticalOverlayPositionThe vertical position of the overlay image relative to the regular orientation of the output images, supports: Top, Centered and Bottom location - use defined constants.
horizontalOverlayPositionThe horizontal position of the overlay image relative to the regular orientation of the output images, supports: Left, Centered and Right - use defined constants.
scaleFactorScale factor relative the output image size. The value of 1.0 indicates 100% size, and smaller means that the overlay will cover a smaller area of the image. Larger values will result in that the surplus will be cropped.
ignoreAspectFlag indicating whether or not the aspect ratio is taken into account. The value of false will ensure aspect ratio correction, otherwise the overlaying is done directly on a pixel-to-pixel basis.
Returns
True if successfully set the overlay image, otherwise false.

◆ StartExport() [1/2]

virtual bool VideoOS.Platform.Data.AVIExporter.StartExport ( DateTime start,
DateTime end )
inlinevirtual

Exports the currently defined devices as an AVI file. Returns error if already in progress.

Parameters
startThe start time.
endThe end time.
Returns
True if export was started. Is finished when Progress >= 100.

Implements VideoOS.Platform.Data.IExporter.

◆ StartExport() [2/2]

virtual bool VideoOS.Platform.Data.AVIExporter.StartExport ( IEnumerable< SequenceAviExportElement > sequences)
inlinevirtual

Exports the specified sequences as one sequential AVI file. The sequences will be exported one after another in the order provided.

  • no matter the chronological order of the data within.
Parameters
sequencesThe list of sequences to export.

The CameraList property is ignored (cameras to export are taken from sequences instead) and audio is not supported for this method.

Returns
True if export was started. Is finished when Progress >= 100.

Member Data Documentation

◆ HorizontalOverlayPositionCentered

const int VideoOS.Platform.Data.AVIExporter.HorizontalOverlayPositionCentered = 1
static

Constant defining centered position for the overlay image, argument used with SetOverlayImage(Bitmap, int, int, double, bool) method.

◆ HorizontalOverlayPositionLeft

const int VideoOS.Platform.Data.AVIExporter.HorizontalOverlayPositionLeft = 0
static

Constant defining left position for the overlay image, argument used with SetOverlayImage(Bitmap, int, int, double, bool) method.

◆ HorizontalOverlayPositionRight

const int VideoOS.Platform.Data.AVIExporter.HorizontalOverlayPositionRight = 2
static

Constant defining right position for the overlay image, argument used with SetOverlayImage(Bitmap, int, int, double, bool) method.

◆ VerticalOverlayPositionBottom

const int VideoOS.Platform.Data.AVIExporter.VerticalOverlayPositionBottom = 2
static

Constant defining bottom position for the overlay image, argument used with SetOverlayImage(Bitmap, int, int, double, bool) method.

◆ VerticalOverlayPositionCentered

const int VideoOS.Platform.Data.AVIExporter.VerticalOverlayPositionCentered = 1
static

Constant defining centered position for the overlay image, argument used with SetOverlayImage(Bitmap, int, int, double, bool) method.

◆ VerticalOverlayPositionTop

const int VideoOS.Platform.Data.AVIExporter.VerticalOverlayPositionTop = 0
static

Constant defining top position for the overlay image, argument used with SetOverlayImage(Bitmap, int, int, double, bool) method.

Property Documentation

◆ AudioList

virtual List<Item> VideoOS.Platform.Data.AVIExporter.AudioList
getset

The list of Audio sources to export. Can be both microphones and Speakers.

Implements VideoOS.Platform.Data.IExporter.

◆ AudioSampleDepth

virtual int VideoOS.Platform.Data.AVIExporter.AudioSampleDepth
getset

Audio bit per sample, default is 16 bits.

◆ AudioSampleRate

virtual int VideoOS.Platform.Data.AVIExporter.AudioSampleRate
getset

Sample rate for Audio. Default is 8000.

◆ AutoSplitExportFile

virtual bool VideoOS.Platform.Data.AVIExporter.AutoSplitExportFile
getset

Enable/disable the autoSplitExport feature. Default set to true (=enable splitting).
When this property is set to true, the resulting AVI file is split into AVI files of with size as set in the MaxAVIFileSize property.
When this property is set to false, the resulting AVI file is limited to a size of MaxAVIFileSize. If the file size is exceeded then the export fails.

◆ CameraList

virtual List<Item> VideoOS.Platform.Data.AVIExporter.CameraList
getset

The list of cameras to export.

Implements VideoOS.Platform.Data.IExporter.

◆ Channels

virtual int VideoOS.Platform.Data.AVIExporter.Channels
getset

Number of audio channels.

◆ Codec

virtual string VideoOS.Platform.Data.AVIExporter.Codec
getset

Codec to be used for AVI.

◆ CodecList

virtual string [] VideoOS.Platform.Data.AVIExporter.CodecList
get

Returns a list of valid codecs to be used for the AVI export.

◆ ExportName

virtual string VideoOS.Platform.Data.AVIExporter.ExportName
getset

Specific the name of the export. This value is used as a part of the path and a the name of the optical disc.
This property is valid for Smart Client plug-ins only.
Default value is a construction of current Date and Time.

◆ ExportToDisk

virtual bool VideoOS.Platform.Data.AVIExporter.ExportToDisk
getset

Specifies whether to export hard disk.
The path of where to store the export is defined in the Path property.
This property is valid for Smart Client plug-ins.
Default value is true.

◆ ExportToMediaBurner

virtual bool VideoOS.Platform.Data.AVIExporter.ExportToMediaBurner
getset

Specifies whether to export to an optical disc (i.e. DVD).
The drive letter of where to burn the export is defined in the MediaBurnerDriverLetter property.
This property is valid for Smart Client plug-ins only.
Default value is false.

◆ Filename

virtual string VideoOS.Platform.Data.AVIExporter.Filename
getset

Name of the AVI file.

◆ FrameRate

virtual int VideoOS.Platform.Data.AVIExporter.FrameRate
getset

Target frame rate.

◆ Height

virtual int VideoOS.Platform.Data.AVIExporter.Height
getset

Height of target AVI.

◆ LastDetailedError

virtual int VideoOS.Platform.Data.AVIExporter.LastDetailedError
get

Gets the last export detailed error as a number.

The last error.

Implements VideoOS.Platform.Data.IExporter.

◆ LastError

virtual int VideoOS.Platform.Data.AVIExporter.LastError
get

Gets the last export error as a number.

The last error.

Implements VideoOS.Platform.Data.IExporter.

◆ LastErrorString

virtual string VideoOS.Platform.Data.AVIExporter.LastErrorString
get

Gets the last export error as an English string.

The last error.

Implements VideoOS.Platform.Data.IExporter.

◆ MaxAVIFileSize

virtual int VideoOS.Platform.Data.AVIExporter.MaxAVIFileSize
getset

Set the max file size of the autoSplitExport feature.
Default value is 512 MB, e.g. value of 512*1024*1024.

◆ MediaBurnerDriverLetter

virtual char VideoOS.Platform.Data.AVIExporter.MediaBurnerDriverLetter
getset

When the ExportToMediaBurner is set to true, the MediaBurnerDriverLetter is used to identify which burner to use.
This property is valid for Smart Client plug-ins only.
There is no default value, must be specified for MediaBurner exports.

◆ Path

virtual string VideoOS.Platform.Data.AVIExporter.Path
getset

Where to store the export on hard disk.

Implements VideoOS.Platform.Data.IExporter.

◆ Progress

virtual int VideoOS.Platform.Data.AVIExporter.Progress
get

Gets the updated progress in percent.

The percent done. Out of range 0-100 means error. -2 means uninitialized.

Implements VideoOS.Platform.Data.IExporter.

◆ Timestamp

virtual bool VideoOS.Platform.Data.AVIExporter.Timestamp
getset

True if timestamp should be placed on top of video.

◆ Width

virtual int VideoOS.Platform.Data.AVIExporter.Width
getset

Width of target AVI.

◆ Window

virtual Rectangle VideoOS.Platform.Data.AVIExporter.Window
getset

A rectagle to export, if only a part should be exported.