FMLiveSwitchMediaStreamBase Class Reference

Media stream base properties/methods. More...

Instance Methods

(void) - addOnLocalEncodingDisabled:
 Adds a handler that is raised when a local encoding is disabled. More...
 
(FMLiveSwitchEncodingInfo *) - addOnLocalEncodingDisabledWithBlock
 Adds a handler that is raised when a local encoding is disabled. More...
 
(void) - addOnLocalEncodingDisabledWithBlock:
 Adds a handler that is raised when a local encoding is disabled. More...
 
(void) - addOnLocalEncodingEnabled:
 Adds a handler that is raised when a local encoding is enabled. More...
 
(FMLiveSwitchEncodingInfo *) - addOnLocalEncodingEnabledWithBlock
 Adds a handler that is raised when a local encoding is enabled. More...
 
(void) - addOnLocalEncodingEnabledWithBlock:
 Adds a handler that is raised when a local encoding is enabled. More...
 
(FMLiveSwitchStreamDirection) - cachedLocalDirection
 Gets Cached Local Direction for this Media Stream. More...
 
(NSString *) - canonicalName
 Gets the canonical name. More...
 
(FMLiveSwitchError *) - changeDirectionWithNewDirection:
 Records the pending direction of this stream. More...
 
(FMLiveSwitchTransportInfo *) - controlTransportInfo
 Gets control transport info. More...
 
(FMLiveSwitchStreamDirection) - direction
 
(bool) - getCodecDisabledWithName:
 Gets whether a codec is disabled. More...
 
(FMLiveSwitchMediaStreamInfo *) - info
 Gets the media stream info. More...
 
(instancetype) - initWithType:
 Initializes a new instance of the FMLiveSwitchMediaStreamBase class. More...
 
(NSString *) - inputContent
 Gets the input content descriptor. More...
 
(bool) - inputMuted
 Gets whether the input track is muted. More...
 
(NSString *) - label
 Gets a label that identifies this class. More...
 
(int) - localBandwidth
 Gets the local bandwidth, in kbps. More...
 
(NSString *) - localCanonicalName
 Gets the local canonical end-point identifier (CNAME) used by RTCP. More...
 
(FMLiveSwitchStreamDirection) - localDirection
 Gets current direction indicated by the local description. More...
 
(bool) - localMuted
 Gets a value indicating whether the local stream is muted. More...
 
(int) - maxReceiveBitrate
 Gets the maximum bitrate that the connection receives in Kbps. More...
 
(int) - maxSendBitrate
 Gets the maximum bitrate that the upstream connection sends in Kbps. More...
 
(bool) - muted
 Gets whether the stream is muted. More...
 
(NSString *) - outputContent
 Gets the output content descriptor. More...
 
(bool) - outputMuted
 Gets whether the output track is muted. More...
 
(void) - populateInfo:
 Populates the media stream info. More...
 
(NSMutableArray *) - preferredCodecs
 Gets any preferred codecs, in order of preference. More...
 
(bool) - raiseBitrateRequest:
 Raises a bitrate request to the local track. More...
 
(void) - raiseLocalEncodingDisabledWithEncoding:
 Raises the OnLocalEncodingDisabled event. More...
 
(void) - raiseLocalEncodingEnabledWithEncoding:
 Raises the OnLocalEncodingEnabled event. More...
 
(int) - remoteBandwidth
 Gets the remote bandwidth in Kbps. More...
 
(NSString *) - remoteCanonicalName
 Gets the remote canonical name. More...
 
(FMLiveSwitchStreamDirection) - remoteDirection
 Gets current direction indicated by the remote description. More...
 
(FMLiveSwitchEncodingInfo *) - remoteEncoding
 Gets the remote encoding. More...
 
(bool) - remoteMuted
 Gets a value indicating if remote is muted. More...
 
(bool) - remoteRequestedDeactivation
 Gets Boolean value set when the server is currently requesting a 0 bitrate. More...
 
