FMLiveSwitchMediaTrack Class Reference

A media track. More...

Instance Methods

(TSink) - activeSink
 Gets the active sink. More...
 
(void) - addElement:
 Adds an element. More...
 
(void) - addOnDestroyed:
 Adds a handler that is raised when the track is destroyed. More...
 
(void) - addOnMuted:
 Adds a handler that is raised when the track is muted. More...
 
(void) - addOnStarted:
 Adds a handler that is raised when the track is started. More...
 
(void) - addOnStopped:
 Adds a handler that is raised when the track is stopped. More...
 
(void) - addOnUnmuted:
 Adds a handler that is raised when the track is unmuted. More...
 
(NSMutableArray *) - arrayFromInputs:
 Creates an array of inputs from a list of inputs. More...
 
(NSMutableArray *) - arrayFromOutputs:
 Creates an array of outputs from a list of outputs. More...
 
(NSMutableArray *) - arrayFromSinks:
 Creates an array of sinks from a list of sinks. More...
 
(TBranch) - branchFromTracks:
 Creates a branch from an array of tracks. More...
 
(FMLiveSwitchFuture< id > *) - changeSinkOutput:
 Changes the sink output while the media track is active. More...
 
(FMLiveSwitchFuture< id > *) - changeSourceInput:
 Changes the source input while the media track is active. More...
 
(bool) - deactivated
 Gets a value indicating whether this track is deactivated. More...
 
(bool) - destroy
 Destroys this media track. More...
 
(bool) - disabled
 Gets a value indicating whether this track is disabled. More...
 
(NSMutableArray *) - elements
 Gets the elements. More...
 
(NSString *) - externalId
 Gets the external identifier. More...
 
(NSMutableArray< TIElement > *) - findElementsWithWhere:
 Finds elements in the track. More...
 
(NSMutableArray< TIElement > *) - findElementsWithWhere:recurse:
 Finds elements in this track. More...
 
(TIElement) - findElementsWithWhereBlock
 Finds elements in the track. More...
 
(NSMutableArray< TIElement > *) - findElementsWithWhereBlock:
 Finds elements in the track. More...
 
(NSMutableArray< TIElement > *) - findElementsWithWhereBlock:recurse:
 Finds elements in this track. More...
 
(TIElement) - findElementsWithWhereBlockAndRecurse
 Finds elements in this track. More...
 
(TIElement) - findElementWithWhere:
 Finds an element in the track. More...
 
(TIElement) - findElementWithWhere:recurse:
 Finds an element in this track. More...
 
(TIElement) - findElementWithWhereBlock
 Finds an element in the track. More...
 
(TIElement) - findElementWithWhereBlock:
 Finds an element in the track. More...
 
(TIElement) - findElementWithWhereBlock:recurse:
 Finds an element in this track. More...
 
(TIElement) - findElementWithWhereBlockAndRecurse
 Finds an element in this track. More...
 
(TIElement) - firstElement
 Gets the first element. More...
 
(FMLiveSwitchFuture< NSMutableArray * > *) - getSinkOutputs
 Gets the available sink outputs. More...
 
(FMLiveSwitchFuture< NSMutableArray * > *) - getSourceInputs
 Gets the available source inputs. More...
 
(NSString *) - id
 Gets the identifier. More...
 
(instancetype) - init
 
(TIInput) - input
 Gets the first input, if this track has inputs. More...
 
(TFormat) - inputFormat
 Gets the input format. More...
 
(NSMutableArray *) - inputs
 Gets the track inputs. More...
 
(bool) - isBranched
 Gets a value indicating whether this track's last element is a branch. More...
 
(bool) - isBranchWithElement:
 Determines whether the specified element is a branch. More...
 
(bool) - isEmpty
 Gets a value indicating whether this instance is empty. More...
 
(bool) - isInputWithElement:
 Determines whether the specified element is an input. More...
 
(bool) - isOutputWithElement:
 Determines whether the specified element is an output. More...
 
(bool) - isPipeWithElement:
 Determines whether the specified element is a pipe. More...
 
(bool) - isSinkWithElement:
 Determines whether the specified element is a sink. More...
 
(bool) - isSourceWithElement:
 Determines whether the specified element is a source. More...
 
(bool) - isStreamWithElement:
 Determines whether the specified element is a stream. More...
 
(bool) - isTerminated
 Gets a value indicating whether this track's last element is a sink. More...
 
(NSString *) - label
 Gets a label that identifies this class. More...
 
(TIElement) - lastElement
 Gets the last element. More...
 
(bool) - muted
 Gets a value indicating whether any of the elements in this track are muted. More...
 
(TTrack) - next:
 Adds an element to this track. More...
 
(TTrack) - nextWithBranch:
 Branches out to several tracks. More...
 
(TTrack) - nextWithTracks:
 Branches out to several tracks. More...
 
(TIOutput) - output
 Gets the first output, if this track has outputs. More...
 
(TFormat) - outputFormat
 Gets the output format. More...
 
(NSMutableArray *) - outputs
 Gets the track outputs. More...
 
(bool) - paused
 Gets a value indicating whether this track is paused. More...
 
(bool) - persistent
 Gets a value indicating whether this instance is persistent. More...
 
(NSString *) - pipelineJson
 Gets the pipeline JSON using the first element as a starting point. More...
 
(void) - raiseOnMuted
 Raises the FMLiveSwitchMediaTrack`14addOnMuted: event. More...
 
(void) - raiseOnStarted
 Raises the FMLiveSwitchMediaTrack`14addOnStarted: event. More...
 
(void) - raiseOnStopped
 Raises the FMLiveSwitchMediaTrack`14addOnStopped: event. More...
 
(void) - raiseOnUnmuted
 Raises the FMLiveSwitchMediaTrack`14addOnUnmuted: event. More...
 
(void) - removeOnDestroyed:
 Removes a handler that is raised when the track is destroyed. More...
 
(void) - removeOnMuted:
 Removes a handler that is raised when the track is muted. More...
 
(void) - removeOnStarted:
 Removes a handler that is raised when the track is started. More...
 
(void) - removeOnStopped:
 Removes a handler that is raised when the track is stopped. More...
 
(void) - removeOnUnmuted:
 Removes a handler that is raised when the track is unmuted. More...
 
(void) - setDeactivated:
 Sets a value indicating whether this track is deactivated. More...
 
(void) - setExternalId:
 Sets the external identifier. More...
 
(void) - setMuted:
 Sets a value indicating whether any of the elements in this track are muted. More...
 
(void) - setPersistent:
 Sets a value indicating whether this instance is persistent. More...
 
(void) - setSinkOutput:
 Sets the current sink output. More...
 
(void) - setSourceInput:
 Sets the current source input. More...
 
(TSink) - sink
 Gets the sink, if the last element is a sink. More...
 
(FMLiveSwitchSinkOutput *) - sinkOutput
 Gets the current sink output. More...
 
(NSMutableArray *) - sinks
 Gets the sinks. More...
 
(TSource) - source
 Gets the source, if the first element is a source. More...
 
(FMLiveSwitchSourceInput *) - sourceInput
 Gets the current source input. More...
 

Class Methods

(FMLiveSwitchMediaTrack *) + mediaTrack
 

Protected Attributes

 __pad0__: FMLiveSwitchMediaTrackBase<FMLiveSwitchIMediaTrack
 
 FMLiveSwitchIMediaElement
 

Detailed Description

A media track.

Method Documentation

◆ activeSink

- (TSink) activeSink

Gets the active sink.

This will return FMLiveSwitchMediaTrack14#sink if FMLiveSwitchMediaTrack14sink is not null and not disabled. Otherwise, if this track branches, it will iterate recursively over the active tracks until it finds an FMLiveSwitchMediaTrack14#activeSink. Otherwise, it will returnnull`.

◆ addElement:

- (void) addElement: (TIElement)  element

Adds an element.

◆ addOnDestroyed:

- (void) addOnDestroyed: (FMLiveSwitchAction0 *)  value

Adds a handler that is raised when the track is destroyed.

◆ addOnMuted:

- (void) addOnMuted: (FMLiveSwitchAction0 *)  value

Adds a handler that is raised when the track is muted.

Only applicable for local media tracks.

◆ addOnStarted:

- (void) addOnStarted: (FMLiveSwitchAction0 *)  value

Adds a handler that is raised when the track is started.

Only applicable for local media tracks.

◆ addOnStopped:

- (void) addOnStopped: (FMLiveSwitchAction0 *)  value

Adds a handler that is raised when the track is stopped.

Only applicable for local media tracks.

◆ addOnUnmuted:

- (void) addOnUnmuted: (FMLiveSwitchAction0 *)  value

