FMLiveSwitchFormatInfo Class Reference

Format information. More...

Instance Methods

(int) - channelCount
 Gets the channel count if available. More...
 
(int) - clockRate
 Gets the clock rate. More...
 
(NSString *) - codecName
 Gets the name. More...
 
(NSString *) - description
 Returns a string that represents this instance. More...
 
(instancetype) - init
 Creates a new instance of a FormatInfo. More...
 
(instancetype) - initWithAudioFormat:
 Creates an instance of a FormatInfo from an AudioFormat. More...
 
(instancetype) - initWithCodecName:clockRate:
 Creates a new instance of a FormatInfo. More...
 
(instancetype) - initWithName:clockRate:channelCount:
 Creates a new instance of a FormatInfo. More...
 
(instancetype) - initWithVideoFormat:
 Creates an instance of a FormatInfo from a VideoFormat. More...
 
(bool) - isEquivalentWithInstance:
 Checks if an instance is equivalent to this one. More...
 
(bool) - isEquivalentWithName:clockRate:channelCount:
 Tests for equivalency. More...
 
(NSString *) - name
 Gets the name. More...
 
(void) - setChannelCount:
 Sets the channel count if available. More...
 
(void) - setClockRate:
 Sets the clock rate. More...
 
(void) - setCodecName:
 Sets the name. More...
 
(void) - setName:
 Sets the name. More...
 
(NSString *) - toJson
 Serializes this instance to Json. More...
 
- Instance Methods inherited from <FMLiveSwitchIEquivalent>
(bool) - isEquivalentWithInstance:
 Checks if an instance is equivalent to this one. More...
 

Class Methods

(FMLiveSwitchFormatInfo *) + formatInfo
 Creates a new instance of a FormatInfo. More...
 
(FMLiveSwitchFormatInfo *) + formatInfoWithAudioFormat:
 Creates an instance of a FormatInfo from an AudioFormat. More...
 
(FMLiveSwitchFormatInfo *) + formatInfoWithCodecName:clockRate:
 Creates a new instance of a FormatInfo. More...
 
(FMLiveSwitchFormatInfo *) + formatInfoWithName:clockRate:channelCount:
 Creates a new instance of a FormatInfo. More...
 
(FMLiveSwitchFormatInfo *) + formatInfoWithVideoFormat:
 Creates an instance of a FormatInfo from a VideoFormat. More...
 
(NSMutableArray *) + fromJsonArrayWithFormatInfosJson:
 Derializes an array of format infos from JSON. More...
 
(FMLiveSwitchFormatInfo *) + fromJsonWithFormatInfoJson:
 Deserializes Json to a FormatInfo. More...
 
(NSMutableArray *) + fromSdpMediaDescription:
 Converts the RTP map attributes in an SDP media description to an array of FormatInfo objects. More...
 
(NSString *) + toJsonArrayWithFormatInfos:
 Serializes an array of format infos to JSON. More...
 
(NSString *) + toJsonWithFormatInfo:
 Serializes an instance to Json. More...
 

Detailed Description

Format information.

Method Documentation

◆ channelCount

- (int) channelCount

Gets the channel count if available.

Unused for video codecs.

◆ clockRate

- (int) clockRate

Gets the clock rate.

◆ codecName

- (NSString*) codecName

Gets the name.

Deprecated:
Use Name instead.

◆ description

- (NSString*) description

Returns a string that represents this instance.

◆ formatInfo

+ (FMLiveSwitchFormatInfo*) formatInfo

Creates a new instance of a FormatInfo.

◆ formatInfoWithAudioFormat:

+ (FMLiveSwitchFormatInfo*) formatInfoWithAudioFormat: (FMLiveSwitchAudioFormat *)  audioFormat

Creates an instance of a FormatInfo from an AudioFormat.

Parameters
audioFormatThe audio format.

◆ formatInfoWithCodecName:clockRate:

+ (FMLiveSwitchFormatInfo*) formatInfoWithCodecName: (NSString *)  codecName
clockRate: (int)  clockRate 

Creates a new instance of a FormatInfo.

Parameters
codecNameThe codec name.
clockRateThe clock rate.

◆ formatInfoWithName:clockRate:channelCount:

