#include "asterisk/linkedlists.h"
Include dependency graph for chanspy.h:
Go to the source code of this file.
Data Structures | |
struct | ast_channel_spy |
struct | ast_channel_spy_queue |
Enumerations | |
enum | chanspy_flags { CHANSPY_MIXAUDIO = (1 << 0), CHANSPY_READ_VOLADJUST = (1 << 1), CHANSPY_WRITE_VOLADJUST = (1 << 2), CHANSPY_FORMAT_AUDIO = (1 << 3), CHANSPY_TRIGGER_MODE = (3 << 4), CHANSPY_TRIGGER_READ = (1 << 4), CHANSPY_TRIGGER_WRITE = (2 << 4), CHANSPY_TRIGGER_NONE = (3 << 4), CHANSPY_TRIGGER_FLUSH = (1 << 6) } |
enum | chanspy_states { CHANSPY_NEW = 0, CHANSPY_RUNNING = 1, CHANSPY_DONE = 2, CHANSPY_STOP = 3 } |
Functions | |
int | ast_channel_spy_add (struct ast_channel *chan, struct ast_channel_spy *spy) |
Adds a spy to a channel, to begin receiving copies of the channel's audio frames. | |
void | ast_channel_spy_free (struct ast_channel_spy *spy) |
Free a spy. | |
ast_frame * | ast_channel_spy_read_frame (struct ast_channel_spy *spy, unsigned int samples) |
Read one (or more) frames of audio from a channel being spied upon. | |
void | ast_channel_spy_remove (struct ast_channel *chan, struct ast_channel_spy *spy) |
Remove a spy from a channel. | |
void | ast_channel_spy_stop_by_type (struct ast_channel *chan, const char *type) |
Find all spies of a particular type on a channel and stop them. | |
void | ast_channel_spy_trigger_wait (struct ast_channel_spy *spy) |
Efficiently wait until audio is available for a spy, or an exception occurs. |
Definition in file chanspy.h.
enum chanspy_states |
Definition at line 32 of file chanspy.h.
00032 { 00033 CHANSPY_NEW = 0, /*!< spy not yet operating */ 00034 CHANSPY_RUNNING = 1, /*!< normal operation, spy is still operating */ 00035 CHANSPY_DONE = 2, /*!< spy is stopped and already removed from channel */ 00036 CHANSPY_STOP = 3, /*!< spy requested to stop, still attached to channel */ 00037 };
int ast_channel_spy_add | ( | struct ast_channel * | chan, | |
struct ast_channel_spy * | spy | |||
) |
Adds a spy to a channel, to begin receiving copies of the channel's audio frames.
chan | The channel to add the spy to. | |
spy | A pointer to ast_channel_spy structure describing how the spy is to be used. |
void ast_channel_spy_free | ( | struct ast_channel_spy * | spy | ) |
Free a spy.
spy | The spy to free |
struct ast_frame* ast_channel_spy_read_frame | ( | struct ast_channel_spy * | spy, | |
unsigned int | samples | |||
) |
Read one (or more) frames of audio from a channel being spied upon.
spy | The spy to operate on | |
samples | The number of audio samples to read |
Note: This function performs no locking; you must hold the spy's lock before calling this function. You must not hold the channel's lock at the same time.
void ast_channel_spy_remove | ( | struct ast_channel * | chan, | |
struct ast_channel_spy * | spy | |||
) |
Remove a spy from a channel.
chan | The channel to remove the spy from | |
spy | The spy to be removed |
void ast_channel_spy_stop_by_type | ( | struct ast_channel * | chan, | |
const char * | type | |||
) |
Find all spies of a particular type on a channel and stop them.
chan | The channel to operate on | |
type | A character string identifying the type of spies to be stopped |
void ast_channel_spy_trigger_wait | ( | struct ast_channel_spy * | spy | ) |
Efficiently wait until audio is available for a spy, or an exception occurs.
spy | The spy to wait on |