WOWZStatus

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

Introduction

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



Methods

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

initWithEvent:


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

The WOWZEvent to use to initialize the object.

Return Value

An initialized WOWZStatus object.

Discussion

Initializes a WOWZStatus object with a specified event.


initWithState:


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

The state to use to initialize the object.

Return Value

An initialized WOWZStatus object.

Discussion

Initializes a WOWZStatus object with a specified state.


initWithState:event:


- (nonnull instancetype) initWithState:(WOWZState)aState 
        event:(WOWZEvent)event; 
Parameters
aState

The state to use to initialize the object.

event

The WOWZEvent to use to initialize the object.

Return Value

An initialized WZStatus object.

Discussion

Initializes a WOWZStatus object with a specified state and event.


initWithStateAndError:aError:


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

The state to use to initialize the object.

aError

The error to use to initialize the object.

Return Value

An initialized WOWZStatus object.

Discussion

Initializes a WOWZStatus object with a specified state and error.


resetStatus


- (void) resetStatus; 
Discussion

Reinitializes a WOWZStatus object, clearing all errors, events, and data values and setting the state to WOWZStateIdle.


resetStatusWithState:


- (void) resetStatusWithState:(WOWZState)aState; 
Parameters
aState

The state to use to initialize the object.

Discussion

Reinitializes a WOWZStatus object, clearing all errors, events, and data values and setting the state to the specified value.


statusWithEvent:


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

The WOWZEvent to use to initialize the object.

Return Value

An initialized WOWZStatus object.

Discussion

Returns a WOWZStatus object with a specified event.


statusWithState:


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

The state to use to initialize the object.

Return Value

An initialized WOWZStatus object.

Discussion

Returns a WOWZStatus object with a specified state.


statusWithState:event:


+ (nonnull instancetype) statusWithState:(WOWZState)aState 
        event:(WOWZEvent)event; 
Parameters
aState

The state to use to initialize the object.

event

The WOWZEvent to use to initialize the object.

Return Value

An initialized WOWZStatus object.

Discussion

Returns a WOWZStatus object with a specified state and event.


statusWithStateAndError:aError:


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

The state to use to initialize the object.

aError

The error to use to initialize the object.

Return Value

An initialized WOWZStatus object.

Discussion

Returns a WOWZStatus object with a specified state and error.


Typedefs

NS_ENUM
NS_ENUM
WOWZEvent
WOWZState

NS_ENUM


private

typedef NS_ENUM(NSUInteger, WOWZState) { WOWZStateIdle = 0, WOWZStateStarting, WOWZStateRunning, WOWZStateStopping, WOWZStateBuffering, WOWZStateReady };
Constants
WOWZStateIdle

The broadcasting component or session is idle.

WZStateStarting

The broadcasting component or session is starting.

WOWZStateRunning

The broadcasting component or session is broadcasting.

WOWZStateStopping

The broadcasting component or session is shutting down.

WOWZStateBuffering

The broadcasting component or session is buffering.

WOWZStateReady

The broadcasting component or session is ready or has been initialized.

Discussion

A collection of constants that describe the state of the broadcasting component or session.

See Also


NS_ENUM


private

typedef NS_ENUM(NSUInteger, WOWZEvent) { WOWZEventNone = 0, WOWZEventLowBandwidth, WOWZEventBitrateReduced, WOWZEventBitrateIncreased, WOWZEventEncoderPaused, WOWZEventEncoderResumed };
Constants
WOWZEventNone

No event.

WOWZEventLowBandwidth

If network bandwidth is insufficient for the specified video-broadcast settings, the encoder may attempt to compensate by sending a reduced bitrate or frame rate.

WOWZEventBitrateReduced

Sent when the encoder reduces the stream bitrate to compensate for low-bandwidth conditions. Changing the bitrate adds WOWZStatusNewBitrateKey and WOWZStatusPreviousBitrateKey, represented as NSNumber values, to the WOWZStatus class data dictionary.

WOWZEventBitrateIncreased

Sent when the encoder increases 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. Changing the bitrate adds WOWZStatusNewBitrateKey and WOWZStatusPreviousBitrateKey, represented as NSNumber values, to the WOWZStatus class data dictionary.

WOWZEventEncoderPaused

Sent when the encoder stops sending frames and waits for queued frames to catch up. Typically, the encoder pauses while it's reducing the bitrate to compensate for constrained network bandwidth.

WOWZEventEncoderResumed

Sent when a previously paused encoder resumes.

Discussion

A collection of constants that describe the component event.

See Also


WOWZEvent


private

typedef NS_ENUM(NSUInteger, WOWZEvent) { WOWZEventNone = 0, WOWZEventLowBandwidth, WOWZEventBitrateReduced, WOWZEventBitrateIncreased, WOWZEventEncoderPaused, WOWZEventEncoderResumed };
Constants
WOWZEventNone

No event.

WOWZEventLowBandwidth

If network bandwidth is insufficient for the specified video-broadcast settings, the encoder may attempt to compensate by sending a reduced bitrate or frame rate.

WOWZEventBitrateReduced

Sent when the encoder reduces the stream bitrate to compensate for low-bandwidth conditions. Changing the bitrate adds WOWZStatusNewBitrateKey and WOWZStatusPreviousBitrateKey, represented as NSNumber values, to the WOWZStatus class data dictionary.

WOWZEventBitrateIncreased

Sent when the encoder increases 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. Changing the bitrate adds WOWZStatusNewBitrateKey and WOWZStatusPreviousBitrateKey, represented as NSNumber values, to the WOWZStatus class data dictionary.

WOWZEventEncoderPaused

Sent when the encoder stops sending frames and waits for queued frames to catch up. Typically, the encoder pauses while it's reducing the bitrate to compensate for constrained network bandwidth.

WOWZEventEncoderResumed

Sent when a previously paused encoder resumes.

Discussion

A collection of constants that describe the component event.

See Also


WOWZState


private

typedef NS_ENUM(NSUInteger, WOWZState) { WOWZStateIdle = 0, WOWZStateStarting, WOWZStateRunning, WOWZStateStopping, WOWZStateBuffering, WOWZStateReady };
Constants
WOWZStateIdle

The broadcasting component or session is idle.

WZStateStarting

The broadcasting component or session is starting.

WOWZStateRunning

The broadcasting component or session is broadcasting.

WOWZStateStopping

The broadcasting component or session is shutting down.

WOWZStateBuffering

The broadcasting component or session is buffering.

WOWZStateReady

The broadcasting component or session is ready or has been initialized.

Discussion

A collection of constants that describe the state of the broadcasting component or session.

See Also


Properties

data
error
event
hasError
isIdle
isReady
isRunning
isStarting
isStopping
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) WOWZEvent event; 
Discussion

The event used by the broadcast session.


hasError


@property (readonly,
    nonatomic) BOOL hasError; 
Return Value

True if the error is non-null; false otherwise.

Discussion

See if the error is non-null.


isIdle


@property (readonly,
    nonatomic) BOOL isIdle; 
Return Value

True if the state is WOWZStateIdle; false otherwise.

Discussion

See if the state equals WOWZStateIdle.


isReady


@property (readonly,
    nonatomic) BOOL isReady; 
Return Value

True if the state is WOWZStateReady; false otherwise.

Discussion

See if the state equals WOWZStateReady.


isRunning


@property (readonly,
    nonatomic) BOOL isRunning; 
Return Value

True if the state is WOWZStateRunning; false otherwise.

Discussion

See if the state equals WOWZStateRunning.


isStarting


@property (readonly,
    nonatomic) BOOL isStarting; 
Return Value

True if the state is WOWZStateStarting; false otherwise.

Discussion

See if the state equals WOWZStateStarting. `


isStopping


@property (readonly,
    nonatomic) BOOL isStopping; 
Return Value

True if the state is WOWZStateStopping; false otherwise.

Discussion

See if the state equals WOWZStateStopping.


state


@property (nonatomic) WOWZState state; 
Discussion

The state of the broadcast session.