Home2L - C/C++ API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
Enumerations | Functions
Streamer

Description

Wrapper for media streaming functionality (audio via GStreamer).

Collaboration diagram for Streamer:

Enumerations

enum  EStreamerState { strOff = 0 , strError , strBusy , strOn }
 State of the streamer. More...
 

Functions

static bool StreamerStateIsActive (EStreamerState s)
 Active states are those requiring eventual calls to 'StreamerIterate'. 'StreamerStop' reliably switches to an inactive state.
 
const char * StreamerGetError (CString *s)
 Return readable error message and reset the text internally.
 
int StreamerGetDbLevel ()
 Return the current level in DB (<= 0, 0 = maximum) or STREAMER_LEVEL_UNKNOWN (= -INT_MAX / very, very silent), if the level is unknown. More...
 

Enumeration Type Documentation

◆ EStreamerState

State of the streamer.

Enumerator
strOff 

No background thread, hands off the audio device.

strError 

Connection failed or other error.

strBusy 

Connecting or buffering.

strOn 

Audio should be hearable.

Definition at line 37 of file streamer.H.

Function Documentation

◆ StreamerGetDbLevel()

int StreamerGetDbLevel ( )

Return the current level in DB (<= 0, 0 = maximum) or STREAMER_LEVEL_UNKNOWN (= -INT_MAX / very, very silent), if the level is unknown.

Level measurement is activated by the first call to this function, and deactivated again in 'StreamerStop ()'. The first call will most probably return STREAMER_LEVEL_UNKNOWN. When activated, additional CPU load and power consumption may occur.