(void) - removeOnLocalEncodingDisabled:
 Removes a handler that is raised when a local encoding is disabled. More...
 
(void) - removeOnLocalEncodingEnabled:
 Removes a handler that is raised when a local encoding is enabled. More...
 
(bool) - renegotiationPending
 Gets whether there exist changes that are pending SDP renegotiation. More...
 
(void) - setCodecDisabledWithName:disabled:
 Sets whether a codec is disabled. More...
 
(void) - setInputContent:
 Sets the input content descriptor. More...
 
(void) - setInputMuted:
 Sets whether the input track is muted. More...
 
(void) - setLocalBandwidth:
 Sets the local bandwidth, in kbps. More...
 
(void) - setLocalDirection:
 Sets current direction indicated by the local description. More...
 
(void) - setLocalMuted:
 Sets a value indicating whether the local stream is muted. More...
 
(void) - setMaxReceiveBitrate:
 Sets the maximum bitrate that the connection receives in Kbps. More...
 
(void) - setMaxSendBitrate:
 Sets the maximum bitrate that the upstream connection sends in Kbps. More...
 
(void) - setMuted:
 Sets whether the stream is muted. More...
 
(void) - setOutputContent:
 Sets the output content descriptor. More...
 
(void) - setOutputMuted:
 Sets whether the output track is muted. More...
 
(void) - setPreferredCodecs:
 Sets any preferred codecs, in order of preference. More...
 
(void) - setRemoteBandwidth:
 Sets the remote bandwidth in Kbps. More...
 
(void) - setRemoteEncoding:
 Sets the remote encoding. More...
 
(void) - setRemoteMuted:
 Sets a value indicating if remote is muted. More...
 
(void) - setRenegotiationPending:
 Sets whether there exist changes that are pending SDP renegotiation. More...
 
(void) - setSimulcastMode:
 Sets the simulcast mode. More...
 
(FMLiveSwitchSimulcastMode) - simulcastMode
 Gets the simulcast mode. More...
 
- Instance Methods inherited from FMLiveSwitchStream
(void) - addOnDisabledChange:
 Adds a handler that is raised when the Disabled property changes state. More...
 
(bool) - deactivated
 Gets a value indicating whether this stream is deactivated. More...
 
(bool) - disabled
 Gets a value indicating whether this stream is disabled. More...
 
(FMLiveSwitchEncryptionMode) - encryptionMode
 Gets the encryption mode. More...
 
(NSMutableArray *) - encryptionModes
 Gets the encryption modes. More...
 
(FMLiveSwitchEncryptionPolicy) - encryptionPolicy
 Gets a value indicating Encryption Policy. More...
 
(int) - index
 Gets the index. More...
 
(FMLiveSwitchIceParameters *) - localIceParameters
 Gets the local ICE parameters. More...
 
(void) - raiseDisabledChange
 Raises the OnDisabledChange event. More...
 
(FMLiveSwitchIceParameters *) - remoteIceParameters
 Gets the remote ICE parameters. More...
 
(void) - removeOnDisabledChange:
 Removes a handler that is raised when the Disabled property changes state. More...
 
(FMLiveSwitchSdesPolicy) - sdesPolicy
 Gets Sdes policy for stream. More...
 
(void) - setDeactivated:
 Sets a value indicating whether this stream is deactivated. More...
 
(void) - setDisabled:
 Sets a value indicating whether this stream is disabled. More...
 
(void) - setEncryptionMode:
 Sets the encryption mode. More...
 
(void) - setEncryptionModes:
 Sets the encryption modes. More...
 
(void) - setEncryptionPolicy:
 Sets a value indicating Encryption Policy. More...
 
(void) - setSdesPolicy:
 Sets Sdes policy for stream. More...
 
(void) - setUseDtls:
 Sets a value indicating whether DTLS encryption is in use for this stream. More...
 
