A collection of local audio/video track base methods. More...
Instance Methods | |
(void) | - abortStartWithPromise:exception: |
Aborts the start. More... | |
(FMLiveSwitchAudioEncodingConfig *) | - audioEncoding |
Gets the local audio encoding configuration. More... | |
(NSMutableArray *) | - audioEncodings |
Gets the local audio encoding configurations. More... | |
(bool) | - audioSimulcastDisabled |
Gets whether audio simulcast is disabled. More... | |
(int) | - audioSimulcastEncodingCount |
Gets the maximum number of simulcast encodings that this media produces for the audio stream. More... | |
(int) | - audioSimulcastPreferredBitrate |
Gets the preferred audio simulcast bitrate, in kbps. More... | |
(NSMutableArray *) | - doGetAudioEncodings |
Gets the local audio encodings. More... | |
(NSMutableArray *) | - doGetVideoEncodings |
Gets the local video encodings. More... | |
(void) | - doSetAudioEncodings: |
Sets the local audio encodings. More... | |
(void) | - doSetVideoEncodings: |
Sets the local video encodings. More... | |
(FMLiveSwitchFuture< TLocalMedia > *) | - doStart |
Starts the local media. More... | |
(FMLiveSwitchFuture< TLocalMedia > *) | - doStop |
Stops the local media. More... | |
(instancetype) | - init |
Initializes a new instance of the FMLiveSwitchLocalMediaBase`3 class. More... | |
(void) | - lockAudioEncodings |
Locks the audio encodings in prior to initialization. More... | |
(void) | - lockVideoEncodings |
Locks the video encodings in prior to initialization. More... | |
(void) | - lockVideoEncodingsWithSourceType: |
Locks the video encodings in prior to initialization. More... | |
(void) | - lockVideoEncodingsWithSourceType:sourceWidth:sourceHeight:sourceFrameRate: |
Locks the video encodings in prior to initialization. More... | |
(void) | - setAudioEncodings: |
Sets the local audio encoding configurations. More... | |
(void) | - setAudioSimulcastDisabled: |
Sets whether audio simulcast is disabled. More... | |
(void) | - setAudioSimulcastEncodingCount: |
Sets the maximum number of simulcast encodings that this media produces for the audio stream. More... | |
(void) | - setAudioSimulcastPreferredBitrate: |
Sets the preferred audio simulcast bitrate, in kbps. More... | |
(void) | - setVideoEncodings: |
Sets the local video encoding configurations. More... | |
(void) | - setVideoSimulcastBitsPerPixel: |
Sets the video simulcast bits per pixel (bpp). More... | |
(void) | - setVideoSimulcastDegradationPreference: |
Sets the video’s simulcast degradation preference. More... | |
(void) | - setVideoSimulcastDisabled: |
Sets whether video simulcast is disabled. More... | |
(void) | - setVideoSimulcastEncodingCount: |
Sets the maximum number of simulcast encodings that this LocalMedia produces for the video stream. More... | |
(void) | - setVideoSimulcastPreferredBitrate: |
Sets the preferred bitrate of a video simulcast in Kbps. More... | |
(FMLiveSwitchFuture< TLocalMedia > *) | - start |
Starts media track sources. More... | |
(FMLiveSwitchLocalMediaState) | - state |
Gets the current state of this media. More... | |
(FMLiveSwitchFuture< TLocalMedia > *) | - stop |
Stops media track sources. More... | |
(FMLiveSwitchVideoEncodingConfig *) | - videoEncoding |
Gets the local video encoding configuration. More... | |
(NSMutableArray *) | - videoEncodings |
Gets the local video encoding configurations. More... | |
(double) | - videoSimulcastBitsPerPixel |
Gets the video simulcast bits per pixel (bpp). More... | |
(FMLiveSwitchVideoDegradationPreference) | - videoSimulcastDegradationPreference |
Gets the video’s simulcast degradation preference. More... | |
(bool) | - videoSimulcastDisabled |
Gets whether video simulcast is disabled. More... | |
(int) | - videoSimulcastEncodingCount |
Gets the maximum number of simulcast encodings that this LocalMedia produces for the video stream. More... | |
(int) | - videoSimulcastPreferredBitrate |
Gets the preferred bitrate of a video simulcast in Kbps. More... | |
Class Methods | |
(double) | + defaultVideoBitsPerPixel |
Gets the default bits-per-pixel for video. More... | |
(FMLiveSwitchLocalMediaBase *) | + localMediaBase |
Initializes a new instance of the FMLiveSwitchLocalMediaBase`3 class. More... | |
(void) | + setDefaultVideoBitsPerPixel: |
Sets the default bits-per-pixel for video. More... | |
Protected Attributes | |
__pad0__: FMLiveSwitchMedia<TAudioTrack | |
A collection of local audio/video track base methods.
- (void) abortStartWithPromise: | (FMLiveSwitchPromise< TLocalMedia > *) | promise | |
exception: | (NSException *) | exception | |
Aborts the start.
promise | The promise. |
exception | The exception. |
- (FMLiveSwitchAudioEncodingConfig*) audioEncoding |
Gets the local audio encoding configuration.
If there are multiple audio tracks in a custom media stack, this method calls into the first audio track.
- (NSMutableArray*) audioEncodings |
Gets the local audio encoding configurations.
Audio encodings cannot be empty, so if you set an encoding with a null value or an empty array, this method creates an empty array with one AudioEncodingConfig in it.
If a new audio encodings array has the same number of encodings as the current one, the new audio encodings are applied to the local media’s audio track. Otherwise, an exception is thrown because the number of audio encodings cannot be changed once they are set.
- (bool) audioSimulcastDisabled |
Gets whether audio simulcast is disabled.
- (int) audioSimulcastEncodingCount |
Gets the maximum number of simulcast encodings that this media produces for the audio stream.
The number of encodings cannot be changed once they are set.
This property must be set before the media starts.
- (int) audioSimulcastPreferredBitrate |
Gets the preferred audio simulcast bitrate, in kbps.
The bitrate must be a positive integer.
+ (double) defaultVideoBitsPerPixel |
Gets the default bits-per-pixel for video.
- (NSMutableArray*) doGetAudioEncodings |
Gets the local audio encodings.
Implemented in FMLiveSwitchLocalMedia.
- (NSMutableArray*) doGetVideoEncodings |
Gets the local video encodings.
Implemented in FMLiveSwitchLocalMedia.
- (void) doSetAudioEncodings: | (NSMutableArray *) | encodings |
Sets the local audio encodings.
encodings | The local audio encodings. |
Implemented in FMLiveSwitchLocalMedia.
- (void) doSetVideoEncodings: | (NSMutableArray *) | encodings |
Sets the local video encodings.
encodings | The local video encodings. |
Implemented in FMLiveSwitchLocalMedia.
- (FMLiveSwitchFuture<TLocalMedia>*) doStart |
Starts the local media.
Implemented in FMLiveSwitchLocalMedia.
- (FMLiveSwitchFuture<TLocalMedia>*) doStop |
Stops the local media.
Implemented in FMLiveSwitchLocalMedia.
- (instancetype) init |
Initializes a new instance of the FMLiveSwitchLocalMediaBase`3 class.
Implemented in FMLiveSwitchLocalMedia.
+ (FMLiveSwitchLocalMediaBase*) localMediaBase |
Initializes a new instance of the FMLiveSwitchLocalMediaBase`3 class.
- (void) lockAudioEncodings |
Locks the audio encodings in prior to initialization.
- (void) lockVideoEncodings |
Locks the video encodings in prior to initialization.
- (void) lockVideoEncodingsWithSourceType: | (FMLiveSwitchVideoType) | sourceType |
Locks the video encodings in prior to initialization.
- (void) lockVideoEncodingsWithSourceType: | (FMLiveSwitchVideoType) | sourceType | |
sourceWidth: | (int) | sourceWidth | |
sourceHeight: | (int) | sourceHeight | |
sourceFrameRate: | (double) | sourceFrameRate | |
Locks the video encodings in prior to initialization.
- (void) setAudioEncodings: | (NSMutableArray *) | value |
Sets the local audio encoding configurations.
Audio encodings cannot be empty, so if you set an encoding with a null value or an empty array, this method creates an empty array with one AudioEncodingConfig in it.
If a new audio encodings array has the same number of encodings as the current one, the new audio encodings are applied to the local media’s audio track. Otherwise, an exception is thrown because the number of audio encodings cannot be changed once they are set.
- (void) setAudioSimulcastDisabled: | (bool) | value |
Sets whether audio simulcast is disabled.
- (void) setAudioSimulcastEncodingCount: | (int) | value |
Sets the maximum number of simulcast encodings that this media produces for the audio stream.
The number of encodings cannot be changed once they are set.
This property must be set before the media starts.
- (void) setAudioSimulcastPreferredBitrate: | (int) | value |
Sets the preferred audio simulcast bitrate, in kbps.
The bitrate must be a positive integer.
+ (void) setDefaultVideoBitsPerPixel: | (double) | value |
Sets the default bits-per-pixel for video.
- (void) setVideoEncodings: | (NSMutableArray *) | value |
Sets the local video encoding configurations.
Video encodings cannot be empty, so if you set the value of this method to null or an empty array, an exception is thrown.
The number of video encodings cannot be changed once set. If the number of new video encodings is different from the existing number of video encodings, an error is thrown. If a new video encoding array has the same number of encodings as the current one, the encodings are applied to the media’s VP8, VP9, H.264, and H.265 controllers, converters, encoders, and packetizers.
For controllers which inherit from FrameRatePipe, that means setting controller.OutputSynchronizationSource to the encoding.SynchronizationSource. If the encoding.FrameRate is greater than zero, this sets the controller.MaxFrameRate and controller.TargetFrameRate to the encoding.FrameRate.
For converters which are the ImageScalePipe type, that means setting converter.MaxScale and converter.TargetScale to encoding.Scale, as long as encoding.Scale is greater than zero.
For encoders, if the encoder's output format is not a fixed bitrate and encoding.Bitrate is greater than zero, that means setting the encoder.MaxBitrate and encoder.TargetBitrate to encoding.Bitrate.
For packetizers, that means setting packetizer.Deactivated to encoding.Deactivated.
- (void) setVideoSimulcastBitsPerPixel: | (double) | value |
Sets the video simulcast bits per pixel (bpp).
The bits per pixel value must be greater than or equal to zero.
If the video source has declared a target width, height, and frame rate, and VideoSimulcastBitsPerPixel has a set value, then the encoding bitrates are calculated with setVideoSimulcastBitsPerPixel’s value instead of the preferred bitrate.
- (void) setVideoSimulcastDegradationPreference: | (FMLiveSwitchVideoDegradationPreference) | value |
Sets the video’s simulcast degradation preference.
The following degradation preferences can be set:
Automatic: Prefers to automate degradation based on video type. A Screen video type prefers to degrade FrameRate. A Camera video type prefers to degrade Resolution. An unknown video type prefers a Balanced approach.
Balanced: Prefers to degrade both FrameRate and Resolution together in smaller increments.
FrameRate: Prefers to degrade FrameRate instead of Resolution.
Resolution: Prefers to degrade Resolution instead of FrameRate.
- (void) setVideoSimulcastDisabled: | (bool) | value |
Sets whether video simulcast is disabled.
If true, video simulcast is disabled. If false, video simulcast is enabled.
- (void) setVideoSimulcastEncodingCount: | (int) | value |
Sets the maximum number of simulcast encodings that this LocalMedia produces for the video stream.
The default value is 2. For LiveSwitch Media Server, the maximum is 4 encodings. This property must be set before the LocalMedia starts.
- (void) setVideoSimulcastPreferredBitrate: | (int) | value |
Sets the preferred bitrate of a video simulcast in Kbps.
The bitrate must be a positive integer.
- (FMLiveSwitchFuture<TLocalMedia>*) start |
Starts media track sources.
This method does not take any parameters and executes asynchronously. Call this method when LocalMedia's state is New or Stopped. If you call this method when LocalMedia's state is not New or Stopped, then the Future returned by this method is rejected.
- (FMLiveSwitchLocalMediaState) state |
Gets the current state of this media.
The possible states are defined in the enumeration LocalMediaState. Use this property to check if, for example, the media instance is starting, has started, is stopping, or has stopped.
- (FMLiveSwitchFuture<TLocalMedia>*) stop |
Stops media track sources.
This method does not take any parameters and executes asynchronously. Call this method when LocalMedia has started. If you call this method when LocalMedia has not started, then the Future returned by this method is rejected.
- (FMLiveSwitchVideoEncodingConfig*) videoEncoding |
Gets the local video encoding configuration.
If there are multiple video tracks in a custom media stack, this method calls into the first video track. Returns the local VideoEncodingConfig.
- (NSMutableArray*) videoEncodings |
Gets the local video encoding configurations.
Video encodings cannot be empty, so if you set the value of this method to null or an empty array, an exception is thrown.
The number of video encodings cannot be changed once set. If the number of new video encodings is different from the existing number of video encodings, an error is thrown. If a new video encoding array has the same number of encodings as the current one, the encodings are applied to the media’s VP8, VP9, H.264, and H.265 controllers, converters, encoders, and packetizers.
For controllers which inherit from FrameRatePipe, that means setting controller.OutputSynchronizationSource to the encoding.SynchronizationSource. If the encoding.FrameRate is greater than zero, this sets the controller.MaxFrameRate and controller.TargetFrameRate to the encoding.FrameRate.
For converters which are the ImageScalePipe type, that means setting converter.MaxScale and converter.TargetScale to encoding.Scale, as long as encoding.Scale is greater than zero.
For encoders, if the encoder's output format is not a fixed bitrate and encoding.Bitrate is greater than zero, that means setting the encoder.MaxBitrate and encoder.TargetBitrate to encoding.Bitrate.
For packetizers, that means setting packetizer.Deactivated to encoding.Deactivated.
- (double) videoSimulcastBitsPerPixel |
Gets the video simulcast bits per pixel (bpp).
The bits per pixel value must be greater than or equal to zero.
If the video source has declared a target width, height, and frame rate, and VideoSimulcastBitsPerPixel has a set value, then the encoding bitrates are calculated with setVideoSimulcastBitsPerPixel’s value instead of the preferred bitrate.
- (FMLiveSwitchVideoDegradationPreference) videoSimulcastDegradationPreference |
Gets the video’s simulcast degradation preference.
The following degradation preferences can be set:
Automatic: Prefers to automate degradation based on video type. A Screen video type prefers to degrade FrameRate. A Camera video type prefers to degrade Resolution. An unknown video type prefers a Balanced approach.
Balanced: Prefers to degrade both FrameRate and Resolution together in smaller increments.
FrameRate: Prefers to degrade FrameRate instead of Resolution.
Resolution: Prefers to degrade Resolution instead of FrameRate.
- (bool) videoSimulcastDisabled |
Gets whether video simulcast is disabled.
If true, video simulcast is disabled. If false, video simulcast is enabled.
- (int) videoSimulcastEncodingCount |
Gets the maximum number of simulcast encodings that this LocalMedia produces for the video stream.
The default value is 2. For LiveSwitch Media Server, the maximum is 4 encodings. This property must be set before the LocalMedia starts.
- (int) videoSimulcastPreferredBitrate |
Gets the preferred bitrate of a video simulcast in Kbps.
The bitrate must be a positive integer.
|
protected |