class DataSource

A data source More...

Full nameTelEngine::DataSource
Definition#include <telephony.h>
InheritsTelEngine::DataNode [public ]
Inherited byThreadedSource
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods

Protected Members


Detailed Description

A data source

 DataSource (const char *format = "slin")

DataSource

Source constructor

Parameters:
formatName of the data format, default "slin" (Signed Linear)

 ~DataSource ()

~DataSource

Source's destructor - detaches all consumers

void  Forward (const DataBlock &data, unsigned long timeDelta = 0)

Forward

Forwards the data to its consumers

Parameters:
dataThe raw data block to forward; an empty block ends data
timeDeltaTimestamp increment of data - typically samples

bool  attach (DataConsumer *consumer)

attach

Attach a data consumer

Parameters:
consumerData consumer to attach

Returns: True on success, false on failure

bool  detach (DataConsumer *consumer)

detach

Detach a data consumer

Parameters:
consumerData consumer to detach

Returns: True on success, false on failure

inline void  clear ()

clear

Detach all data consumers

DataTranslator * getTranslator ()

getTranslator

[const]

Get the master translator object if this source is part of a translator

Returns: A pointer to the DataTranslator object or NULL

inline void  setTranslator (DataTranslator *translator)

setTranslator

[protected]

The current position in the data - format dependent, usually samples

DataTranslator * m_translator

m_translator

[protected]

ObjList m_consumers

m_consumers

[protected]

Mutex m_mutex

m_mutex

[protected]


Generated by: kk on nyx on Sat Jun 4 19:29:41 2005, using kdoc 2.0a54.