The Streaming class can be used to stream audio data.
More...
#include <Driver/DriverComponents/Streaming.h>
The Streaming class can be used to stream audio data.
Definition at line 22 of file Streaming.h.
◆ Streaming()
| Streaming::Streaming |
( |
pMessageProcessor |
messageProcessor | ) |
|
◆ addNewBufferCallback()
| std::shared_ptr< std::function< void(void)> > Streaming::addNewBufferCallback |
( |
const std::function< void()> & |
newBufferCallback | ) |
|
addNewBufferCallback Adds callback that is called when a new buffer is recieved
- Parameters
-
| newBufferCallback | callback to call when a new buffer is recieved |
Definition at line 62 of file Streaming.cpp.
◆ addStreamStartedCallback()
| std::shared_ptr< std::function< void()> > Streaming::addStreamStartedCallback |
( |
const std::function< void()> & |
callback | ) |
|
◆ addStreamStoppedCallback()
| std::shared_ptr< std::function< void()> > Streaming::addStreamStoppedCallback |
( |
const std::function< void()> & |
callback | ) |
|
◆ handleNewDataRecieved()
| void Streaming::handleNewDataRecieved |
( |
const google::protobuf::Message & |
message | ) |
|
|
protected |
◆ handleStartStreamRecieved()
| void Streaming::handleStartStreamRecieved |
( |
const google::protobuf::Message & |
message | ) |
|
|
protected |
◆ handleStopStreamRecieved()
| void Streaming::handleStopStreamRecieved |
( |
const google::protobuf::Message & |
message | ) |
|
|
protected |
◆ isStreaming()
| bool Streaming::isStreaming |
( |
| ) |
const |
isStreaming Check if there is an running data stream
- Returns
- returns true if the stream is streaming
Definition at line 38 of file Streaming.cpp.
◆ nextQueuedBuffer()
| DataBuffer Streaming::nextQueuedBuffer |
( |
| ) |
|
nextQueuedBuffer Gets the next queued buffer from m_dataQueue
- Returns
- next queued buffer
Definition at line 51 of file Streaming.cpp.
◆ pendingBufferCount()
| size_t Streaming::pendingBufferCount |
( |
| ) |
|
pendingBufferCount Gets the amount of queued Databuffers
- Returns
- the amount of queued DataBuffers
Definition at line 46 of file Streaming.cpp.
◆ removeNewBufferCallback()
| bool Streaming::removeNewBufferCallback |
( |
std::shared_ptr< std::function< void(void)>> |
callback | ) |
|
◆ removeStreamStartedCallback()
| bool Streaming::removeStreamStartedCallback |
( |
std::shared_ptr< std::function< void(void)>> |
callback | ) |
|
◆ removeStreamStoppedCallback()
| bool Streaming::removeStreamStoppedCallback |
( |
std::shared_ptr< std::function< void(void)>> |
callback | ) |
|
◆ reset()
| void Streaming::reset |
( |
| ) |
|
|
virtual |
◆ start()
| void Streaming::start |
( |
| ) |
|
start Start the audio stream
Definition at line 9 of file Streaming.cpp.
◆ stop()
◆ transmit()
| void Streaming::transmit |
( |
const DataBuffer & |
dataBuffer | ) |
|
transmit Transmits a databuffer
- Parameters
-
| dataBuffer | databuffer to transmit |
Definition at line 42 of file Streaming.cpp.
◆ m_dataQueue
| std::queue<DataBuffer> Streaming::m_dataQueue |
|
private |
◆ m_dataQueueMutex
| std::mutex Streaming::m_dataQueueMutex |
|
private |
◆ m_isStreaming
| std::atomic_bool Streaming::m_isStreaming |
|
private |
◆ m_newBufferCallbackHandler
◆ m_streamStartedCallbackHandler
◆ m_streamStoppedCallbackHandler
◆ m_totalBufferCount
| std::atomic<size_t> Streaming::m_totalBufferCount |
|
private |