public class JpegRTPHeader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
HEADER_SIZE
In bytes.
|
Constructor and Description |
---|
JpegRTPHeader(byte typeSpecific,
int fragmentOffset,
byte type,
byte q,
byte width,
byte height) |
Modifier and Type | Method and Description |
---|---|
static byte[] |
createQHeader(int length,
int[] lqt,
int[] cqt)
Creates header containing Quantization tables (used when Q is set to values greater than 127).
|
static byte[] |
createRstHeader(int dri,
int f,
int l,
int count)
Creates RST header for JPEG/RTP packet.
|
boolean |
equals(java.lang.Object o) |
int |
getFragmentOffset() |
int |
getHeightInBlocks() |
int |
getHeightInPixels() |
int |
getQ() |
int |
getType() |
int |
getTypeSpecific() |
int |
getWidthInBlocks() |
int |
getWidthInPixels() |
int |
hashCode() |
static JpegRTPHeader |
parse(byte[] data,
int offset) |
byte[] |
toBytes() |
java.lang.String |
toString() |
public static final int HEADER_SIZE
public JpegRTPHeader(byte typeSpecific, int fragmentOffset, byte type, byte q, byte width, byte height)
public static JpegRTPHeader parse(byte[] data, int offset)
public byte[] toBytes()
public static byte[] createQHeader(int length, int[] lqt, int[] cqt)
length
- length for the headers (usually 128 - two 64 bytes long tables)lqt
- Luma Quantization tablecqt
- Chroma Quantization tablepublic int getWidthInPixels()
public int getHeightInPixels()
public int getWidthInBlocks()
public int getHeightInBlocks()
public int getFragmentOffset()
public int getQ()
public int getType()
public int getTypeSpecific()
public java.lang.String toString()
toString
in class java.lang.Object
public static byte[] createRstHeader(int dri, int f, int l, int count)
dri
- Restart interval - number of MCUs between restart markersf
- first bit (should be set to 1)l
- last bit (should be set to 1)count
- number of restart markers (should be set to 3FFF)public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object