Adds a handler that is raised when the track is unmuted.

Only applicable for local media tracks.

◆ arrayFromInputs:

- (NSMutableArray*) arrayFromInputs: (NSMutableArray< TIInput > *)  inputs

Creates an array of inputs from a list of inputs.

Parameters
inputsThe list of inputs.

◆ arrayFromOutputs:

- (NSMutableArray*) arrayFromOutputs: (NSMutableArray< TIOutput > *)  outputs

Creates an array of outputs from a list of outputs.

Parameters
outputsThe list of outputs.

◆ arrayFromSinks:

- (NSMutableArray*) arrayFromSinks: (NSMutableArray< TSink > *)  sinks

Creates an array of sinks from a list of sinks.

Parameters
sinksThe list of sinks.

◆ branchFromTracks:

- (TBranch) branchFromTracks: (NSMutableArray *)  tracks

Creates a branch from an array of tracks.

Parameters
tracksThe tracks.

Implemented in FMLiveSwitchVideoTrack, and FMLiveSwitchAudioTrack.

◆ changeSinkOutput:

- (FMLiveSwitchFuture<id>*) changeSinkOutput: (FMLiveSwitchSinkOutput *)  sinkOutput

Changes the sink output while the media track is active.

Parameters
sinkOutputThe sink output.

◆ changeSourceInput:

- (FMLiveSwitchFuture<id>*) changeSourceInput: (FMLiveSwitchSourceInput *)  sourceInput

Changes the source input while the media track is active.

Parameters
sourceInputThe source input.

◆ deactivated

- (bool) deactivated

Gets a value indicating whether this track is deactivated.

A track is deactivated if its first element is deactivated.

◆ destroy

- (bool) destroy

Destroys this media track.

Implemented in FMLiveSwitchVideoTrack, and FMLiveSwitchAudioTrack.

◆ disabled

- (bool) disabled

Gets a value indicating whether this track is disabled.

A track is disabled if its first element is disabled.

◆ elements

- (NSMutableArray*) elements

Gets the elements.

Implemented in FMLiveSwitchVideoTrack, and FMLiveSwitchAudioTrack.

◆ externalId

- (NSString*) externalId

Gets the external identifier.

◆ findElementsWithWhere:

- (NSMutableArray<TIElement>*) findElementsWithWhere: (FMLiveSwitchFunction1< TIElement, id > *)  where

Finds elements in the track.

This method will recursively call into any branched tracks.

Returns
A list of elements found matching the given 'where' function, or null if no elements exist for that type.

◆ findElementsWithWhere:recurse:

- (NSMutableArray<TIElement>*) findElementsWithWhere: (FMLiveSwitchFunction1< TIElement, id > *)  where
recurse: (bool)  recurse 

Finds elements in this track.

If the recurse flag is set, then this method will recursively call into any branched tracks.

Returns
A list of elements found matching the given 'where' function, or null if no elements exist for that type.

◆ findElementsWithWhereBlock

- (TIElement) findElementsWithWhereBlock

Finds elements in the track.

This method will recursively call into any branched tracks.

Returns
A list of elements found matching the given 'where' function, or null if no elements exist for that type.

◆ findElementsWithWhereBlock:

- (NSMutableArray<TIElement>*) findElementsWithWhereBlock: (bool(^)(TIElement))  whereBlock

Finds elements in the track.

This method will recursively call into any branched tracks.

Returns
A list of elements found matching the given 'where' function, or null if no elements exist for that type.

◆ findElementsWithWhereBlock:recurse:

- (NSMutableArray<TIElement>*) findElementsWithWhereBlock: (bool(^)(TIElement))  whereBlock
recurse: (bool)  recurse 

Finds elements in this track.

If the recurse flag is set, then this method will recursively call into any branched tracks.

Returns
A list of elements found matching the given 'where' function, or null if no elements exist for that type.

◆ findElementsWithWhereBlockAndRecurse

- (TIElement) findElementsWithWhereBlockAndRecurse

Finds elements in this track.

If the recurse flag is set, then this method will recursively call into any branched tracks.

Returns
A list of elements found matching the given 'where' function, or null if no elements exist for that type.

◆ findElementWithWhere:

- (TIElement) findElementWithWhere: (FMLiveSwitchFunction1< TIElement, id > *)  where

Finds an element in the track.

This method will recursively call into any branched tracks.

