VideoFile Class

Namespace: id3.Devices

Definition

Provides functionality for handling video files and streams.
It extends DeviceChannel to support operations like loading files, streaming, and managing playback.
class VideoFile
class VideoFile implements Finalizable
public partial class VideoFile
public class VideoFile implements AutoCloseable, Serializable
typedef struct id3DevicesVideoFile *ID3_DEVICES_VIDEO_FILE;

Usage

videoFileInstance = VideoFile()
# ...

Explicit destruction

# ...
del videoFileInstance
final videoFileInstance = sdk.VideoFile();
// ...

Explicit destruction

// ...
videoFileInstance.dispose()
using (var videoFileInstance = new VideoFile())
{
   // ...
}

Explicit destruction

var videoFileInstance = new VideoFile()
// ...
videoFileInstance.Dispose()
try (VideoFile videoFileInstance = new VideoFile()) {
// ...
}

Explicit destruction

VideoFile videoFileInstance = new VideoFile();
// ...
videoFileInstance.close();
ID3_DEVICES_VIDEO_FILE hVideoFile{};
int err = id3DevicesVideoFile_Initialize(&hVideoFile);
if (err == ID3_SUCCESS) {
    // ...
    id3DevicesVideoFile_Dispose(&hVideoFile);
}

Properties

Name

Type

Description

deviceAddedCallback

PlugAndPlayCallback

Callback invoked when a device is added to the channel.

deviceClosedCallback

DeviceSelectedCallback

Callback function for when a device is closed on this channel.

deviceEventCallback

DeviceEventCallback

(C++): Callback for generic device events.

deviceFilterList

DeviceTypeList

A list filtering the types of devices this channel will interact with.

deviceId

int

Identifier for the device associated with this channel, intended for internal or plugin use.

deviceInfo

DeviceInfo

Fetches the device object.

deviceOpenedCallback

DeviceSelectedCallback

Callback that is called when a device is opened on this channel.

deviceRemovedCallback

PlugAndPlayCallback

Callback function triggered upon the removal of a device from the channel.

deviceState

DeviceState

Reflects the current state of the device, such as connected, disconnected, etc.

deviceStatusChangedCallback

DeviceCaptureStatusChangedCallback

Callback function invoked when the device’s status changes, such as when the device is opened or closed.

isPlaying

bool

Indicates whether the video file is currently in play mode.

isPreviewing

bool

A boolean property indicating whether the device is currently in preview mode.

parameterCategoryList

StringList

Lists categories of parameters relevant to the device.

playMode

PlayMode

An enumeration indicating the current play mode of the video file.

position

int

An integer property representing the current playback position in the video file.

previewCallback

CaptureCallback

Callback function triggered when a new frame becomes available from the video file.

takeSnapshotCallback

CaptureCallback

Callback function triggered when a snapshot is completed.

Methods

Name

Description

addDeviceFilter

Adds a filter to specify the types of devices this channel should handle.

applyParameters

Applies a set of parameters to the device.

checkCommand

(C++/dotnet): Checks if a specific command is available on the device.

checkParameter

Confirms if a parameter exists on the device.

clearDeviceFilter

Clears all set device filters, removing any type restrictions.

closeDevice

Controls closing the associated device.

getCurrentFrame

Fetches the most recent frame from the live feed.

getLastSnapshot

Fetches the most recent snapshot taken by the take_snapshot function.

getMeasurementData

Retrieves a list of measurement data collected during capture sessions.

getParameter

Retrieves a device parameter’s value.

getParameterDescriptor

Fetches the descriptor of a device parameter.

getParameterList

Obtains all supported parameters, optionally filtered by category.

getParameterNameList

Retrieves names of all supported parameters, optionally filtered by category.

getParameterValueInt

Gets the integer value of a device parameter.

isPreviouslyDisconnectedDevice

Checks if the specified device was previously disconnected.

loadFile

Loads a video file from the specified file path.

loadStream

Loads a video stream from the specified URL.

openDevice

Controls opening the associated device.

pause

Pauses the playback of the loaded video file or stream.

play

Starts or resumes playback of the loaded video file or stream.

sendCommand

(C++/dotnet): Issues a command to the device.

sendCommandBoolean

(C++/dotnet): Issues a command with a boolean as result to the device.

sendModelCommand

(C++/dotnet): Dispatches a command to the device model.

setParameter

Sets a device parameter’s value.

setParameterValueInt

Assigns an integer value to a device parameter.

startPreview

Starts the preview mode, optionally taking a string parameter for configuration.

stop

Stops the playback of the loaded video file or stream.

stopPreview

Stops the preview mode.

takeSnapshot

Triggers a snapshot capture process.

unload

Unloads the currently loaded video file or stream.

waitForPreview

Blocks until a new frame is available or a timeout occurs.