OpenCV for Unity 3.0.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/5.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.Extensions.SourceToMat.IMatSourceReinitializable Interface Reference

Initialization and re-initialization with playback state restoration for a IMatSource implementation. More...

Public Member Functions

PlaybackRestoreMode CapturePlaybackRestoreMode ()
 Captures the current playback state as a PlaybackRestoreMode for re-initialization.
 
Task InitializeAsync (PlaybackRestoreMode playbackRestoreMode, CancellationToken cancellationToken=default)
 Initializes the source asynchronously and restores the requested playback state before IMatSourceEvents.OnInitialized is raised.
 
Task ReinitializeAsync (PlaybackRestoreMode playbackRestoreMode, CancellationToken cancellationToken=default)
 Releases the source when initialized, then initializes again with the requested playback restore mode.
 

Detailed Description

Initialization and re-initialization with playback state restoration for a IMatSource implementation.

Not part of IMatSource. Implemented by MatSourceBase. Hosts that release and re-initialize to apply source-swap changes (for example a new path or texture) while restoring playback state consume this interface on the concrete source.

End users should call IMatSource.InitializeAsync(System.Threading.CancellationToken) and then IMatSource.PlayAsync(System.Threading.CancellationToken). Mode-aware initialization is intended for those source-swap re-initialization paths by advanced hosts.

Member Function Documentation

◆ CapturePlaybackRestoreMode()

PlaybackRestoreMode OpenCVForUnity.Extensions.SourceToMat.IMatSourceReinitializable.CapturePlaybackRestoreMode ( )

Captures the current playback state as a PlaybackRestoreMode for re-initialization.

Returns
PlaybackRestoreMode.Playing when playing, PlaybackRestoreMode.Paused when paused, otherwise PlaybackRestoreMode.Ready.

Implemented in OpenCVForUnity.Extensions.SourceToMat.MatSourceBase.

◆ InitializeAsync()

Task OpenCVForUnity.Extensions.SourceToMat.IMatSourceReinitializable.InitializeAsync ( PlaybackRestoreMode playbackRestoreMode,
CancellationToken cancellationToken = default )

Initializes the source asynchronously and restores the requested playback state before IMatSourceEvents.OnInitialized is raised.

Parameters
playbackRestoreModePlayback state to apply after the grabber is ready.
cancellationTokenA token used to cancel the operation.
Returns
A task that completes when initialization finishes.

Implemented in OpenCVForUnity.Extensions.SourceToMat.MatSourceBase.

◆ ReinitializeAsync()

Task OpenCVForUnity.Extensions.SourceToMat.IMatSourceReinitializable.ReinitializeAsync ( PlaybackRestoreMode playbackRestoreMode,
CancellationToken cancellationToken = default )

Releases the source when initialized, then initializes again with the requested playback restore mode.

Parameters
playbackRestoreModePlayback state to apply after the grabber is ready.
cancellationTokenA token used to cancel the operation.
Returns
A task that completes when re-initialization finishes.

Implemented in OpenCVForUnity.Extensions.SourceToMat.MatSourceBase.


The documentation for this interface was generated from the following file: