WOWZVideoSink

Extends Protocol:
Declared In:

Introduction

WOWZVideoSink defines a protocol for callbacks that occur when video frames are captured.



Methods

-videoCaptureInterruptionEnded
-videoCaptureInterruptionStarted
-videoCaptureUsingQueue:
-videoFrameWasCaptured:framePresentationTime:frameDuration:

videoCaptureInterruptionEnded


@optional

- (void) videoCaptureInterruptionEnded;
Discussion

Called at the end of an interruption to an active video-capture session, which typically occurs when the application returns to the foreground after being in the background. iOS doesn't allow the camera to capture frames when the application is in the background, so when the application transitions out of the foreground, broadcasting is suspended. The SDK will attempt to restart the broadcast when the interruption ends (when the application returns to the foreground), unless the client application has stopped the broadcast. Client applications should implement Apple's applicationWillResignActive and/or applicationDidEnterBackground methods in the UIApplicationDelegate protocol and stop the broadcast accordingly.


videoCaptureInterruptionStarted


@optional

- (void) videoCaptureInterruptionStarted;
Discussion

Called at the beginning of an interruption to an active video-capture session, which typically occurs when the application exits the foreground. iOS doesn't allow the camera to capture frames when the application is in the background, so when the application transitions out of the foreground, broadcasting is suspended. The SDK will attempt to restart the broadcast when the interruption ends (when the application returns to the foreground), unless the client application has stopped the broadcast. Client applications should implement Apple's applicationWillResignActive and/or applicationDidEnterBackground methods in the UIApplicationDelegate protocol and stop the broadcast accordingly.


videoCaptureUsingQueue:


@optional

- (void) videoCaptureUsingQueue:(nullable dispatch_queue_t)queue;
Discussion

Called when the capture device internally sets the video-capture queue. Clients can synchronize operations on this queue if it's non-null.


videoFrameWasCaptured:framePresentationTime:frameDuration:


@required

- (void) videoFrameWasCaptured:(nonnull CVImageBufferRef)imageBuffer framePresentationTime:(CMTime)framePresentationTime frameDuration:(CMTime)frameDuration;
Parameters
imageBuffer

The image data. Pixel format should be kCVPixelFormatType_32BGRA.

framePresentationTime

The relative presentation time for this frame. Use when frameDuration is kCMTimeInvalid. The protocol implementer should infer the presentation time based on the time that the frame is delivered. The WOWZH264Encoder works this way.

frameDuration

The duration of the frame. Use kCMTimeInvalid for default duration.

Discussion

Called for each frame of unencoded video.