StreamIO Class

StreamIO Class

Description

A class used to connect streaming data from data stream producers (e.g., video, audio) to data stream consumers (e.g. RTSP, MP4 recording). Can be configured to duplicate a single data stream to multiple consumers, or to combine several data streams into a single consumer.

Syntax
class StreamIO

Members

Public Constructors 
StreamIO::StreamIOConstructs a StreamIO object
Public Methods 
StreamIO::beginStart streaming data from data producer to data consumer.
StreamIO::endStop streaming data from data producer to data consumer.
StreamIO::pausePause streaming data from data producer to data consumer.
StreamIO::resumeResume streaming data from data producer to data consumer.
StreamIO::registerInputRegister input data stream from a data producer.
StreamIO::registerInput1Register first input data stream from a data producer.
StreamIO::registerInput2Register second input data stream from a data producer.
StreamIO::registerInput3Register third input data stream from a data producer.
StreamIO::registerOutputRegister output data stream to a data consumer.
StreamIO::registerOutput1Register first output data stream to a data consumer.
StreamIO::registerOutput2Register second output data stream to a data consumer.
StreamIO::setStackSizeConfigure memory stack size available to StreamIO data processing task.
StreamIO::setTaskPriorityConfigure priority of StreamIO data processing task.

StreamIO::StreamIO

Description
A class used to connect streaming data from data stream producers (e.g., video, audio) to data stream consumers (e.g., RTSP, MP4 recording). Can be configured to duplicate a single data stream to multiple consumers, or to combine several data streams into a single consumer.

Syntax
StreamIO::StreamIO(uint8_t numInput, uint8_t numOutput)

Parameters
numInput: number of input data streams
numOutput: number of output data streams

Returns
NA

