CVB.Net 14.0
Recorder Class Reference

Movie2 recorder for writing video files to disk. More...

Inherits INativeHandle.

Public Member Functions

 Recorder (string path, Size2D size, RecorderPixelFormat pixelFormat, RecordingSettings settings)
 Creates a recorder object writing video streams with the given size and pixelFormat . More...
 
 Recorder (string path, Size2D size, RecorderPixelFormat pixelFormat)
 Opens a recorder object for writing a video stream in path with the given size and pixelFormat and default RecordingSettings. Uses the DirectShowEngine per default. More...
 
void Dispose ()
 IDisposable implementation. More...
 
void Close ()
 Closes the stream. More...
 
void Write (Image image)
 Writes the given image into the stream. More...
 
void Write (Image image, string metadata)
 Writes the given image with the given metadata into the stream. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 IDispose helper function. More...
 

Properties

RecordingEngineType EngineType [get]
 Recording engine this recorder uses.
 
IntPtr Handle [get]
 Gets the native handle of the Movie2 recorder object.
 
bool IsDisposed [get]
 Gets whether this object has been disposed.
 
- Properties inherited from INativeHandle
IntPtr Handle [get]
 The native handle of the object.
 
bool IsDisposed [get]
 Possibility to check whether the object has already been disposed of.
 

Events

NativeHandleEventDelegate ObjectDisposing
 Event that is fired when this object is being disposed.
 
- Events inherited from INativeHandle
NativeHandleEventDelegate ObjectDisposing
 Raised when this object is about to be disposed via the IDisposable.Dispose method.
More...
 

Detailed Description

Movie2 recorder for writing video files to disk.

Constructor & Destructor Documentation

◆ Recorder() [1/2]

Recorder ( string  path,
Size2D  size,
RecorderPixelFormat  pixelFormat,
RecordingSettings  settings 
)

Creates a recorder object writing video streams with the given size and pixelFormat .

The stream is not opened and can be configured.

Parameters
pathPath to write avi container to.
sizeSize of the video frames in pixels.
pixelFormatDefines whether mono or color images are written.
settingsSettings for initializing the recorder.

◆ Recorder() [2/2]

Recorder ( string  path,
Size2D  size,
RecorderPixelFormat  pixelFormat 
)

Opens a recorder object for writing a video stream in path with the given size and pixelFormat and default RecordingSettings. Uses the DirectShowEngine per default.

Parameters
pathPath to write avi container to.
sizeSize of the video frames in pixels.
pixelFormatDefines whether mono or color images are written.

Member Function Documentation

◆ Close()

void Close ( )

Closes the stream.

Alias for Dispose().

◆ Dispose() [1/2]

void Dispose ( )

IDisposable implementation.

Call this method to release the resources allocated by this object immediately. Remember that after calling Dispose, any subsequent access to references to this object will result in an ObjectDisposedException.

◆ Dispose() [2/2]

virtual void Dispose ( bool  disposing)
protectedvirtual

IDispose helper function.

Parameters
disposingtrue when called via IDisposable.Dispose, false when called by the finalizer.

◆ Write() [1/2]

void Write ( Image  image)

Writes the given image into the stream.

Parameters
imageImage to write into the stream.
Exceptions
ObjectDisposedExceptionRecorder has been disposed.
ArgumentNullExceptionimage is null.

◆ Write() [2/2]

void Write ( Image  image,
string  metadata 
)

Writes the given image with the given metadata into the stream.

Parameters
imageImage to write into the stream.
metadataMetadata text to write into the stream.
Exceptions
ObjectDisposedExceptionRecorder has been disposed.
ArgumentNullExceptionimage is null.