Returns
The first element found matching the given 'where' function, or null if no elements exist for that type.

◆ findElementWithWhere:recurse:

- (TIElement) findElementWithWhere: (FMLiveSwitchFunction1< TIElement, id > *)  where
recurse: (bool)  recurse 

Finds an element in this track.

If the recurse flag is set, then this method will recursively call into any branched tracks.

Returns
The first element found matching the given 'where' function, or null if no elements exist for that type.

◆ findElementWithWhereBlock

- (TIElement) findElementWithWhereBlock

Finds an element in the track.

This method will recursively call into any branched tracks.

Returns
The first element found matching the given 'where' function, or null if no elements exist for that type.

◆ findElementWithWhereBlock:

- (TIElement) findElementWithWhereBlock: (bool(^)(TIElement))  whereBlock

Finds an element in the track.

This method will recursively call into any branched tracks.

Returns
The first element found matching the given 'where' function, or null if no elements exist for that type.

◆ findElementWithWhereBlock:recurse:

- (TIElement) findElementWithWhereBlock: (bool(^)(TIElement))  whereBlock
recurse: (bool)  recurse 

Finds an element in this track.

If the recurse flag is set, then this method will recursively call into any branched tracks.

Returns
The first element found matching the given 'where' function, or null if no elements exist for that type.

◆ findElementWithWhereBlockAndRecurse

- (TIElement) findElementWithWhereBlockAndRecurse

Finds an element in this track.

If the recurse flag is set, then this method will recursively call into any branched tracks.

Returns
The first element found matching the given 'where' function, or null if no elements exist for that type.

◆ firstElement

- (TIElement) firstElement

Gets the first element.

◆ getSinkOutputs

- (FMLiveSwitchFuture<NSMutableArray*>*) getSinkOutputs

Gets the available sink outputs.

Returns
A future with an array of sink outputs.

◆ getSourceInputs

- (FMLiveSwitchFuture<NSMutableArray*>*) getSourceInputs

Gets the available source inputs.

Returns
A future with an array of source inputs.

◆ id

- (NSString*) id

Gets the identifier.

◆ init

- (instancetype) init

◆ input

- (TIInput) input

Gets the first input, if this track has inputs.

Otherwise, returns null.

◆ inputFormat

- (TFormat) inputFormat

Gets the input format.

◆ inputs

- (NSMutableArray*) inputs

Gets the track inputs.

◆ isBranched

- (bool) isBranched

Gets a value indicating whether this track's last element is a branch.

◆ isBranchWithElement:

- (bool) isBranchWithElement: (TIElement)  element

Determines whether the specified element is a branch.

Parameters
elementThe element.

◆ isEmpty

- (bool) isEmpty

Gets a value indicating whether this instance is empty.

◆ isInputWithElement:

- (bool) isInputWithElement: (TIElement)  element

Determines whether the specified element is an input.

Parameters
elementThe element.

◆ isOutputWithElement:

- (bool) isOutputWithElement: (TIElement)  element

Determines whether the specified element is an output.

Parameters
elementThe element.

◆ isPipeWithElement:

- (bool) isPipeWithElement: (TIElement)  element

Determines whether the specified element is a pipe.

Parameters
elementThe element.

◆ isSinkWithElement:

- (bool) isSinkWithElement: (TIElement)  element

Determines whether the specified element is a sink.

Parameters
elementThe element.

◆ isSourceWithElement:

- (bool) isSourceWithElement: (TIElement)  element

Determines whether the specified element is a source.

Parameters
elementThe element.

◆ isStreamWithElement:

- (bool) isStreamWithElement: (TIElement)  element

Determines whether the specified element is a stream.

Parameters
elementThe element.

◆ isTerminated

- (bool) isTerminated

Gets a value indicating whether this track's last element is a sink.

◆ label

- (NSString*) label

Gets a label that identifies this class.

Implemented in FMLiveSwitchVideoTrack, and FMLiveSwitchAudioTrack.

◆ lastElement

- (TIElement) lastElement

Gets the last element.

◆ mediaTrack

+ (FMLiveSwitchMediaTrack*) mediaTrack

◆ muted

- (bool) muted

Gets a value indicating whether any of the elements in this track are muted.

Setting a value will apply to all elements.

◆ next:

- (TTrack) next: (TIInput)  next

Adds an element to this track.

Parameters
nextThe next element.