(void) - setUseSdes:
 Sets a value indicating whether SDES encryption is in use for this stream. More...
 
(bool) - useDtls
 Gets a value indicating whether DTLS encryption is in use for this stream. More...
 
(bool) - useSdes
 Gets a value indicating whether SDES encryption is in use for this stream. More...
 
- Instance Methods inherited from FMLiveSwitchStreamBase
(void) - addOnDirectionChange:
 Adds a handler that is raised when the stream direction changes. More...
 
(void) - addOnStateChange:
 Adds a handler that is raised when the connection state changes. More...
 
(long long) - connectedTimestamp
 Gets the ManagedStopwatch.GetTimestamp() value representing the ticks that passed when this stream's connection state changed to connected. More...
 
(NSString *) - connectionId
 Gets the connection identifier. More...
 
(NSString *) - description
 Returns a string that represents this instance. More...
 
(NSString *) - externalId
 Gets the external identifier. More...
 
(NSString *) - id
 Gets the identifier. More...
 
(bool) - isTerminated
 Gets a value indicating whether the stream is currently closed or failed. More...
 
(bool) - isTerminating
 Gets a value indicating whether the stream is currently closing or failing. More...
 
(bool) - isTerminatingOrTerminated
 Gets a value indicating whether the stream is currently closing, failing, closed, or failed. More...
 
(bool) - localReceive
 Gets a value indicating whether the local peer supports receiving media on this stream. More...
 
(bool) - localSend
 Gets a value indicating whether the local peer on this stream supports sending media on this stream. More...
 
(NSString *) - mediaDescriptionId
 Gets the media description ID of this stream. More...
 
(void) - processStateChange
 Processes a state change. More...
 
(void) - processStateLockChange
 Processes a state lock change. More...
 
(bool) - remoteReceive
 Gets a value indicating whether receiving media is supported by the remote peer on this stream. More...
 
(bool) - remoteSend
 Gets a value indicating whether sending media is supported by the remote peer on this stream. More...
 
(void) - removeOnDirectionChange:
 Removes a handler that is raised when the stream direction changes. More...
 
(void) - removeOnStateChange:
 Removes a handler that is raised when the connection state changes. More...
 
(void) - setExternalId:
 Sets the external identifier. More...
 
(void) - setLocalReceive:
 Sets a value indicating whether the local peer supports receiving media on this stream. More...
 
(void) - setLocalSend:
 Sets a value indicating whether the local peer on this stream supports sending media on this stream. More...
 
(void) - setTag:
 Sets optional data to associate with this instance. More...
 
(FMLiveSwitchStreamState) - state
 Gets the state of the stream. More...
 
(NSString *) - tag
 Gets optional data to associate with this instance. More...
 
(FMLiveSwitchTransportInfo *) - transportInfo
 Gets the stream transport info. More...
 
(FMLiveSwitchStreamType) - type
 Gets the type. More...
 
- Instance Methods inherited from FMLiveSwitchDynamic
(NSMutableDictionary< NSString *, id > *) - dynamicProperties
 Gets all dynamic properties on this instance. More...
 
