Module uk.co.caprica.vlcj
Class BufferFormat
java.lang.Object
uk.co.caprica.vlcj.player.embedded.videosurface.callback.BufferFormat
- Direct Known Subclasses:
RV32BufferFormat
Specifies the formats used by the
CallbackVideoSurface.
The buffer will contain data of the given width and height in the format specified by the chroma parameter. A buffer can consist of multiple planes depending on the format of the data. For each plane the pitch and height in lines must be supplied.
For example, RV32 format has only one plane. Its pitch is width * 4, and its number of lines is the same as the height.
-
Constructor Summary
ConstructorsConstructorDescriptionBufferFormat(String chroma, int width, int height, int[] pitches, int[] lines) Constructs a new BufferFormat instance with the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionfinal StringGet the pixel format.final intGet the height.final int[]getLines()Get the number of lines for each plane.final int[]Get the pitches for each plane.final intGet the number of planes in the buffer.final intgetWidth()Get the width.final StringtoString()
-
Constructor Details
-
BufferFormat
Constructs a new BufferFormat instance with the given parameters.- Parameters:
chroma- a VLC buffer type, must be exactly 4 characters and cannot contain non-ASCII characterswidth- the width, must be > 0height- the height, must be > 0pitches- the pitch of each plane that this buffer consists of (usually a multiple of width)lines- the number of lines of each plane that this buffer consists of (usually same as height)- Throws:
IllegalArgumentException- if any parameter is invalid
-
-
Method Details
-
getChroma
Get the pixel format.- Returns:
- pixel format
-
getWidth
public final int getWidth()Get the width.- Returns:
- width
-
getHeight
public final int getHeight()Get the height.- Returns:
- height
-
getPitches
public final int[] getPitches()Get the pitches for each plane.- Returns:
- pitches
-
getLines
public final int[] getLines()Get the number of lines for each plane.- Returns:
- lines
-
getPlaneCount
public final int getPlaneCount()Get the number of planes in the buffer.- Returns:
- number of planes
-
toString
-