fm.liveswitch.EncodingInfo Class Reference

Encoding information. More...

Public Member Functions

 EncodingInfo ()
 
int getBitrate ()
 Gets the bitrate, in kbps. More...
 
boolean getDeactivated ()
 Gets whether this encoding is deactivated. More...
 
double getFrameRate ()
 Gets the frame-rate, in fps. More...
 
int getHeight ()
 Gets the height. More...
 
boolean getIsEmpty ()
 Gets whether this encoding is empty. More...
 
String getRtpStreamId ()
 Gets the RTP stream identifier. More...
 
double getScale ()
 Gets the target scale. More...
 
int getScaledHeight ()
 Gets the scaled height. More...
 
fm.liveswitch.Size getScaledSize ()
 Gets the scaled size. More...
 
int getScaledWidth ()
 Gets the scaled width. More...
 
fm.liveswitch.Size getSize ()
 Gets the size. More...
 
long getSynchronizationSource ()
 Gets the synchronization source. More...
 
int getWidth ()
 Gets the width. More...
 
boolean isEquivalent (fm.liveswitch.EncodingInfo encoding)
 Determines whether the specified encoding is equivalent. More...
 
boolean isEquivalent (fm.liveswitch.EncodingInfo encoding, boolean restrictionsOnly)
 Determines whether the specified encoding is equivalent. More...
 
void setBitrate (int value)
 Sets the bitrate, in kbps. More...
 
void setDeactivated (boolean value)
 Sets whether this encoding is deactivated. More...
 
void setFrameRate (double value)
 Sets the frame-rate, in fps. More...
 
void setRtpStreamId (String value)
 Sets the RTP stream identifier. More...
 
void setScale (double value)
 Sets the target scale. More...
 
void setSize (fm.liveswitch.Size value)
 Sets the size. More...
 
void setSynchronizationSource (long value)
 Sets the synchronization source. More...
 
String toJson ()
 Serializes this instance to JSON. More...
 
fm.liveswitch.sdp.rtp.RidAttribute toSdpRidAttribute (String direction)
 Converts this instance into an SDP RID attribute. More...
 
fm.liveswitch.sdp.rtp.RidAttribute toSdpRidAttribute (String direction, boolean includeRestrictions)
 Converts this instance into an SDP RID attribute. More...
 
String toString ()
 Returns a string that represents this instance. More...
 
- Public Member Functions inherited from fm.liveswitch.Info
String getId ()
 Gets the identifier. More...
 
void setId (String value)
 Sets the identifier. More...
 

Static Public Member Functions

static fm.liveswitch.EncodingInfo fromJson (String encodingInfoJson)
 Deserializes an instance from JSON. More...
 
static fm.liveswitch.EncodingInfo[] fromJsonArray (String encodingInfosJson)
 Deserializes an array from JSON. More...
 
static fm.liveswitch.EncodingInfo fromSdpRidAttribute (fm.liveswitch.sdp.rtp.RidAttribute ridAttribute)
 Converts an SDP RID attribute into an instance. More...
 
static boolean isEquivalent (fm.liveswitch.EncodingInfo encoding1, fm.liveswitch.EncodingInfo encoding2)
 Determines whether the two encodings are equivalent. More...
 
static boolean isEquivalent (fm.liveswitch.EncodingInfo encoding1, fm.liveswitch.EncodingInfo encoding2, boolean restrictionsOnly)
 Determines whether the two encodings are equivalent. More...
 
static fm.liveswitch.EncodingInfo max (fm.liveswitch.EncodingInfo encoding1, fm.liveswitch.EncodingInfo encoding2)
 Returns a new encoding with each value being the maximum of two input encodings. More...
 
static fm.liveswitch.EncodingInfo min (fm.liveswitch.EncodingInfo encoding1, fm.liveswitch.EncodingInfo encoding2)
 Returns a new encoding with each value being the minimum of two input encodings. More...
 
