|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.helsinki.cs.ohtu.mpeg2.video.SliceHeader
public class SliceHeader
Represents the slice header.
Field Summary | |
---|---|
private boolean |
intraSlice
|
private int |
quantizerScaleCode
|
private int |
slicePictureID
|
private boolean |
slicePictureIDEnabled
|
private int |
verticalPosition
|
private boolean |
verticalPositionExtensionEnabled
|
Constructor Summary | |
---|---|
SliceHeader(int verticalPosition,
boolean verticalPositionExtensionEnabled,
int quantizerScaleCode)
Constructs a new SliceHeader instance with the specified vertical position and quantizer scale code. |
Method Summary | |
---|---|
int |
getQuantizerScaleCode()
Returns the current quantizer scale code of this slice. |
int |
getSlicePictureID()
Returns the slice picture ID. |
int |
getVerticalPosition()
Returns the vertical position of this slice. |
boolean |
isIntraSlice()
Returns whether the intra slice flag is set. |
boolean |
isSlicePictureIDEnabled()
Returns whether the slice picture ID has been set or not. |
boolean |
isVerticalPositionExtensionEnabled()
Returns a boolean indicating whether the vertical position extension is enabled or not. |
void |
setIntraSlice(boolean intraSlice)
Sets the intra slice flag. |
void |
setQuantizerScaleCode(int quantizerScaleCode)
Sets the quantizer scale code for this slice. |
void |
setSlicePictureID(int slicePictureID)
Sets the picture ID for this slice. |
void |
setVerticalPosition(int verticalPosition)
Sets the vertical position for this slice. |
void |
setVerticalPositionExtensionEnabled(boolean verticalPositionExtensionEnabled)
Sets whether the vertical position extension is enabled or not. |
void |
unsetSlicePictureID()
Unsets the picture ID. |
void |
writeTo(BitOutputStream stream)
Writes the slice header to a stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int verticalPosition
private boolean verticalPositionExtensionEnabled
private int quantizerScaleCode
private boolean intraSlice
private boolean slicePictureIDEnabled
private int slicePictureID
Constructor Detail |
---|
public SliceHeader(int verticalPosition, boolean verticalPositionExtensionEnabled, int quantizerScaleCode)
verticalPosition
- The vertical position of this slice. Without the extension
this must be in the range [1..175]. With the extension this
must be in the range [1..1024].verticalPositionExtensionEnabled
- Whether the vertical position extension is enabled or not.quantizerScaleCode
- The quantizer scale code for macroblocks in this slice.Method Detail |
---|
public void setVerticalPosition(int verticalPosition)
verticalPosition
- The vertical position of this slice. Without the extension
this must be in the range [1..175]. With the extension this
must be in the range [1..1024].public int getVerticalPosition()
public boolean isVerticalPositionExtensionEnabled()
public void setVerticalPositionExtensionEnabled(boolean verticalPositionExtensionEnabled)
verticalPositionExtensionEnabled
- Whether the vertical position extension is enabled or not.public void setQuantizerScaleCode(int quantizerScaleCode)
quantizerScaleCode
- The quantizer scale code to use.public int getQuantizerScaleCode()
public boolean isIntraSlice()
public void setIntraSlice(boolean intraSlice)
intraSlice
- Whether the intra slice flag should be set or not.public int getSlicePictureID()
public void setSlicePictureID(int slicePictureID)
slicePictureID
- The picture ID for this slice.public void unsetSlicePictureID()
public boolean isSlicePictureIDEnabled()
public void writeTo(BitOutputStream stream) throws java.io.IOException
stream
- The stream to write to.
java.io.IOException
- Exception from the stream.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |