Class BufferFormat
- java.lang.Object
-
- uk.co.caprica.vlcj.player.embedded.videosurface.callback.BufferFormat
-
- Direct Known Subclasses:
RV32BufferFormat
public class BufferFormat extends Object
Specifies the formats used by theCallbackVideoSurface
.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
Constructors Constructor Description BufferFormat(String chroma, int width, int height, int[] pitches, int[] lines)
Constructs a new BufferFormat instance with the given parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getChroma()
Get the pixel format.int
getHeight()
Get the height.int[]
getLines()
Get the number of lines for each plane.int[]
getPitches()
Get the pitches for each plane.int
getPlaneCount()
Get the number of planes in the buffer.int
getWidth()
Get the width.String
toString()
-
-
-
Constructor Detail
-
BufferFormat
public BufferFormat(String chroma, int width, int height, int[] pitches, int[] lines)
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 Detail
-
getChroma
public final String 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
-
-