+ (FMLiveSwitchFormatInfo*) formatInfoWithName: (NSString *)  name
clockRate: (int)  clockRate
channelCount: (int)  channelCount 

Creates a new instance of a FormatInfo.

Parameters
nameThe name.
clockRateThe clock rate.
channelCountThe channel count.

◆ formatInfoWithVideoFormat:

+ (FMLiveSwitchFormatInfo*) formatInfoWithVideoFormat: (FMLiveSwitchVideoFormat *)  videoFormat

Creates an instance of a FormatInfo from a VideoFormat.

Parameters
videoFormatThe video format.

◆ fromJsonArrayWithFormatInfosJson:

+ (NSMutableArray*) fromJsonArrayWithFormatInfosJson: (NSString *)  formatInfosJson

Derializes an array of format infos from JSON.

Parameters
formatInfosJsonThe format infos in JSON format.

◆ fromJsonWithFormatInfoJson:

+ (FMLiveSwitchFormatInfo*) fromJsonWithFormatInfoJson: (NSString *)  formatInfoJson

Deserializes Json to a FormatInfo.

Parameters
formatInfoJsonThe serialized Json.
Returns
The deserialized FormatInfo.

◆ fromSdpMediaDescription:

+ (NSMutableArray*) fromSdpMediaDescription: (FMLiveSwitchSdpMediaDescription *)  sdpMediaDescription

Converts the RTP map attributes in an SDP media description to an array of FormatInfo objects.

Parameters
sdpMediaDescriptionThe SDP media description.
Returns
An array of FormatInfo objects.

◆ init

- (instancetype) init

Creates a new instance of a FormatInfo.

◆ initWithAudioFormat:

- (instancetype) initWithAudioFormat: (FMLiveSwitchAudioFormat *)  audioFormat

Creates an instance of a FormatInfo from an AudioFormat.

Parameters
audioFormatThe audio format.

◆ initWithCodecName:clockRate:

- (instancetype) initWithCodecName: (NSString *)  codecName
clockRate: (int)  clockRate 

Creates a new instance of a FormatInfo.

Parameters
codecNameThe codec name.
clockRateThe clock rate.

◆ initWithName:clockRate:channelCount:

- (instancetype) initWithName: (NSString *)  name
clockRate: (int)  clockRate
channelCount: (int)  channelCount 

Creates a new instance of a FormatInfo.

Parameters
nameThe name.
clockRateThe clock rate.
channelCountThe channel count.

◆ initWithVideoFormat:

- (instancetype) initWithVideoFormat: (FMLiveSwitchVideoFormat *)  videoFormat

Creates an instance of a FormatInfo from a VideoFormat.

Parameters
videoFormatThe video format.

◆ isEquivalentWithInstance:

- (bool) isEquivalentWithInstance: (FMLiveSwitchFormatInfo *)  instance

Checks if an instance is equivalent to this one.

Parameters
instanceThe instance.

◆ isEquivalentWithName:clockRate:channelCount:

- (bool) isEquivalentWithName: (NSString *)  name
clockRate: (int)  clockRate
channelCount: (int)  channelCount 

Tests for equivalency.

Parameters
channelCountThe channel count.
clockRateThe clock rate.
nameThe format name.
Returns
true if equivalent; otherwise, false.

◆ name

- (NSString*) name

Gets the name.

◆ setChannelCount:

- (void) setChannelCount: (int)  value

Sets the channel count if available.

Unused for video codecs.

◆ setClockRate:

- (void) setClockRate: (int)  value

Sets the clock rate.

◆ setCodecName:

- (void) setCodecName: (NSString *)  value

Sets the name.

Deprecated:
Use Name instead.

◆ setName:

- (void) setName: (NSString *)  value

Sets the name.

◆ toJson

- (NSString*) toJson

Serializes this instance to Json.

◆ toJsonArrayWithFormatInfos:

+ (NSString*) toJsonArrayWithFormatInfos: (NSMutableArray *)  formatInfos

Serializes an array of format infos to JSON.

Parameters
formatInfosThe format infos.

◆ toJsonWithFormatInfo:

+ (NSString*) toJsonWithFormatInfo: (FMLiveSwitchFormatInfo *)  formatInfo

Serializes an instance to Json.

Parameters
formatInfoThe instance to serialize.
Returns
Serialized Json.