static String toJson (fm.liveswitch.EncodingInfo encodingInfo)
 Serializes an instance to JSON. More...
 
static String toJsonArray (fm.liveswitch.EncodingInfo[] encodingInfos)
 Serializes an array to JSON. More...
 
static fm.liveswitch.sdp.rtp.RidAttribute toSdpRidAttribute (fm.liveswitch.EncodingInfo encoding, String direction)
 Converts an instance into an SDP RID attribute. More...
 
static fm.liveswitch.sdp.rtp.RidAttribute toSdpRidAttribute (fm.liveswitch.EncodingInfo encoding, String direction, boolean includeRestrictions)
 Converts an instance into an SDP RID attribute. More...
 
- Static Public Member Functions inherited from fm.liveswitch.Info
static< T extends fm.liveswitch.IEquivalent< T > T[] processArray (T[] newValues, T[] oldValues)
 Processes an array for an info. More...
 
static fm.liveswitch.NullableBoolean processBoolean (boolean newValue, boolean oldValue)
 Processes a boolean for an info. More...
 
static boolean[] processBooleanArray (boolean[] newValues, boolean[] oldValues)
 Processes a boolean array for an info. More...
 
static fm.liveswitch.NullableDouble processDouble (double newValue, double oldValue)
 Processes a double for an info. More...
 
static fm.liveswitch.NullableFloat processFloat (float newValue, float oldValue)
 Processes a float for an info. More...
 
static float[] processFloatArray (float[] newValues, float[] oldValues)
 Processes a float array for an info. More...
 
static double[] processFloatArray (double[] newValues, double[] oldValues)
 Processes a double array for an info. More...
 
static fm.liveswitch.NullableInteger processInteger (int newValue, int oldValue)
 Processes an integer for an info. More...
 
static int[] processIntegerArray (int[] newValues, int[] oldValues)
 Processes a integer array for an info. More...
 
static fm.liveswitch.NullableLong processLong (long newValue, long oldValue)
 Processes a long for an info. More...
 
static long[] processLongArray (long[] newValues, long[] oldValues)
 Processes a long array for an info. More...
 
static< T extends Object &fm.liveswitch.IEquivalent< T > T processObject (T newValue, T oldValue)
 Processes an object for an info. More...
 
static fm.liveswitch.NullableShort processShort (short newValue, short oldValue)
 Processes a short for an info. More...
 
static short[] processShortArray (short[] newValues, short[] oldValues)
 Processes a short array for an info. More...
 
static String processString (String newValue, String oldValue)
 Processes a string for an info. More...
 

Protected Member Functions

void deserializeProperties (String key, String valueJson)
 Deserializes the properties. More...
 
void serializeProperties (java.util.HashMap< String, String > jsonObject)
 Serializes the properties. More...
 
- Protected Member Functions inherited from fm.liveswitch.Info
 Info ()
 

Detailed Description

Encoding information.

Constructor & Destructor Documentation

◆ EncodingInfo()

fm.liveswitch.EncodingInfo.EncodingInfo ( )

Member Function Documentation

◆ deserializeProperties()

void fm.liveswitch.EncodingInfo.deserializeProperties ( String  key,
String  valueJson 
)
protected

Deserializes the properties.

Parameters
keyThe key.
valueJsonThe value in JSON format.

Reimplemented from fm.liveswitch.Info.

◆ fromJson()

static fm.liveswitch.EncodingInfo fm.liveswitch.EncodingInfo.fromJson ( String  encodingInfoJson)
static

Deserializes an instance from JSON.

Parameters
encodingInfoJsonThe serialized JSON.
Returns
The deserialized instance.

◆ fromJsonArray()

static fm.liveswitch.EncodingInfo [] fm.liveswitch.EncodingInfo.fromJsonArray ( String  encodingInfosJson)
static

Deserializes an array from JSON.

Parameters
encodingInfosJsonThe serialized JSON.
Returns
The deserialized array.

