FrameSource Class
- java.
lang. Object - com.
azure. ai. vision. common. FrameSource
- com.
Implements
public final class FrameSource
implements java.lang.AutoCloseable
FrameSource class Represents a source of image frame data, used as input to or output from Vision AI operations. Note: close() must be called in order to release underlying resources held by the object.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| void |
close()
Explicitly frees any external resource attached to the object Note: close() must be called in order to release underlying resources held by the object. |
| void |
closeWriter()
Closes the frame source for writing. |
|
static
Frame |
fromFormat(FrameFormat format)
Initializes a new instance of the Frame |
|
static
Frame |
fromFormat(FrameFormat format, Consumer<FrameSource> frameSourceConsumer)
Initializes a new instance of the Frame |
|
Frame |
getFormat()
Get frame format from the Frame |
| long |
getHandle()
Gets the internal native handle. |
|
Frame |
getWriter()
Gets a new instance of Frame |
Methods inherited from java.lang.Object
Method Details
close
public void close()
Explicitly frees any external resource attached to the object Note: close() must be called in order to release underlying resources held by the object.
closeWriter
public void closeWriter()
Closes the frame source for writing.
fromFormat
public static FrameSource fromFormat(FrameFormat format)
Initializes a new instance of the FrameSource class.
Parameters:
Returns:
fromFormat
public static FrameSource fromFormat(FrameFormat format, Consumer<FrameSource> frameSourceConsumer)
Initializes a new instance of the FrameSource class.
Parameters:
Returns:
getFormat
public FrameFormat getFormat()
Get frame format from the FrameSource
Returns:
getHandle
public long getHandle()
Gets the internal native handle.
Returns:
getWriter
public FrameWriter getWriter()
Gets a new instance of FrameWriter that can be used to write (submit) frame data to this FrameSource instance.
Returns: