IOVideoStream

Inherits from
IOStream
Availability
Available in OS X v10.7 and later.
Declared in
IOVideoStream.h

Overview

A class representing a stream of video data buffers passed from kernel to user space and back again.

The IOVideoStream class defines a mechanism for moving buffers of data from kernel space to user space or vice-versa. The policy for which direction the data flows and the nature of the data is left up the the implementer of the driver which uses IOStream.

Although it is expected that the client of an IOVideoStream will be in user space, this is not required.

References to "output" mean "from the IOVideoStream to the user client", and "input" means "from the user client to the IOVideoStream."

Tasks

Miscellaneous

Instance Methods

getStreamMode

Returns the mode of the stream, either input or output.

virtual IOStreamMode getStreamMode( void);
Return Value

The mode of the stream, either kIOStreamModeInput (from user space to kernel space) or the default kIOStreamModeOutput (from kernel space to user space).

initWithBuffers

virtual bool initWithBuffers( OSArray *buffers, IOStreamMode mode = kIOStreamModeOutput, IOItemCount queueLength = 0, OSDictionary *properties = 0);
Parameters
buffers

An array of IOStreamBuffer objects which will be the buffers for this stream.

mode

The initial mode of the video stream, either output, input, or input/output.

queueLength

The nuber of queue entries to reserve in the input and output queue. Zero means to make the queues big enough to accommodate all the buffers at once.

properties

A dictionary of properties which will be set on the video stream.

setStreamMode

Sets the mode of the stream, either input or output.

virtual IOReturn setStreamMode( IOStreamMode mode);

startStream

Start sending data on a stream.

virtual IOReturn startStream( void);
Return Value

Returns kIOReturnSuccess if the stream was successfully started.

stopStream

Stop sending data on a stream.

virtual IOReturn stopStream( void);
Return Value

Returns kIOReturnSuccess if the stream was successfully started.

suspendStream

Temporarily suspend data flow on the stream.

virtual IOReturn suspendStream( void);
Return Value

Returns kIOReturnSuccess if the stream was successfully suspended.

withBuffers

static IOVideoStream* withBuffers( OSArray *buffers, IOStreamMode mode = kIOStreamModeOutput, IOItemCount queueLength = 0, OSDictionary *properties = 0);
Parameters
buffers

An array of IOStreamBuffer objects which will be the buffers for this stream.

mode

The initial mode of the video stream, either output, input, or input/output.

queueLength

The nuber of queue entries to reserve in the input and output queue. Zero means to make the queues big enough to accommodate all the buffers at once.

properties

A dictionary of properties which will be set on the video stream.