◆ fromSdpRidAttribute()

static fm.liveswitch.EncodingInfo fm.liveswitch.EncodingInfo.fromSdpRidAttribute ( fm.liveswitch.sdp.rtp.RidAttribute  ridAttribute)
static

Converts an SDP RID attribute into an instance.

Parameters
ridAttributeThe SDP RID attribute.

◆ getBitrate()

int fm.liveswitch.EncodingInfo.getBitrate ( )

Gets the bitrate, in kbps.

◆ getDeactivated()

boolean fm.liveswitch.EncodingInfo.getDeactivated ( )

Gets whether this encoding is deactivated.

◆ getFrameRate()

double fm.liveswitch.EncodingInfo.getFrameRate ( )

Gets the frame-rate, in fps.

◆ getHeight()

int fm.liveswitch.EncodingInfo.getHeight ( )

Gets the height.

◆ getIsEmpty()

boolean fm.liveswitch.EncodingInfo.getIsEmpty ( )

Gets whether this encoding is empty.

◆ getRtpStreamId()

String fm.liveswitch.EncodingInfo.getRtpStreamId ( )

Gets the RTP stream identifier.

◆ getScale()

double fm.liveswitch.EncodingInfo.getScale ( )

Gets the target scale.

◆ getScaledHeight()

int fm.liveswitch.EncodingInfo.getScaledHeight ( )

Gets the scaled height.

◆ getScaledSize()

fm.liveswitch.Size fm.liveswitch.EncodingInfo.getScaledSize ( )

Gets the scaled size.

◆ getScaledWidth()

int fm.liveswitch.EncodingInfo.getScaledWidth ( )

Gets the scaled width.

◆ getSize()

fm.liveswitch.Size fm.liveswitch.EncodingInfo.getSize ( )

Gets the size.

◆ getSynchronizationSource()

long fm.liveswitch.EncodingInfo.getSynchronizationSource ( )

Gets the synchronization source.

◆ getWidth()

int fm.liveswitch.EncodingInfo.getWidth ( )

Gets the width.

◆ isEquivalent() [1/4]

boolean fm.liveswitch.EncodingInfo.isEquivalent ( fm.liveswitch.EncodingInfo  encoding)

Determines whether the specified encoding is equivalent.

Parameters
encodingThe encoding.

◆ isEquivalent() [2/4]

boolean fm.liveswitch.EncodingInfo.isEquivalent ( fm.liveswitch.EncodingInfo  encoding,
boolean  restrictionsOnly 
)

Determines whether the specified encoding is equivalent.

Parameters
encodingThe encoding.
restrictionsOnlyWhether to check restrictions only.

◆ isEquivalent() [3/4]

static boolean fm.liveswitch.EncodingInfo.isEquivalent ( fm.liveswitch.EncodingInfo  encoding1,
fm.liveswitch.EncodingInfo  encoding2 
)
static

Determines whether the two encodings are equivalent.

Parameters
encoding1The first encoding.
encoding2The second encoding.

◆ isEquivalent() [4/4]

static boolean fm.liveswitch.EncodingInfo.isEquivalent ( fm.liveswitch.EncodingInfo  encoding1,
fm.liveswitch.EncodingInfo  encoding2,
boolean  restrictionsOnly 
)
static

Determines whether the two encodings are equivalent.

Parameters
encoding1The first encoding.
encoding2The second encoding.
restrictionsOnlyWhether to check restrictions only.

◆ max()

static fm.liveswitch.EncodingInfo fm.liveswitch.EncodingInfo.max ( fm.liveswitch.EncodingInfo  encoding1,
fm.liveswitch.EncodingInfo  encoding2 
)
static

Returns a new encoding with each value being the maximum of two input encodings.

Parameters
encoding1The first encoding.
encoding2The second encoding.
Returns
A new encoding.

◆ min()

static fm.liveswitch.EncodingInfo fm.liveswitch.EncodingInfo.min ( fm.liveswitch.EncodingInfo  encoding1,
fm.liveswitch.EncodingInfo  encoding2 
)
static

Returns a new encoding with each value being the minimum of two input encodings.

Parameters
encoding1The first encoding.
encoding2The second encoding.
Returns
A new encoding.

◆ serializeProperties()

void fm.liveswitch.EncodingInfo.serializeProperties ( java.util.HashMap< String, String >  jsonObject)
protected

Serializes the properties.

Parameters
jsonObjectThe JSON object.

Reimplemented from fm.liveswitch.Info.

◆ setBitrate()

void fm.liveswitch.EncodingInfo.setBitrate ( int  value)

Sets the bitrate, in kbps.

◆ setDeactivated()

void fm.liveswitch.EncodingInfo.setDeactivated ( boolean  value)

Sets whether this encoding is deactivated.

◆ setFrameRate()

void fm.liveswitch.EncodingInfo.setFrameRate ( double  value)

Sets the frame-rate, in fps.

◆ setRtpStreamId()

void fm.liveswitch.EncodingInfo.setRtpStreamId ( String  value)

Sets the RTP stream identifier.

◆ setScale()

void fm.liveswitch.EncodingInfo.setScale ( double  value)

Sets the target scale.

◆ setSize()

void fm.liveswitch.EncodingInfo.setSize ( fm.liveswitch.Size  value)

Sets the size.

◆ setSynchronizationSource()

void fm.liveswitch.EncodingInfo.setSynchronizationSource ( long  value)

Sets the synchronization source.

◆ toJson() [1/2]

String fm.liveswitch.EncodingInfo.toJson ( )

Serializes this instance to JSON.

◆ toJson() [2/2]

static String fm.liveswitch.EncodingInfo.toJson ( fm.liveswitch.EncodingInfo  encodingInfo)
static

Serializes an instance to JSON.

Parameters
encodingInfoThe instance to serialize.
Returns
The serialized JSON.

◆ toJsonArray()

static String fm.liveswitch.EncodingInfo.toJsonArray ( fm.liveswitch.EncodingInfo[]  encodingInfos)
static

Serializes an array to JSON.

Parameters
encodingInfosThe array to serialize.
Returns
The serialized JSON.

◆ toSdpRidAttribute() [1/4]

static fm.liveswitch.sdp.rtp.RidAttribute fm.liveswitch.EncodingInfo.toSdpRidAttribute ( fm.liveswitch.EncodingInfo  encoding,
String  direction 
)
static

Converts an instance into an SDP RID attribute.

Parameters
encodingThe encoding.
directionThe direction.

◆ toSdpRidAttribute() [2/4]

static fm.liveswitch.sdp.rtp.RidAttribute fm.liveswitch.EncodingInfo.toSdpRidAttribute ( fm.liveswitch.EncodingInfo  encoding,
String  direction,
boolean  includeRestrictions 
)
static

Converts an instance into an SDP RID attribute.

Parameters
encodingThe encoding.
directionThe direction.
includeRestrictionsWhether to include restrictions.

◆ toSdpRidAttribute() [3/4]

fm.liveswitch.sdp.rtp.RidAttribute fm.liveswitch.EncodingInfo.toSdpRidAttribute ( String  direction)

Converts this instance into an SDP RID attribute.

Parameters
directionThe direction.

◆ toSdpRidAttribute() [4/4]

fm.liveswitch.sdp.rtp.RidAttribute fm.liveswitch.EncodingInfo.toSdpRidAttribute ( String  direction,
boolean  includeRestrictions 
)

Converts this instance into an SDP RID attribute.

Parameters
directionThe direction.
includeRestrictionsWhether to include restrictions.

◆ toString()

String fm.liveswitch.EncodingInfo.toString ( )

Returns a string that represents this instance.

Returns
A string that represents this instance.