(id- getDynamicValueWithKey:
 Gets a property value from the local cache. More...
 
(instancetype) - init
 Initializes a new instance of the FMLiveSwitchSerializable class. More...
 
(void) - setDynamicValueWithKey:value:
 Sets a property value in the local cache. More...
 
(bool) - unsetDynamicValueWithKey:
 Removes a property value from the local cache. More...
 

Class Methods

(FMLiveSwitchMediaStreamBase *) + mediaStreamBaseWithType:
 Initializes a new instance of the FMLiveSwitchMediaStreamBase class. More...
 
- Class Methods inherited from FMLiveSwitchStream
(FMLiveSwitchStream *) + streamWithType:
 Initializes a new instance of the FMLiveSwitchStream class. More...
 
- Class Methods inherited from FMLiveSwitchStreamBase
(FMLiveSwitchStreamBase *) + streamBaseWithType:
 Initializes a new instance of the FMLiveSwitchStreamBase class. More...
 
- Class Methods inherited from FMLiveSwitchDynamic
(FMLiveSwitchDynamic *) + dynamic
 
- Class Methods inherited from FMLiveSwitchSerializable
(FMLiveSwitchSerializable *) + serializable
 Initializes a new instance of the FMLiveSwitchSerializable class. More...
 

Detailed Description

Media stream base properties/methods.

Method Documentation

◆ addOnLocalEncodingDisabled:

- (void) addOnLocalEncodingDisabled: (FMLiveSwitchAction1< FMLiveSwitchEncodingInfo * > *)  value

Adds a handler that is raised when a local encoding is disabled.

◆ addOnLocalEncodingDisabledWithBlock

- (FMLiveSwitchEncodingInfo*) addOnLocalEncodingDisabledWithBlock

Adds a handler that is raised when a local encoding is disabled.

◆ addOnLocalEncodingDisabledWithBlock:

- (void) addOnLocalEncodingDisabledWithBlock: (void(^)(FMLiveSwitchEncodingInfo *))  valueBlock

Adds a handler that is raised when a local encoding is disabled.

◆ addOnLocalEncodingEnabled:

- (void) addOnLocalEncodingEnabled: (FMLiveSwitchAction1< FMLiveSwitchEncodingInfo * > *)  value

Adds a handler that is raised when a local encoding is enabled.

◆ addOnLocalEncodingEnabledWithBlock

- (FMLiveSwitchEncodingInfo*) addOnLocalEncodingEnabledWithBlock

Adds a handler that is raised when a local encoding is enabled.

◆ addOnLocalEncodingEnabledWithBlock:

- (void) addOnLocalEncodingEnabledWithBlock: (void(^)(FMLiveSwitchEncodingInfo *))  valueBlock

Adds a handler that is raised when a local encoding is enabled.

◆ cachedLocalDirection

- (FMLiveSwitchStreamDirection) cachedLocalDirection

Gets Cached Local Direction for this Media Stream.

Internal use.

◆ canonicalName

- (NSString*) canonicalName

Gets the canonical name.

Deprecated:
Use LocalCanonicalName instead.

◆ changeDirectionWithNewDirection:

- (FMLiveSwitchError*) changeDirectionWithNewDirection: (FMLiveSwitchStreamDirection)  newDirection

Records the pending direction of this stream.

The LocalDirection of this stream will be updated when the connection renegotiation commences.

Implements FMLiveSwitchStreamBase.

◆ controlTransportInfo

- (FMLiveSwitchTransportInfo*) controlTransportInfo

Gets control transport info.

◆ direction

- (FMLiveSwitchStreamDirection) direction
Returns
The Media Direction as a StreamDirection enumerator.

Implements FMLiveSwitchStreamBase.

◆ getCodecDisabledWithName:

- (bool) getCodecDisabledWithName: (NSString *)  name

Gets whether a codec is disabled.

Parameters
nameThe codec name.
Returns
Whether the codec is disabled.

◆ info

Gets the media stream info.

◆ initWithType:

- (instancetype) initWithType: (FMLiveSwitchStreamType)  type

Initializes a new instance of the FMLiveSwitchMediaStreamBase class.

Parameters
typeThe type.

Implements FMLiveSwitchStream.

◆ inputContent

- (NSString*) inputContent

Gets the input content descriptor.

◆ inputMuted

- (bool) inputMuted

Gets whether the input track is muted.

◆ label

- (NSString*) label

Gets a label that identifies this class.

Implements FMLiveSwitchStreamBase.

◆ localBandwidth

- (int) localBandwidth

Gets the local bandwidth, in kbps.

This value is signalled in the local session description sent to the remote endpoint so it can limit its outbound media bitrate. Use maxReceiveBitrate to control inbound media bitrate once the session has been negotiated.

◆ localCanonicalName

- (NSString*) localCanonicalName

Gets the local canonical end-point identifier (CNAME) used by RTCP.


The CNAME is a unique identifier for endpoints across an application instance and can be used for third-party monitoring.

◆ localDirection

- (FMLiveSwitchStreamDirection) localDirection

Gets current direction indicated by the local description.

Implements FMLiveSwitchStreamBase.

◆ localMuted

- (bool) localMuted

Gets a value indicating whether the local stream is muted.


A muted stream does not show or play media, but the stream is not disabled and its data continues to flow through the processing pipeline. Alias for muted.

◆ maxReceiveBitrate

- (int) maxReceiveBitrate

Gets the maximum bitrate that the connection receives in Kbps.

Call this method after the downstream connection is opened and its state is connected.
This value must be less than or equal to localBandwidth.

◆ maxSendBitrate

- (int) maxSendBitrate

Gets the maximum bitrate that the upstream connection sends in Kbps.

This value must be less than or equal to remoteBandwidth.

◆ mediaStreamBaseWithType:

+ (FMLiveSwitchMediaStreamBase*) mediaStreamBaseWithType: (FMLiveSwitchStreamType)  type

Initializes a new instance of the FMLiveSwitchMediaStreamBase class.

Parameters
typeThe type.

◆ muted

- (bool) muted

Gets whether the stream is muted.


A muted stream does not show or play media, but the stream is not disabled and its data continues to flow through the processing pipeline.
Alias for inputMuted.

◆ outputContent

- (NSString*) outputContent

Gets the output content descriptor.

◆ outputMuted

- (bool) outputMuted

Gets whether the output track is muted.


A muted stream does not show or play media, but the source is not disabled and its data continues to flow through the processing pipeline.

◆ populateInfo:

- (void) populateInfo: (FMLiveSwitchMediaStreamInfo *)  info

Populates the media stream info.

Parameters
info

◆ preferredCodecs

- (NSMutableArray*) preferredCodecs

Gets any preferred codecs, in order of preference.

◆ raiseBitrateRequest:

- (bool) raiseBitrateRequest: (FMLiveSwitchBitrateRequest *)  bitrateRequest

Raises a bitrate request to the local track.

Parameters
bitrateRequestThe bitrate request.

◆ raiseLocalEncodingDisabledWithEncoding:

- (void) raiseLocalEncodingDisabledWithEncoding: (FMLiveSwitchEncodingInfo *)  encoding

Raises the OnLocalEncodingDisabled event.

Parameters
encodingThe encoding.

◆ raiseLocalEncodingEnabledWithEncoding:

- (void) raiseLocalEncodingEnabledWithEncoding: (FMLiveSwitchEncodingInfo *)  encoding

Raises the OnLocalEncodingEnabled event.

Parameters
encodingThe encoding.

◆ remoteBandwidth

- (int) remoteBandwidth

Gets the remote bandwidth in Kbps.


This value is signalled in the remote session description received from the remote endpoint.
Use maxSendBitrate to control outbound media bitrate once the session has been negotiated.

◆ remoteCanonicalName

- (NSString*) remoteCanonicalName

Gets the remote canonical name.

◆ remoteDirection

- (FMLiveSwitchStreamDirection) remoteDirection

Gets current direction indicated by the remote description.

Implements FMLiveSwitchStreamBase.

◆ remoteEncoding

- (FMLiveSwitchEncodingInfo*) remoteEncoding

Gets the remote encoding.

◆ remoteMuted

- (bool) remoteMuted

Gets a value indicating if remote is muted.

◆ remoteRequestedDeactivation

- (bool) remoteRequestedDeactivation

Gets Boolean value set when the server is currently requesting a 0 bitrate.

This is to highlight the difference between when a stream is deactivated locally or by a control mechanism on the server. Internal Use

◆ removeOnLocalEncodingDisabled:

- (void) removeOnLocalEncodingDisabled: (FMLiveSwitchAction1< FMLiveSwitchEncodingInfo * > *)  value

Removes a handler that is raised when a local encoding is disabled.

◆ removeOnLocalEncodingEnabled:

- (void) removeOnLocalEncodingEnabled: (FMLiveSwitchAction1< FMLiveSwitchEncodingInfo * > *)  value

Removes a handler that is raised when a local encoding is enabled.

◆ renegotiationPending

- (bool) renegotiationPending

Gets whether there exist changes that are pending SDP renegotiation.

◆ setCodecDisabledWithName:disabled:

- (void) setCodecDisabledWithName: (NSString *)  name
disabled: (bool)  disabled 

Sets whether a codec is disabled.

Parameters
nameThe codec name.
disabledWhether to disable the codec.

◆ setInputContent:

- (void) setInputContent: (NSString *)  value

Sets the input content descriptor.

◆ setInputMuted:

- (void) setInputMuted: (bool)  value

Sets whether the input track is muted.

◆ setLocalBandwidth:

- (void) setLocalBandwidth: (int)  value

Sets the local bandwidth, in kbps.

This value is signalled in the local session description sent to the remote endpoint so it can limit its outbound media bitrate. Use maxReceiveBitrate to control inbound media bitrate once the session has been negotiated.

◆ setLocalDirection:

- (void) setLocalDirection: (FMLiveSwitchStreamDirection)  value

Sets current direction indicated by the local description.

Implements FMLiveSwitchStreamBase.

◆ setLocalMuted:

- (void) setLocalMuted: (bool)  value

Sets a value indicating whether the local stream is muted.


A muted stream does not show or play media, but the stream is not disabled and its data continues to flow through the processing pipeline. Alias for muted.

◆ setMaxReceiveBitrate:

- (void) setMaxReceiveBitrate: (int)  value

Sets the maximum bitrate that the connection receives in Kbps.

Call this method after the downstream connection is opened and its state is connected.
This value must be less than or equal to localBandwidth.

◆ setMaxSendBitrate:

- (void) setMaxSendBitrate: (int)  value

Sets the maximum bitrate that the upstream connection sends in Kbps.

This value must be less than or equal to remoteBandwidth.

◆ setMuted:

- (void) setMuted: (bool)  value

Sets whether the stream is muted.


A muted stream does not show or play media, but the stream is not disabled and its data continues to flow through the processing pipeline.
Alias for inputMuted.

◆ setOutputContent:

- (void) setOutputContent: (NSString *)  value

Sets the output content descriptor.

◆ setOutputMuted:

- (void) setOutputMuted: (bool)  value

Sets whether the output track is muted.


A muted stream does not show or play media, but the source is not disabled and its data continues to flow through the processing pipeline.

◆ setPreferredCodecs:

- (void) setPreferredCodecs: (NSMutableArray *)  value

Sets any preferred codecs, in order of preference.

◆ setRemoteBandwidth:

- (void) setRemoteBandwidth: (int)  value

Sets the remote bandwidth in Kbps.


This value is signalled in the remote session description received from the remote endpoint.
Use maxSendBitrate to control outbound media bitrate once the session has been negotiated.

◆ setRemoteEncoding:

- (void) setRemoteEncoding: (FMLiveSwitchEncodingInfo *)  value

Sets the remote encoding.

◆ setRemoteMuted:

- (void) setRemoteMuted: (bool)  value

Sets a value indicating if remote is muted.

◆ setRenegotiationPending:

- (void) setRenegotiationPending: (bool)  value

Sets whether there exist changes that are pending SDP renegotiation.

◆ setSimulcastMode:

- (void) setSimulcastMode: (FMLiveSwitchSimulcastMode)  value

Sets the simulcast mode.

◆ simulcastMode

- (FMLiveSwitchSimulcastMode) simulcastMode

Gets the simulcast mode.