WZStatus

Conforms to:
NSMutableCopying, NSCopying
Superclass:
NSObject
Declared In:

Introduction

The WZStatus is a thread-safe class for working with SDK component state and error properties. Client applications don't normally have any need for creating a WZStatus object.



Methods

-initWithEvent:
-initWithState:
-initWithState:event:
-initWithStateAndError:aError:
+statusWithEvent:
+statusWithState:
+statusWithState:event:
+statusWithStateAndError:aError:

initWithEvent:


- (nonnull instancetype) initWithEvent:(WZEvent)event; 
Parameters
event

The WZEvent to initialize with

Return Value

An initialized WZStatus object

Discussion

Initialize a WZStatus object with a given event


initWithState:


- (nonnull instancetype) initWithState:(WZState)aState; 
Parameters
aState

The state to initialize with

Return Value

An initialized WZStatus object

Discussion

Initialize a WZStatus object with a given state


initWithState:event:


- (nonnull instancetype) initWithState:(WZState)aState event:(WZEvent)event; 
Parameters
aState

The state to initialize with

event

The WZEvent to initialize with

Return Value

An initialized WZStatus object

Discussion

Initialize a WZStatus object with a given state and event


initWithStateAndError:aError:


- (nonnull instancetype) initWithStateAndError:(WZState)aState 
        aError:(nonnull NSError *)aError; 
Parameters
aState

The state to initialize with

aError

The error to initialzie with

Return Value

An initialized WZStatus object

Discussion

Initialize a WZStatus object with a given state and error


statusWithEvent:


+ (nonnull instancetype) statusWithEvent:(WZEvent)event; 
Parameters
event

The WZEvent to initialize with

Return Value

An initialized WZStatus object

Discussion

Returns a WZStatus object with a given event


statusWithState:


+ (nonnull instancetype) statusWithState:(WZState)aState; 
Parameters
aState

The state to initialize with

Return Value

An initialized WZStatus object

Discussion

Returns a WZStatus object with a given state


statusWithState:event:


+ (nonnull instancetype) statusWithState:(WZState)aState 
        event:(WZEvent)event; 
Parameters
aState

The state to initialize with

event

The WZEvent to initialize with

Return Value

An initialized WZStatus object

Discussion

Returns a WZStatus object with a given state and event


statusWithStateAndError:aError:


+ (nonnull instancetype) statusWithStateAndError:(WZState)aState 
        aError:(nonnull NSError *)aError; 
Parameters
aState

The state to initialize with

aError

The error to initialzie with

Return Value

An initialized WZStatus object

Discussion

Returns a WZStatus object with a given state and error


Typedefs

NS_ENUM
NS_ENUM
WZEvent
WZState

NS_ENUM


private

typedef NS_ENUM(NSUInteger, WZState) { WZStateIdle = 0, WZStateStarting, WZStateRunning, WZStateStopping, WZStateBuffering };
Constants
WZStateIdle

The broadcasting or playback session is idle; i.e. not broadcasting.

WZStateStarting

The broadcasting or playback session is starting up.

WZStateRunning

The broadcasting or playback session is broadcasting or playing.

WZStateStopping

The broadcasting or playback session is shutting down.

WZStateBuffering

The playback session is buffering.

Discussion

The component state values.

See Also


NS_ENUM


private

typedef NS_ENUM(NSUInteger, WZEvent) { WZEventNone = 0, WZEventLowBandwidth, WZEventBitrateReduced, WZEventBitrateIncreased, WZEventEncoderPaused, WZEventEncoderResumed };
Constants
WZEventNone

No event.

WZEventLowBandwidth

Network bandwidth was insufficient to keep up with the video broadcast settings. In this case, the encoder may attempt to recover by reducing bitrate and/or frame rate.

WZEventBitrateReduced

Sent when the encoder reduces the bitrate to compensate for low bandwidth conditions. The WZStatus' data dictionary in this case will contain 2 keys with associated NSNumber values: WZStatusNewBitrateKey and WZStatusPreviousBitrateKey.

WZEventBitrateIncreased

Sent when the encoder increases the the bitrate after having previously reduced it. The bitrate will never increase beyond the original bitrate specified in the configuration settings for the streaming session. The WZStatus' data dictionary in this case will contain 2 keys with associated NSNumber values: WZStatusNewBitrateKey and WZStatusPreviousBitrateKey.

WZEventEncoderPaused

Sent when the encoder stops sending frames while waiting for queued frames to catch up. Typically, this would happen while the encoder is simultaneously reducing the bitrate to compensate for low bandwidth conditions.

WZEventEncoderResumed

Sent when a previously paused encoder resumes.

Discussion

The component event values.

See Also


WZEvent


private

typedef NS_ENUM(NSUInteger, WZEvent) { WZEventNone = 0, WZEventLowBandwidth, WZEventBitrateReduced, WZEventBitrateIncreased, WZEventEncoderPaused, WZEventEncoderResumed };
Constants
WZEventNone

No event.

WZEventLowBandwidth

Network bandwidth was insufficient to keep up with the video broadcast settings. In this case, the encoder may attempt to recover by reducing bitrate and/or frame rate.

WZEventBitrateReduced

Sent when the encoder reduces the bitrate to compensate for low bandwidth conditions. The WZStatus' data dictionary in this case will contain 2 keys with associated NSNumber values: WZStatusNewBitrateKey and WZStatusPreviousBitrateKey.

WZEventBitrateIncreased

Sent when the encoder increases the the bitrate after having previously reduced it. The bitrate will never increase beyond the original bitrate specified in the configuration settings for the streaming session. The WZStatus' data dictionary in this case will contain 2 keys with associated NSNumber values: WZStatusNewBitrateKey and WZStatusPreviousBitrateKey.

WZEventEncoderPaused

Sent when the encoder stops sending frames while waiting for queued frames to catch up. Typically, this would happen while the encoder is simultaneously reducing the bitrate to compensate for low bandwidth conditions.

WZEventEncoderResumed

Sent when a previously paused encoder resumes.

Discussion

The component event values.

See Also


WZState


private

typedef NS_ENUM(NSUInteger, WZState) { WZStateIdle = 0, WZStateStarting, WZStateRunning, WZStateStopping, WZStateBuffering };
Constants
WZStateIdle

The broadcasting or playback session is idle; i.e. not broadcasting.

WZStateStarting

The broadcasting or playback session is starting up.

WZStateRunning

The broadcasting or playback session is broadcasting or playing.

WZStateStopping

The broadcasting or playback session is shutting down.

WZStateBuffering

The playback session is buffering.

Discussion

The component state values.

See Also


Properties

data
error
event
state

data


@property (nonatomic,
    strong,
    nullable) NSDictionary * data; 
Discussion

Data related to the status. May be null.


error


@property (nonatomic,
    strong,
    nullable) NSError * error; 
Discussion

The last error reported by the broadcast session.


event


@property (nonatomic) WZEvent event; 
Discussion

The current state of the broadcast session


state


@property (nonatomic) WZState state; 
Discussion

The current state of the broadcast session