arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
audio_tools::RTSPSourceStream Class Reference

Simple Facade which can turn any Stream into a IAudioSource. This way we can e.g. use an I2SStream as source to stream data. More...

#include <MicroRTSPAudio.h>

Inheritance diagram for audio_tools::RTSPSourceStream:

Public Member Functions

 RTSPSourceStream (Stream &stream, AudioBaseInfo info)
 Construct a new RTSPStreamSource object from an Arduino Stream You need to provide the audio information by calling setAudioInfo() More...
 
 RTSPSourceStream (Stream &stream, RTSPFormat &format)
 Construct a new RTSPStreamSource object from an Arduino Stream You need to provide the audio information by calling setAudioInfo() More...
 
virtual RTSPFormat * getFormat () override
 
virtual int readBytes (void *dest, int byteCount) override
 
virtual void setAudioInfo (AudioBaseInfo 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. More...
 
void setFragmentSize (int fragmentSize)
 
void setTimerPeriod (int period)
 
virtual void start () override
 
virtual void stop () override
 

Protected Attributes

bool active = true
 
RTSPFormatPCM format {rtp_info}
 
Streamp_stream = nullptr
 
RTPPCMAudioInfo rtp_info
 

Detailed Description

Simple Facade which can turn any Stream into a IAudioSource. This way we can e.g. use an I2SStream as source to stream data.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ RTSPSourceStream() [1/2]

audio_tools::RTSPSourceStream::RTSPSourceStream ( Stream stream,
AudioBaseInfo  info 
)
inline

Construct a new RTSPStreamSource object from an Arduino Stream You need to provide the audio information by calling setAudioInfo()

Parameters
stream
info

◆ RTSPSourceStream() [2/2]

audio_tools::RTSPSourceStream::RTSPSourceStream ( Stream stream,
RTSPFormat &  format 
)
inline

Construct a new RTSPStreamSource object from an Arduino Stream You need to provide the audio information by calling setAudioInfo()

Parameters
stream
format

Member Function Documentation

◆ readBytes()

virtual int audio_tools::RTSPSourceStream::readBytes ( void *  dest,
int  byteCount 
)
inlineoverridevirtual

(Reads and) Copies up to maxSamples samples into the given buffer

Returns
actual number of samples that were copied

◆ setAudioInfo()

virtual void audio_tools::RTSPSourceStream::setAudioInfo ( AudioBaseInfo  info)
inlinevirtual

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
info

◆ start()

virtual void audio_tools::RTSPSourceStream::start ( )
inlineoverridevirtual

Start preparing data in order to provide it for the stream

◆ stop()

virtual void audio_tools::RTSPSourceStream::stop ( )
inlineoverridevirtual

Stop preparing data as the stream has ended


The documentation for this class was generated from the following file: