H263Formatpublic class H263Format extends VideoFormat Describes
H.263 compressed video data. |
Fields Summary |
---|
private static String | ENCODINGthe video encoding string | protected int | advancedPredictionIndicates if advanced prediction is used.
Can take values NOT_SPECIFIED, TRUE, or FALSE. | protected int | arithmeticCodingIndicates if arithmetic coding is used.
Can take values NOT_SPECIFIED, TRUE, or FALSE. | protected int | errorCompensationIndicates if error compensation is used.
Can take values NOT_SPECIFIED, TRUE, or FALSE. | protected int | hrDBThe size of Hypothetical Reference decoder buffer. | protected int | pbFramesIndicates if PB frames mode is used in this bitstream.
Can take values NOT_SPECIFIED, TRUE, or FALSE. | protected int | unrestrictedVectorIndicates if unrestricted motion estimation is used.
Can take values NOT_SPECIFIED, TRUE, or FALSE. |
Constructors Summary |
---|
public H263Format()Constructs an H263Format object with default attributes.
super(ENCODING);
| public H263Format(Dimension size, int maxDataLength, Class dataType, float frameRate, int advancedPrediction, int arithmeticCoding, int errorCompensation, int hrDB, int pbFrames, int unrestrictedVector)Constructs an H263Format object with the specified attributes.
super(ENCODING, size, maxDataLength, dataType, frameRate);
this.advancedPrediction = advancedPrediction;
this.arithmeticCoding = arithmeticCoding;
this.errorCompensation = errorCompensation;
this.hrDB = hrDB;
this.pbFrames = pbFrames;
this.unrestrictedVector = unrestrictedVector;
|
Methods Summary |
---|
public java.lang.Object | clone()Creates a clone of this H263Format .
H263Format f = new H263Format();
f.copy(this);
return f;
| protected void | copy(javax.media.Format f)Copies the attributes from the specified Format into
this H263Format .
super.copy(f);
H263Format other = (H263Format) f;
advancedPrediction = other.advancedPrediction;
arithmeticCoding = other.arithmeticCoding;
errorCompensation = other.errorCompensation;
hrDB = other.hrDB;
pbFrames = other.pbFrames;
unrestrictedVector = other.unrestrictedVector;
| public boolean | equals(java.lang.Object format)Compares the specified Format with this H261Format .
Returns true only if the specified Format
is a H261Format object and all of
its attributes are identical to
the attributes in this H261Format .
if (format instanceof H263Format) {
H263Format other = (H263Format) format;
return super.equals(format) &&
advancedPrediction == other.advancedPrediction &&
arithmeticCoding == other.arithmeticCoding &&
errorCompensation == other.errorCompensation &&
hrDB == other.hrDB &&
pbFrames == other.pbFrames &&
unrestrictedVector == other.unrestrictedVector;
}
return false;
| public int | getAdvancedPrediction()Gets the advanced prediction setting for this Format .
return advancedPrediction;
| public int | getArithmeticCoding()Gets the arithmetic coding setting for this Format .
return arithmeticCoding;
| public int | getErrorCompensation()Gets the error compensation setting for this Format .
return errorCompensation;
| public int | getHrDB()Gets the size of Hypothetical Reference decoder buffer.
return hrDB;
| public int | getPBFrames()Gets the PB frames setting for this Format .
return pbFrames;
| public int | getUnrestrictedVector()Gets the unrestricted motion vector setting for this Format .
return unrestrictedVector;
| public javax.media.Format | intersects(javax.media.Format format)Finds the attributes shared by two matching Format objects.
If the specified Format does not match this one, the result
is undefined.
Format fmt;
if ((fmt = super.intersects(format)) == null)
return null;
if (!(format instanceof H263Format))
return fmt;
H263Format other = (H263Format)format;
H263Format res = (H263Format)fmt;
res.advancedPrediction = (advancedPrediction != NOT_SPECIFIED ?
advancedPrediction : other.advancedPrediction);
res.arithmeticCoding = (arithmeticCoding != NOT_SPECIFIED ?
arithmeticCoding : other.arithmeticCoding);
res.errorCompensation = (errorCompensation != NOT_SPECIFIED ?
errorCompensation : other.errorCompensation);
res.hrDB = (hrDB != NOT_SPECIFIED ?
hrDB : other.hrDB);
res.pbFrames = (pbFrames != NOT_SPECIFIED ?
pbFrames : other.pbFrames);
res.unrestrictedVector = (unrestrictedVector != NOT_SPECIFIED ?
unrestrictedVector : other.unrestrictedVector);
return res;
| public boolean | matches(javax.media.Format format)Checks whether or not the specified Format matches
this H261Format .
Matches only compares the attributes that are defined in the specified
Format ,
unspecified attributes are ignored.
The two Format objects do not have to be of the same class
to match. For example, if "A" are "B" are being compared, a
match is possible if "A" is derived from "B"
or "B" is derived from "A". (The compared attributes must still match,
or matches fails.)
if (!super.matches(format))
return false;
if (!(format instanceof H263Format))
return true;
H263Format other = (H263Format) format;
return
(advancedPrediction == NOT_SPECIFIED || other.advancedPrediction == NOT_SPECIFIED ||
advancedPrediction == other.advancedPrediction) &&
(arithmeticCoding == NOT_SPECIFIED || other.arithmeticCoding == NOT_SPECIFIED ||
arithmeticCoding == other.arithmeticCoding) &&
(errorCompensation == NOT_SPECIFIED || other.errorCompensation == NOT_SPECIFIED ||
errorCompensation == other.errorCompensation) &&
(hrDB == NOT_SPECIFIED || other.hrDB == NOT_SPECIFIED ||
hrDB == other.hrDB) &&
(pbFrames == NOT_SPECIFIED || other.pbFrames == NOT_SPECIFIED ||
pbFrames == other.pbFrames) &&
(unrestrictedVector == NOT_SPECIFIED || other.unrestrictedVector == NOT_SPECIFIED ||
unrestrictedVector == other.unrestrictedVector);
| public java.lang.String | toString()Gets a string representation of the attributes of this
H263Format .
For example: "H.263, 352x240, ...".
return "H.263 video format";
|
|