Table of Contents

Interface IStreamReader

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

Read data stream interface. Implement this to let VideoCapture read from an arbitrary managed data source (e.g. an in-memory buffer, network stream, or any other custom stream).

public interface IStreamReader

Remarks

Mirrors cv::IStreamReader.

Methods

Read(Span<byte>)

Reads bytes from the stream into the given buffer.

long Read(Span<byte> buffer)

Parameters

buffer Span<byte>

Buffer to receive the read bytes. At most buffer.Length bytes are read.

Returns

long

Actual number of bytes read.

Seek(long, SeekOrigin)

Sets the stream position.

long Seek(long offset, SeekOrigin origin)

Parameters

offset long

Seek offset.

origin SeekOrigin

Seek origin.

Returns

long

The resulting stream position.