Logo Search packages:      
Sourcecode: libffado version File versions  Download package

Streaming::StreamProcessorManager Class Reference

#include <StreamProcessorManager.h>

Inheritance diagram for Streaming::StreamProcessorManager:

List of all members.


Detailed Description

Manages a collection of StreamProcessors and provides a synchronisation interface.

Definition at line 52 of file StreamProcessorManager.h.


Public Types

enum  eActivityResult { eAR_Activity, eAR_Timeout, eAR_Interrupted, eAR_Error }
enum  eADT_AudioDataType { eADT_Int24, eADT_Float }
typedef std::vector< Option >
::iterator 
iterator

Public Member Functions

iterator begin ()
int countOptions ()
void dumpInfo ()
iterator end ()
int getActivityWaitTimeoutUsec ()
enum eADT_AudioDataType getAudioDataType ()
int getDelayedUsecs ()
unsigned int getNbBuffers ()
unsigned int getNominalRate ()
bool getOption (std::string name, uint8_t &v)
bool getOption (std::string name, int8_t &v)
bool getOption (std::string name, uint16_t &v)
bool getOption (std::string name, int16_t &v)
bool getOption (std::string name, uint32_t &v)
bool getOption (std::string name, int32_t &v)
bool getOption (std::string name, uint64_t &v)
bool getOption (std::string name, int64_t &v)
bool getOption (std::string name, float &v)
bool getOption (std::string name, double &v)
bool getOption (std::string name, bool &v)
bool getOption (std::string name, std::string &v)
Option::EType getOptionType (std::string name)
unsigned int getPeriodSize ()
PortgetPortByIndex (int idx, enum Port::E_Direction)
int getPortCount (enum Port::E_Direction)
int getPortCount (enum Port::E_PortType, enum Port::E_Direction)
StreamProcessorgetSyncSource ()
uint64_t getTimeOfLastTransfer ()
int getXrunCount ()
bool handleXrun ()
 reset the streams & buffers after xrun
bool hasOption (std::string name)
void lockWaitLoop ()
bool prepare ()
 to be called after the processors are registered
bool registerProcessor (StreamProcessor *processor)
 start managing a streamprocessor
void setActivityWaitTimeoutUsec (int usec)
bool setAudioDataType (enum eADT_AudioDataType t)
void setNbBuffers (unsigned int nb_buffers)
void setNominalRate (unsigned int r)
bool setOption (std::string name, uint8_t v)
bool setOption (std::string name, int8_t v)
bool setOption (std::string name, uint16_t v)
bool setOption (std::string name, int16_t v)
bool setOption (std::string name, uint32_t v)
bool setOption (std::string name, int32_t v)
bool setOption (std::string name, uint64_t v)
bool setOption (std::string name, int64_t v)
bool setOption (std::string name, double v)
bool setOption (std::string name, bool v)
bool setOption (std::string name, std::string v)
void setPeriodSize (unsigned int period)
bool setSyncSource (StreamProcessor *s)
bool setThreadParameters (bool rt, int priority)
virtual void setVerboseLevel (int l)
bool shutdownNeeded ()
void signalActivity ()
bool start ()
bool startDryRunning ()
bool stop ()
 StreamProcessorManager (DeviceManager &parent, unsigned int period, unsigned int rate, unsigned int nb_buffers)
 StreamProcessorManager (DeviceManager &parent)
bool syncStartAll ()
bool transfer (enum StreamProcessor::eProcessorType)
 Transfer one period of frames for either the receive or transmit StreamProcessors.
bool transfer ()
 Transfer one period of frames for both receive and transmit StreamProcessors.
void unlockWaitLoop ()
bool unregisterProcessor (StreamProcessor *processor)
 stop managing a streamprocessor
enum eActivityResult waitForActivity ()
bool waitForPeriod ()
 Waits until the next period of samples is ready.
bool xrunOccurred ()

Protected Member Functions

bool addOption (Option o)
void clearOptions ()
Option getOption (std::string name)
bool hasOption (Option o)
bool removeOption (std::string name)
bool removeOption (Option o)
bool serializeOptions (std::string basePath, Util::IOSerialize &ser) const
bool setOption (Option o)
void updateShadowLists ()

Static Protected Member Functions

static bool deserializeOptions (std::string basePath, Util::IODeserialize &deser, OptionContainer &container)

Protected Attributes

 DECLARE_DEBUG_MODULE
sem_t m_activity_semaphore
int64_t m_activity_wait_timeout_nsec
enum eADT_AudioDataType m_audio_datatype
PortVector m_CapturePorts_shadow
unsigned int m_nb_buffers
unsigned int m_nbperiods
unsigned int m_nominal_framerate
DeviceManager & m_parent
unsigned int m_period
PortVector m_PlaybackPorts_shadow
StreamProcessorVector m_ReceiveProcessors
bool m_shutdown_needed
unsigned int m_sync_delay
int m_thread_priority
bool m_thread_realtime
StreamProcessorVector m_TransmitProcessors
Util::Mutexm_WaitLock
bool m_xrun_happened
unsigned int m_xruns

Private Member Functions

bool alignReceivedStreams ()
bool transferSilence (enum StreamProcessor::eProcessorType)
 Transfer one period of silence for either the receive or transmit StreamProcessors.
bool transferSilence ()
 Transfer one period of silence for both receive and transmit StreamProcessors.

Private Attributes

int m_delayed_usecs
bool m_is_slave
StreamProcessorm_SyncSource
uint64_t m_time_of_transfer

Friends

class StreamProcessor

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

Generated by  Doxygen 1.6.0   Back to index