Package limn.video
Enum Class VideoFrame.Kind
- All Implemented Interfaces:
Serializable,Comparable<VideoFrame.Kind>,Constable
- Enclosing class:
VideoFrame
Which of the two shapes a picture has: samples in memory, or a handle to a device allocation.
The constants beyond PLANAR name a family of handle and not a type. The
toolkit depends on nothing and cannot see a CVPixelBufferRef, an
ID3D11Texture2D* or a dma-buf descriptor; what it carries is a long whose
meaning is this enum, so that a backend can bind the ones it knows how to bind and
refuse the rest by name rather than binding a handle it has misread.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA macOSIOSurfaceRef, which is what a VideoToolbox decode produces.Samples a consumer can read. -
Method Summary
Modifier and TypeMethodDescriptionstatic VideoFrame.KindReturns the enum constant of this class with the specified name.static VideoFrame.Kind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PLANAR
Samples a consumer can read.VideoFrame.plane(int)answers andVideoFrame.handle()throws. -
IO_SURFACE
A macOSIOSurfaceRef, which is what a VideoToolbox decode produces. Its planes live in memory the decoder's pool owns, in a layout the CPU may address only under a lock; the reason to carry it is that a GL context can bind it as a texture without a copy, and the reason it is not planar is that everything above cannot.The handle is valid exactly while the frame is held, and no longer:
VideoFrame.release()hands that buffer back to the decoder's pool, which will refill it.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-