Example Code
Example: StreamRTSP/SingleVideoWithAudio
(https://github.com/ambiot/ambpro2_arduino/blob/dev/Arduino_package/hardware/libraries/Multimedia/examples/StreamRTSP/SingleVideoWithAudio/SingleVideoWithAudio.ino)

Notes and Warnings
“StreamIO.h” must be included to use the class function.

StreamIO::begin

Description
Start streaming data from data producer to data consumer.

Syntax
int begin(void);

Parameters
NA

Returns
NA

Example Code
Example: RecordMP4/SingleVideoWithAudio
(https://github.com/ambiot/ambpro2_arduino/blob/dev/Arduino_package/hardware/libraries/Multimedia/examples/RecordMP4/SingleVideoWithAudio/SingleVideoWithAudio.ino)

Notes and Warnings
This function should only be called after configuration of input and output data streams.
“StreamIO.h” must be included to use the class function.

StreamIO::end

Description
Stop streaming data from data producer to data consumer.

Syntax
void end(void);

Parameters
NA

Returns
NA

Example Code
NA

Notes and Warnings
“StreamIO.h” must be included to use the class function.

StreamIO::pause

Description
Pause streaming data from data producer to data consumer.

Syntax
void pause(void);

Parameters
NA

Returns
NA

Example Code
NA

Notes and Warnings
“StreamIO.h” must be included to use the class function.

StreamIO::resume

Description
Resume streaming data from data producer to data consumer.

Syntax
void resume(void);

Parameters
NA

Returns
NA

Example Code
NA

Notes and Warnings
“StreamIO.h” must be included to use the class function.

StreamIO::registerInput

Description
Register input data stream from a data producer.

Syntax
void registerInput(const MMFModule& module);

Parameters
module: data stream producer module.

Returns
NA

Example Code
Example: RecordMP4/SingleVideoWithAudio
(https://github.com/ambiot/ambpro2_arduino/blob/dev/Arduino_package/hardware/libraries/Multimedia/examples/RecordMP4/SingleVideoWithAudio/SingleVideoWithAudio.ino)

Notes and Warnings
When used on a multi-input StreamIO class, this has the same effect as calling registerInput1.
“StreamIO.h” must be included to use the class function.

StreamIO::registerInput1

Description
Register first input data stream from a data producer.

Syntax
void registerInput1(const MMFModule& module);

Parameters
module: data stream producer module.

Returns
NA

Example Code
Example: RecordMP4/SingleVideoWithAudio
(https://github.com/ambiot/ambpro2_arduino/blob/dev/Arduino_package/hardware/libraries/Multimedia/examples/RecordMP4/SingleVideoWithAudio/SingleVideoWithAudio.ino)

Notes and Warnings
When used on a single-input StreamIO class, this has the same effect as calling registerInput.
“StreamIO.h” must be included to use the class function.

StreamIO::registerInput2

Description
Register second input data stream from a data producer.

Syntax
void registerInput2(const MMFModule& module);

Parameters
module: data stream producer module.

Returns
NA

Example Code
Example: RecordMP4/SingleVideoWithAudio
(https://github.com/ambiot/ambpro2_arduino/blob/dev/Arduino_package/hardware/libraries/Multimedia/examples/RecordMP4/SingleVideoWithAudio/SingleVideoWithAudio.ino)

Notes and Warnings
When used on a single-input StreamIO class, this has the same effect as calling registerInput.
“StreamIO.h” must be included to use the class function.

StreamIO::registerInput3

Description
Register third input data stream from a data producer.

Syntax
void registerInput3(const MMFModule& module);

Parameters
module: data stream producer module.

Returns
NA

Example Code
Example: RecordMP4/SingleVideoWithAudio
(https://github.com/ambiot/ambpro2_arduino/blob/dev/Arduino_package/hardware/libraries/Multimedia/examples/RecordMP4/SingleVideoWithAudio/SingleVideoWithAudio.ino)

Notes and Warnings
When used on a single-input StreamIO class, this has the same effect as calling registerInput.
“StreamIO.h” must be included to use the class function.

StreamIO::registerOutput

Description
Register output data stream to a data consumer.

Syntax
void registerOutput(const MMFModule& module);

Parameters
module: data stream consumer module.

Returns
NA

Example Code
Example: RecordMP4/SingleVideoWithAudio
(https://github.com/ambiot/ambpro2_arduino/blob/dev/Arduino_package/hardware/libraries/Multimedia/examples/RecordMP4/SingleVideoWithAudio/SingleVideoWithAudio.ino)

Notes and Warnings
When used on a multi-output StreamIO class, this has the same effect as calling registerOutput1.
“StreamIO.h” must be included to use the class function.

StreamIO::registerOutput1

Description
Register first output data stream to a data consumer.

Syntax
void registerOutput1(const MMFModule& module);

Parameters
module: data stream consumer module.

Returns
NA

Example Code
Example: RecordMP4/SingleVideoWithAudio
(https://github.com/ambiot/ambpro2_arduino/blob/dev/Arduino_package/hardware/libraries/Multimedia/examples/RecordMP4/SingleVideoWithAudio/SingleVideoWithAudio.ino)

Notes and Warnings
When used on a single-output StreamIO class, this has the same effect as calling registerOutput.
“StreamIO.h” must be included to use the class function.

StreamIO::registerOutput2

Description
Register second output data stream to a data consumer.

Syntax
void registerOutput2(const MMFModule& module);

Parameters
module: data stream consumer module.

Returns
NA

Example Code
Example: RecordMP4/SingleVideoWithAudio
(https://github.com/ambiot/ambpro2_arduino/blob/dev/Arduino_package/hardware/libraries/Multimedia/examples/RecordMP4/SingleVideoWithAudio/SingleVideoWithAudio.ino)

Notes and Warnings
When used on a single-output StreamIO class, this has the same effect as calling registerOutput.
“StreamIO.h” must be included to use the class function.

StreamIO::setStackSize

Description
Configure memory stack size available to StreamIO data processing task.

Syntax
void setStackSize(void);

Parameters
NA

Returns
NA

Example Code
NA

Notes and Warnings
“StreamIO.h” must be included to use the class function.

StreamIO::setTaskPriority

Description
Configure priority of StreamIO data processing task.

Syntax
void setTaskPriority(void);

Parameters
NA

Returns
NA

Example Code
NA

Notes and Warnings
“StreamIO.h” must be included to use the class function.

请先确认已安装QQ通讯软体