13 #ifndef _MprVoiceActivityNotifier_h_ 14 #define _MprVoiceActivityNotifier_h_ 51 int notificationPeriodMs = smDefaultLevelPeriodMs,
52 int inactivityTimeoutMs = smDefaultInactivityTimeoutMs);
73 int notificationPeriodMs);
79 int inactivityTimeoutMs);
149 #endif // _MprVoiceActivityNotifier_h_ UtlBoolean handleMessage(MpResourceMsg &rMsg)
Handles an incoming flowgraph message for this media processing object.
Definition: MprVoiceActivityNotifier.cpp:166
Message object used to communicate with the media processing task.
Definition: MpResourceMsg.h:30
Definition: MpVadBase.h:40
int mEnergyLevelMax
Maximum of the energy level since the last notification.
Definition: MprVoiceActivityNotifier.h:118
Definition: MpResourceMsg.h:56
int mInactivitySamples
Number of samples since last active packet.
Definition: MprVoiceActivityNotifier.h:117
Definition: MprVoiceActivityNotifier.h:103
int mLevelPeriodSmp
Number of samples between level notifications.
Definition: MprVoiceActivityNotifier.h:113
Voice Activity notifier resource.
Definition: MprVoiceActivityNotifier.h:35
Flow graph for coordinating the execution of media processing resources.
Definition: MpFlowGraphBase.h:91
static const int smDefaultLevelPeriodMs
Default period (in ms) to send energy level notifications.
Definition: MprVoiceActivityNotifier.h:41
static OsStatus changeInactivityTimeout(const UtlString &namedResource, OsMsgQ &fgQ, int inactivityTimeoutMs)
Change duration of silence (in ms) before STOPPED notification is sent.
Definition: MprVoiceActivityNotifier.cpp:70
int mLevelPeriodMs
Number of milliseconds between level notifications.
Definition: MprVoiceActivityNotifier.h:112
UtlBoolean handleChangeInactivityTimeout(int timeout)
Handle MPRM_CHANGE_INACTIVITY_TIMEOUT message.
Definition: MprVoiceActivityNotifier.cpp:199
~MprVoiceActivityNotifier()
Destructor.
Definition: MprVoiceActivityNotifier.cpp:52
int mLevelSamplesPassed
Number of samples since last level notification.
Definition: MprVoiceActivityNotifier.h:114
Abstract base class for all audio processing objects.
Definition: MpAudioResource.h:38
int mInactivityTimeoutMs
Number of milliseconds of silence before STOP notification.
Definition: MprVoiceActivityNotifier.h:115
static const int smDefaultInactivityTimeoutMs
Default duration of silence (in ms) before STOPPED notification is sent.
Definition: MprVoiceActivityNotifier.h:43
Definition: MprVoiceActivityNotifier.h:109
MprVoiceActivityNotifier(const UtlString &rName, int notificationPeriodMs=smDefaultLevelPeriodMs, int inactivityTimeoutMs=smDefaultInactivityTimeoutMs)
Constructor.
Definition: MprVoiceActivityNotifier.cpp:37
StreamState
Definition: MprVoiceActivityNotifier.h:106
Definition: MprVoiceActivityNotifier.h:108
OsStatus setFlowGraph(MpFlowGraphBase *pFlowGraph)
Associates this resource with the indicated flow graph.
Definition: MprVoiceActivityNotifier.cpp:210
Smart pointer to MpBuf.
Definition: MpBuf.h:160
UtlBoolean handleChangeNotificationPeriod(int periodMs)
Handle MPRM_CHANGE_NOTIFICATION_PERIOD message.
Definition: MprVoiceActivityNotifier.cpp:188
static OsStatus chageNotificationPeriod(const UtlString &namedResource, OsMsgQ &fgQ, int notificationPeriodMs)
Change period between energy level notifications.
Definition: MprVoiceActivityNotifier.cpp:60
UtlBoolean doProcessFrame(MpBufPtr inBufs[], MpBufPtr outBufs[], int inBufsSize, int outBufsSize, UtlBoolean isEnabled, int samplesPerFrame, int samplesPerSecond)
This method does the real work for the media processing resource and must be defined in each class de...
Definition: MprVoiceActivityNotifier.cpp:86
int mInactivityTimeoutSmp
Number of samples of silence before STOP notification.
Definition: MprVoiceActivityNotifier.h:116
Definition: MprVoiceActivityNotifier.h:102
UtlBoolean isEnabled() const
Returns TRUE is this resource is currently enabled, FALSE otherwise.
Definition: MpResource.cpp:440
StreamState mStreamState
Stream activity state.
Definition: MprVoiceActivityNotifier.h:119