Impact Acquire SDK .NET
|
A class to create compressed video stream from images captured or loaded using the Impact Acquire API. More...
Public Member Functions | |
int | pause () |
Pauses this video stream. | |
int | resume () |
Resumes this video stream. | |
int | saveImage (Device pDev, Request pRequest) |
Encodes and stores the image associated with the mv.impact.acquire.Request object into the stream. | |
VideoStream (String fileName, Request pRequest) | |
Creates a new video stream file. | |
VideoStream (String fileName, Request pRequest, TVideoCodec codec) | |
Creates a new video stream file. | |
VideoStream (String fileName, Request pRequest, TVideoCodec codec, uint quality_pc) | |
Creates a new video stream file. | |
VideoStream (String fileName, Request pRequest, TVideoCodec codec, uint quality_pc, uint bitrate) | |
Creates a new video stream file. | |
VideoStream (String fileName, uint imageWidth, uint imageHeight) | |
Creates a new video stream file. | |
VideoStream (String fileName, uint imageWidth, uint imageHeight, TVideoCodec codec, uint quality_pc, uint bitrate) | |
Creates a new video stream file. | |
Static Public Member Functions | |
static String | getCodecAsString (TVideoCodec codec) |
Returns the a string representation for a video codec. | |
Properties | |
static Boolean | APIAvailable [get] |
Checks if the video stream API is available. | |
TVideoCodec | codec [get] |
Returns the codec used by this video stream. | |
String | CodecAsString [get] |
Returns the codec used by this video stream as a string. | |
String | fileName [get] |
Returns the file name of this video stream. | |
Boolean | paused [get] |
Checks is this video stream is currently paused. | |
A class to create compressed video stream from images captured or loaded using the Impact Acquire API.
This class heavily depends on the FFmpeg project (see FFmpeg). Without the libraries belonging to this project being present on the target system video streams cannot be created.
Because of what is stated in the above section Impact Acquire is NOT shipped with the FFmpeg binaries required to use this class!
On Windows the FFmpeg-share package matching the platform the application shall run with (32- or 64-bit) is needed. This can either be extracted into the installation folder of Impact Acquire e.g. into $(MVIMPACT_ACQUIRE_DIR)/Toolkits/ffmpeg-4.2.2-win64-shared or $(MVIMPACT_ACQUIRE_DIR)/Toolkits/ffmpeg-4.2.2-win32-shared (Works only for this versions) OR at the location pointed to by MVIMPACT_ACQUIRE_FFMPEG_DIR (see below) OR anywhere into the systems search path.
On Linux the package ffmpeg must be installed and if e.g. H.264 support is needed the libavcodec-extra package as well.
Impact Acquire is capable of communicating with FFmpeg 4.x right now. This means that the following libraries will be recognized:
In order to load the FFmpeg libraries from a custom location the environment variable MVIMPACT_ACQUIRE_FFMPEG_DIR can be defined before creating the first mv.impact.acquire.labs.VideoStream instance after loading the mvDeviceManager library into the current processes address space. Without this environment variable only the systems default search path will be used to locate it and (Windows only) the Toolkits folder of the installation directory. This is how the search algorithm will operate:
|
inline |
Creates a new video stream file.
[in] | fileName | The name or full path of the file to create. The recommended file extensions for files can be found where the mv.impact.acquire.TVideoCodec enumeration is documented |
[in] | imageWidth | The input image width in pixels |
[in] | imageHeight | The input image height in pixels |
[in] | codec | The codec that shall be used while encoding the images into the stream. |
[in] | quality_pc | The quality of the resulting video stream in percent (0-100). The higher this value the larger the file will get. This value is only taken into account for the following codecs: mv.impact.acquire.TVideoCodec.vcH264, mv.impact.acquire.TVideoCodec.vcH265. |
[in] | bitrate | The bitrate of the resulting video stream in kBit/s. The higher this value the larger the file will get. This value is only taken into account for the following codecs: mv.impact.acquire.TVideoCodec.vcMPEG2. |
|
inline |
Creates a new video stream file.
[in] | fileName | The name or full path of the file to create. The recommended file extensions for files can be found where the mv.impact.acquire.TVideoCodec enumeration is documented |
[in] | imageWidth | The input image width in pixels |
[in] | imageHeight | The input image height in pixels |
|
inline |
Creates a new video stream file.
[in] | fileName | The name or full path of the file to create. The recommended file extensions for files can be found where the mv.impact.acquire.TVideoCodec enumeration is documented |
[in] | pRequest | A mv.impact.acquire.Request object carrying the image related information that are about to get stored in the stream. |
[in] | codec | The codec that shall be used while encoding the images into the stream. |
[in] | quality_pc | The quality of the resulting video stream in percent (0-100). The higher this value the larger the file will get. This value is only taken into account for the following codecs: mv.impact.acquire.TVideoCodec.vcH264, mv.impact.acquire.TVideoCodec.vcH265. |
[in] | bitrate | The bitrate of the resulting video stream in kBit/s. The higher this value the larger the file will get. This value is only taken into account for the following codecs: mv.impact.acquire.TVideoCodec.vcMPEG2. |
|
inline |
Creates a new video stream file.
[in] | fileName | The name or full path of the file to create. The recommended file extensions for files can be found where the mv.impact.acquire.TVideoCodec enumeration is documented |
[in] | pRequest | A mv.impact.acquire.Request object carrying the image related information that are about to get stored in the stream |
[in] | codec | The codec that shall be used while encoding the images into the stream. |
[in] | quality_pc | The quality of the resulting video stream in percent (0-100). The higher this value the larger the file will get. This value is only taken into account for the following codecs: mv.impact.acquire.TVideoCodec.vcH264, mv.impact.acquire.TVideoCodec.vcH265 |
|
inline |
Creates a new video stream file.
[in] | fileName | The name or full path of the file to create. The recommended file extensions for files can be found where the mv.impact.acquire.TVideoCodec enumeration is documented |
[in] | pRequest | A mv.impact.acquire.Request object carrying the image related information that are about to get stored in the stream |
[in] | codec | The codec that shall be used while encoding the images into the stream. |
|
inline |
Creates a new video stream file.
[in] | fileName | The name or full path of the file to create. The recommended file extensions for files can be found where the mv.impact.acquire.TVideoCodec enumeration is documented |
[in] | pRequest | A mv.impact.acquire.Request object carrying the image related information that are about to get stored in the stream |
|
inlinestatic |
Returns the a string representation for a video codec.
This function returns a string representation for a video codec.
|
inline |
Pauses this video stream.
This function pauses this video stream. While paused no images can be written into the stream. Pausing internally simply starts a timer and all accumulated pause times will be subtracted from images that will be written into the stream after the pause has been ended effectively allowing to remove inactive sections from the video stream.
|
inline |
Resumes this video stream.
This function resumes this previously paused video stream. While paused no images can be written into the stream. Pausing internally simply starts a timer and all accumulated pause times will be subtracted from images that will be written into the stream after the pause has been ended effectively allowing to remove inactive sections from the video stream.
Encodes and stores the image associated with the mv.impact.acquire.Request object into the stream.
This function stores the image associated with an mv.impact.acquire.Request object into the video stream.
[in] | pDev | A pointer to a mv.impact.acquire.Device object obtained from a mv.impact.acquire.DeviceManager object. |
[in] | pRequest | A pointer to the mv.impact.acquire.Request object carrying the image to encode and store. |
|
staticget |
Checks if the video stream API is available.
Checks if the video stream API is available.
|
get |
Returns the codec used by this video stream.
This function returns the codec used by this video stream.
|
get |
Returns the codec used by this video stream as a string.
This function returns the codec used by this video stream as a string.
|
get |
Returns the file name of this video stream.
This function returns the file name of this video stream.
|
get |
Checks is this video stream is currently paused.