◆ nextWithBranch:

- (TTrack) nextWithBranch: (TBranch)  branch

Branches out to several tracks.

Parameters
branchThe tracks.

◆ nextWithTracks:

- (TTrack) nextWithTracks: (NSMutableArray *)  tracks

Branches out to several tracks.

Parameters
tracksThe tracks.

◆ output

- (TIOutput) output

Gets the first output, if this track has outputs.

Otherwise, returns null.

◆ outputFormat

- (TFormat) outputFormat

Gets the output format.

◆ outputs

- (NSMutableArray*) outputs

Gets the track outputs.

◆ paused

- (bool) paused

Gets a value indicating whether this track is paused.

A track is paused if its last elements is paused.

◆ persistent

- (bool) persistent

Gets a value indicating whether this instance is persistent.

If true, this instance will not be destroyed unless FMLiveSwitchMediaTrack`14destroy is called explicitly on this instance. It will survive destruction of any parent elements that are being destroyed.

◆ pipelineJson

- (NSString*) pipelineJson

Gets the pipeline JSON using the first element as a starting point.

◆ raiseOnMuted

- (void) raiseOnMuted

Raises the FMLiveSwitchMediaTrack`14addOnMuted: event.

◆ raiseOnStarted

- (void) raiseOnStarted

Raises the FMLiveSwitchMediaTrack`14addOnStarted: event.

◆ raiseOnStopped

- (void) raiseOnStopped

Raises the FMLiveSwitchMediaTrack`14addOnStopped: event.

◆ raiseOnUnmuted

- (void) raiseOnUnmuted

Raises the FMLiveSwitchMediaTrack`14addOnUnmuted: event.

◆ removeOnDestroyed:

- (void) removeOnDestroyed: (FMLiveSwitchAction0 *)  value

Removes a handler that is raised when the track is destroyed.

◆ removeOnMuted:

- (void) removeOnMuted: (FMLiveSwitchAction0 *)  value

Removes a handler that is raised when the track is muted.

Only applicable for local media tracks.

◆ removeOnStarted:

- (void) removeOnStarted: (FMLiveSwitchAction0 *)  value

Removes a handler that is raised when the track is started.

Only applicable for local media tracks.

◆ removeOnStopped:

- (void) removeOnStopped: (FMLiveSwitchAction0 *)  value

Removes a handler that is raised when the track is stopped.

Only applicable for local media tracks.

◆ removeOnUnmuted:

- (void) removeOnUnmuted: (FMLiveSwitchAction0 *)  value

Removes a handler that is raised when the track is unmuted.

Only applicable for local media tracks.

◆ setDeactivated:

- (void) setDeactivated: (bool)  value

Sets a value indicating whether this track is deactivated.

A track is deactivated if its first element is deactivated.

◆ setExternalId:

- (void) setExternalId: (NSString *)  value

Sets the external identifier.

◆ setMuted:

- (void) setMuted: (bool)  value

Sets a value indicating whether any of the elements in this track are muted.

Setting a value will apply to all elements.

◆ setPersistent:

- (void) setPersistent: (bool)  value

Sets a value indicating whether this instance is persistent.

If true, this instance will not be destroyed unless FMLiveSwitchMediaTrack`14destroy is called explicitly on this instance. It will survive destruction of any parent elements that are being destroyed.

◆ setSinkOutput:

- (void) setSinkOutput: (FMLiveSwitchSinkOutput *)  value

Sets the current sink output.

◆ setSourceInput:

- (void) setSourceInput: (FMLiveSwitchSourceInput *)  value

Sets the current source input.

◆ sink

- (TSink) sink

Gets the sink, if the last element is a sink.

Otherwise, returns null.

◆ sinkOutput

- (FMLiveSwitchSinkOutput*) sinkOutput

Gets the current sink output.

◆ sinks

- (NSMutableArray*) sinks

Gets the sinks.

This will return FMLiveSwitchMediaTrack14#sink if FMLiveSwitchMediaTrack14sink is not null. Otherwise, if this track branches, it will iterate recursively over the branched tracks.

◆ source

- (TSource) source

Gets the source, if the first element is a source.

Otherwise, returns null.

◆ sourceInput

- (FMLiveSwitchSourceInput*) sourceInput

Gets the current source input.

Member Data Documentation

◆ __pad0__

- __pad0__
protected

◆ FMLiveSwitchIMediaElement