Simple Facade which can turn AudioStream into a IAudioSource. This way we can e.g. use an I2SStream as source to stream data Depends on the https://github.com/pschatzmann/Micro-RTSP-Audio/ library.
More...
#include <RTSP.h>
|
| RTSPSourceFromAudioStream (AudioStream &stream) |
| Construct a new RTSPOutputSource object from an AudioStream.
|
|
| RTSPSourceFromAudioStream (AudioStream &stream, RTSPFormat &format) |
|
virtual RTSPFormat * | getFormat () override |
|
bool | isActive () |
|
bool | isStarted () |
| Returns true after start() has been called.
|
|
virtual int | readBytes (void *dest, int byteCount) override |
|
virtual void | setAudioInfo (AudioInfo info) |
| Set the Audio Info. This needs to be called if we just pass a Stream. The AudioStream is usually able to provide the data from it's original configuration.
|
|
void | setFragmentSize (int fragmentSize) |
|
void | setInput (AudioStream &stream) |
|
void | setTimerPeriod (int period) |
|
virtual void | start () override |
|
virtual void | stop () override |
|
Simple Facade which can turn AudioStream into a IAudioSource. This way we can e.g. use an I2SStream as source to stream data Depends on the https://github.com/pschatzmann/Micro-RTSP-Audio/ library.
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ RTSPSourceFromAudioStream()
Construct a new RTSPOutputSource object from an AudioStream.
- Parameters
-
◆ isActive()
The active state is determined by checking if we are still getting actual read calls;
◆ readBytes()
virtual int readBytes |
( |
void * |
dest, |
|
|
int |
byteCount |
|
) |
| |
|
inlineoverridevirtual |
(Reads and) Copies up to maxSamples samples into the given buffer
- Parameters
-
dest | Buffer into which the samples are to be copied |
maxSamples | maximum number of samples to be copied |
- Returns
- actual number of samples that were copied
◆ setAudioInfo()
Set the Audio Info. This needs to be called if we just pass a Stream. The AudioStream is usually able to provide the data from it's original configuration.
- Parameters
-
◆ start()
Start preparing data in order to provide it for the stream
◆ stop()
Stop preparing data as the stream has ended
The documentation for this class was generated from the following file:
- src/AudioTools/AudioLibs/RTSP.h