Package org.jitsi.impl.neomedia.format
Class ParameterizedVideoFormat
- java.lang.Object
-
- javax.media.Format
-
- javax.media.format.VideoFormat
-
- org.jitsi.impl.neomedia.format.ParameterizedVideoFormat
-
- All Implemented Interfaces:
Serializable,Cloneable
public class ParameterizedVideoFormat extends javax.media.format.VideoFormatImplements a VideoFormat with format parameters (likeVideoMediaFormatImpl) (some of) which (could) distinguish payload types.- Author:
- Lyubomir Marinov
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ParameterizedVideoFormat(String encoding, Dimension size, int maxDataLength, Class<?> dataType, float frameRate, Map<String,String> fmtps)Constructs a new ParametizedVideoFormat.ParameterizedVideoFormat(String encoding, String... fmtps)Initializes a new ParameterizedVideoFormat with a specific encoding and a specific set of format parameters.ParameterizedVideoFormat(String encoding, Map<String,String> fmtps)Initializes a new ParameterizedVideoFormat with a specific encoding and a specific set of format parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectclone()Initializes a new ParameterizedVideoFormat instance which has the same properties as this instance.protected voidcopy(javax.media.Format f)Copies the properties of the specified Format into this instance.booleanequals(Object obj)Determines whether a specific Object represents a value that is equal to the value represented by this instance.booleanformatParametersMatch(javax.media.Format format)Returns whether or not the format parameters match.StringgetFormatParameter(String name)Returns the format parameters value for the specified name.Map<String,String>getFormatParameters()Returns the format parameters Map.javax.media.Formatintersects(javax.media.Format format)Finds the attributes shared by two matching Formats.booleanmatches(javax.media.Format format)Determines whether a specific format matches this instance i.e.static <T> Map<T,T>toMap(T... entries)Initializes a new Map from an array in which the key and the value of an association are expressed as consecutive elements.StringtoString()-
Methods inherited from class javax.media.format.VideoFormat
getFrameRate, getMaxDataLength, getSize, relax
-
-
-
-
Constructor Detail
-
ParameterizedVideoFormat
public ParameterizedVideoFormat(String encoding, Dimension size, int maxDataLength, Class<?> dataType, float frameRate, Map<String,String> fmtps)
Constructs a new ParametizedVideoFormat.- Parameters:
encoding- encodingsize- video sizemaxDataLength- maximum data lengthdataType- data typeframeRate- frame ratefmtps- format parameters
-
ParameterizedVideoFormat
public ParameterizedVideoFormat(String encoding, Map<String,String> fmtps)
Initializes a new ParameterizedVideoFormat with a specific encoding and a specific set of format parameters.- Parameters:
encoding- the encoding of the new instancefmtps- the format parameters of the new instance
-
ParameterizedVideoFormat
public ParameterizedVideoFormat(String encoding, String... fmtps)
Initializes a new ParameterizedVideoFormat with a specific encoding and a specific set of format parameters.- Parameters:
encoding- the encoding of the new instancefmtps- the format parameters of the new instance in the form of an array of Strings in which the key and the value of an association are expressed as consecutive elements.
-
-
Method Detail
-
clone
public Object clone()
Initializes a new ParameterizedVideoFormat instance which has the same properties as this instance.- Overrides:
clonein classjavax.media.format.VideoFormat- Returns:
- a new ParameterizedVideoFormat instance which has the same properties as this instance
-
copy
protected void copy(javax.media.Format f)
Copies the properties of the specified Format into this instance.- Overrides:
copyin classjavax.media.format.VideoFormat- Parameters:
f- the Format the properties of which are to be copied into this instance
-
equals
public boolean equals(Object obj)
Determines whether a specific Object represents a value that is equal to the value represented by this instance.- Overrides:
equalsin classjavax.media.format.VideoFormat- Parameters:
obj- the Object to be determined whether it represents a value that is equal to the value represented by this instance- Returns:
- true if the specified obj represents a value that is equal to the value represented by this instance; otherwise, false
-
formatParametersMatch
public boolean formatParametersMatch(javax.media.Format format)
Returns whether or not the format parameters match.- Parameters:
format- format to test- Returns:
- true if the format parameters match.
-
getFormatParameter
public String getFormatParameter(String name)
Returns the format parameters value for the specified name.- Parameters:
name- format parameters name- Returns:
- value for the specified format parameters name
-
getFormatParameters
public Map<String,String> getFormatParameters()
Returns the format parameters Map.- Returns:
- the format parameters Map.
-
intersects
public javax.media.Format intersects(javax.media.Format format)
Finds the attributes shared by two matching Formats. If the specified Format does not match this one, the result is undefined.- Overrides:
intersectsin classjavax.media.format.VideoFormat- Parameters:
format- the matching Format to intersect with this one- Returns:
- a Format with its attributes set to the attributes common to this instance and the specified format
-
matches
public boolean matches(javax.media.Format format)
Determines whether a specific format matches this instance i.e. whether their attributes match according to the definition of "match" given byFormat.matches(Format).- Overrides:
matchesin classjavax.media.format.VideoFormat- Parameters:
format- the Format to compare to this instance- Returns:
- true if the specified format matches this one; otherwise, false
-
toMap
public static <T> Map<T,T> toMap(T... entries)
Initializes a new Map from an array in which the key and the value of an association are expressed as consecutive elements.- Type Parameters:
T- the very type of the keys and the values to be associated in the new Map- Parameters:
entries- the associations to be created in the new Map where the key and value of an association are expressed as consecutive elements- Returns:
- a new Map with the associations specified by entries
-
toString
public String toString()
- Overrides:
toStringin classjavax.media.format.VideoFormat
-
-