Asterisk - The Open Source Telephony Project GIT-master-6144b6b
Loading...
Searching...
No Matches
audiohook.h
Go to the documentation of this file.
1/*
2 * Asterisk -- An open source telephony toolkit.
3 *
4 * Copyright (C) 1999 - 2007, Digium, Inc.
5 *
6 * Joshua Colp <jcolp@digium.com>
7 *
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
13 *
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
17 */
18
19/*! \file
20 * \brief Audiohooks Architecture
21 */
22
23#ifndef _ASTERISK_AUDIOHOOK_H
24#define _ASTERISK_AUDIOHOOK_H
25
26#if defined(__cplusplus) || defined(c_plusplus)
27extern "C" {
28#endif
29
30/* these two are used in struct ast_audiohook */
31#include "asterisk/lock.h"
34
36 AST_AUDIOHOOK_TYPE_SPY = 0, /*!< Audiohook wants to receive audio */
37 AST_AUDIOHOOK_TYPE_WHISPER, /*!< Audiohook wants to provide audio to be mixed with existing audio */
38 AST_AUDIOHOOK_TYPE_MANIPULATE, /*!< Audiohook wants to manipulate the audio */
39};
40
42 AST_AUDIOHOOK_STATUS_NEW = 0, /*!< Audiohook was just created, not in use yet */
43 AST_AUDIOHOOK_STATUS_RUNNING, /*!< Audiohook is running on a channel */
44 AST_AUDIOHOOK_STATUS_SHUTDOWN, /*!< Audiohook is being shutdown */
45 AST_AUDIOHOOK_STATUS_DONE, /*!< Audiohook has shutdown and is not running on a channel any longer */
46};
47
49 AST_AUDIOHOOK_DIRECTION_READ = 0, /*!< Reading audio in */
50 AST_AUDIOHOOK_DIRECTION_WRITE, /*!< Writing audio out */
51 AST_AUDIOHOOK_DIRECTION_BOTH, /*!< Both reading audio in and writing audio out */
52};
53
55 AST_AUDIOHOOK_TRIGGER_MODE = (3 << 0), /*!< When audiohook should be triggered to do something */
56 AST_AUDIOHOOK_TRIGGER_READ = (1 << 0), /*!< Audiohook wants to be triggered when reading audio in */
57 AST_AUDIOHOOK_TRIGGER_WRITE = (2 << 0), /*!< Audiohook wants to be triggered when writing audio out */
58 AST_AUDIOHOOK_WANTS_DTMF = (1 << 2), /*!< Audiohook also wants to receive DTMF frames */
59 AST_AUDIOHOOK_TRIGGER_SYNC = (1 << 3), /*!< Audiohook wants to be triggered when both sides have combined audio available */
60 /*! Audiohooks with this flag set will not allow for a large amount of samples to build up on its
61 * slinfactories. We will flush the factories if they contain too many samples.
62 */
64 AST_AUDIOHOOK_MUTE_READ = (1 << 5), /*!< audiohook should be mute frames read */
65 AST_AUDIOHOOK_MUTE_WRITE = (1 << 6), /*!< audiohook should be mute frames written */
66 AST_AUDIOHOOK_COMPATIBLE = (1 << 7), /*!< is the audiohook native slin compatible */
67
68 AST_AUDIOHOOK_SUBSTITUTE_SILENCE = (1 << 8), /*!< Substitute silence for missing audio */
69};
70
72 /*! Audiohook manipulate callback is capable of handling slinear at any sample rate.
73 * Without enabling this flag on initialization the manipulation callback is guaranteed
74 * 8khz audio only. */
76};
77
78struct ast_audiohook;
79
80/*! \brief Callback function for manipulate audiohook type
81 * \param audiohook
82 * \param chan
83 * \param frame Frame of audio to manipulate
84 * \param direction Direction frame came from
85 * \retval 0 on success
86 * \retval -1 on failure
87 * \note An audiohook does not have any reference to a private data structure for manipulate
88 * types. It is up to the manipulate callback to store this data via it's own method.
89 * An example would be datastores.
90 * \note The input frame should never be freed or corrupted during a manipulate callback.
91 * If the callback has the potential to corrupt the frame's data during manipulation,
92 * local data should be used for the manipulation and only copied to the frame on
93 * success.
94 * \note A failure return value indicates that the frame was not manipulated and that
95 * is being returned in its original state.
96 */
97typedef int (*ast_audiohook_manipulate_callback)(struct ast_audiohook *audiohook, struct ast_channel *chan, struct ast_frame *frame, enum ast_audiohook_direction direction);
98
100 int read_volume; /*!< Volume adjustment on frames read from the channel the hook is on */
101 int write_volume; /*!< Volume adjustment on frames written to the channel the hook is on */
102};
103
105 ast_mutex_t lock; /*!< Lock that protects the audiohook structure */
106 ast_cond_t trigger; /*!< Trigger condition (if enabled) */
107 enum ast_audiohook_type type; /*!< Type of audiohook */
108 enum ast_audiohook_status status; /*!< Status of the audiohook */
109 enum ast_audiohook_init_flags init_flags; /*!< Init flags */
110 const char *source; /*!< Who this audiohook ultimately belongs to */
111 unsigned int flags; /*!< Flags on the audiohook */
112 struct ast_slinfactory read_factory; /*!< Factory where frames read from the channel, or read from the whisper source will go through */
113 struct ast_slinfactory write_factory; /*!< Factory where frames written to the channel will go through */
114 struct timeval read_time; /*!< Last time read factory was fed */
115 struct timeval write_time; /*!< Last time write factory was fed */
116 struct ast_format *format; /*!< Format translation path is setup as */
117 struct ast_trans_pvt *trans_pvt; /*!< Translation path for reading frames */
119 struct ast_audiohook_options options; /*!< Applicable options */
120 unsigned int hook_internal_samp_rate; /*!< internal read/write sample rate on the audiohook.*/
121 enum ast_audiohook_direction direction; /*!< Intended audiohook direction, BOTH by default on init */
122 AST_LIST_ENTRY(ast_audiohook) list; /*!< Linked list information */
123};
124
125struct ast_audiohook_list;
126
127/*! \brief Initialize an audiohook structure
128 * \param audiohook
129 * \param type Type of audiohook to initialize this as
130 * \param source Who is initializing this audiohook
131 * \param flags
132 * \retval 0 on success
133 * \retval -1 on failure
134 */
135int ast_audiohook_init(struct ast_audiohook *audiohook, enum ast_audiohook_type type, const char *source, enum ast_audiohook_init_flags flags);
136
137/*! \brief Destroys an audiohook structure
138 * \param audiohook
139 * \retval 0 on success
140 * \retval -1 on failure
141 */
142int ast_audiohook_destroy(struct ast_audiohook *audiohook);
143
144/*! \brief Sets direction on audiohook
145 * \param audiohook
146 * \param direction In which direction should the audiohook feed frames, ie if we are snooping 'in', set direction to READ so that only the 'in' frames are fed to the slin factory
147 * \retval 0 on success
148 * \retval -1 on failure due to audiohook already in use or in shutdown. Can only set direction on NEW audiohooks
149 */
151
152/*! \brief Writes a frame into the audiohook structure
153 * \param audiohook
154 * \param direction Direction the audio frame came from
155 * \param frame Frame to write in
156 * \retval 0 on success
157 * \retval -1 on failure
158 */
159int ast_audiohook_write_frame(struct ast_audiohook *audiohook, enum ast_audiohook_direction direction, struct ast_frame *frame);
160
161/*! \brief Reads a frame in from the audiohook structure
162 * \param audiohook
163 * \param samples Number of samples wanted
164 * \param direction Direction the audio frame came from
165 * \param format Format of frame remote side wants back
166 * \return frame on success
167 * \retval NULL on failure
168 */
169struct ast_frame *ast_audiohook_read_frame(struct ast_audiohook *audiohook, size_t samples, enum ast_audiohook_direction direction, struct ast_format *format);
170
171/*! \brief Reads a frame in from the audiohook structure in mixed audio mode and copies read and write frame data to provided arguments.
172 * \param audiohook
173 * \param samples Number of samples wanted
174 * \param format Format of frame remote side wants back
175 * \param read_frame if available, we'll copy the read buffer to this.
176 * \param write_frame if available, we'll copy the write buffer to this.
177 * \return frame on success
178 * \retval NULL on failure
179 * \note The read_frame and write_frame may be in a different format from what was specified in format depending on the sample rate
180 * of the hooked channel's codec - ie; if we are requesting slin, but are hooked on channel using a 16K codec like g722, the
181 * read and write frames will be slin16.
182 */
183struct ast_frame *ast_audiohook_read_frame_all(struct ast_audiohook *audiohook, size_t samples, struct ast_format *format, struct ast_frame **read_frame, struct ast_frame **write_frame);
184
185/*! \brief Attach audiohook to channel
186 * \param chan
187 * \param audiohook
188 * \return 0 on success
189 * \retval -1 on failure
190 */
191int ast_audiohook_attach(struct ast_channel *chan, struct ast_audiohook *audiohook);
192
193/*! \brief Detach audiohook from channel
194 * \param audiohook
195 * \return Returns 0 on success, -1 on failure
196 */
197int ast_audiohook_detach(struct ast_audiohook *audiohook);
198
199/*!
200 * \brief Detach audiohooks from list and destroy said list
201 * \param audiohook_list List of audiohooks (NULL tolerant)
202 */
203void ast_audiohook_detach_list(struct ast_audiohook_list *audiohook_list);
204
205/*! \brief Move an audiohook from one channel to a new one
206 *
207 * \todo Currently only the first audiohook of a specific source found will be moved.
208 * We should add the capability to move multiple audiohooks from a single source as well.
209 *
210 * \note It is required that both old_chan and new_chan are locked prior to calling
211 * this function. Besides needing to protect the data within the channels, not locking
212 * these channels can lead to a potential deadlock
213 *
214 * \param old_chan The source of the audiohook to move
215 * \param new_chan The destination to which we want the audiohook to move
216 * \param source The source of the audiohook we want to move
217 */
218void ast_audiohook_move_by_source(struct ast_channel *old_chan, struct ast_channel *new_chan, const char *source);
219
220/*! \brief Move all audiohooks from one channel to another
221 *
222 * \note It is required that both old_chan and new_chan are locked prior to calling
223 * this function. Besides needing to protect the data within the channels, not locking
224 * these channels can lead to a potential deadlock.
225 *
226 * \param old_chan The source of the audiohooks being moved
227 * \param new_chan The destination channel for the audiohooks to be moved to
228 */
229void ast_audiohook_move_all(struct ast_channel *old_chan, struct ast_channel *new_chan);
230
231/*!
232 * \brief Detach specified source audiohook from channel
233 *
234 * \param chan Channel to detach from
235 * \param source Name of source to detach
236 *
237 * \retval 0 on success
238 * \retval -1 on failure
239 *
240 * \note The channel does not need to be locked before calling this function.
241 */
242int ast_audiohook_detach_source(struct ast_channel *chan, const char *source);
243
244/*!
245 * \brief Remove an audiohook from a specified channel
246 *
247 * \param chan Channel to remove from
248 * \param audiohook Audiohook to remove
249 *
250 * \retval 0 on success
251 * \retval -1 on failure
252 *
253 * \note The channel does not need to be locked before calling this function
254 */
255int ast_audiohook_remove(struct ast_channel *chan, struct ast_audiohook *audiohook);
256
257/*!
258 * \brief Determine if a audiohook_list is empty or not.
259 *
260 * \param audiohook_list Audiohook to check. (NULL also means empty)
261 *
262 * \retval 0 false
263 * \retval 1 true
264 */
265int ast_audiohook_write_list_empty(struct ast_audiohook_list *audiohook_list);
266
267/*! \brief Pass a frame off to be handled by the audiohook core
268 * \param chan Channel that the list is coming off of
269 * \param audiohook_list List of audiohooks
270 * \param direction Direction frame is coming in from
271 * \param frame The frame itself
272 * \return frame on success
273 * \retval NULL on failure
274 */
275struct ast_frame *ast_audiohook_write_list(struct ast_channel *chan, struct ast_audiohook_list *audiohook_list, enum ast_audiohook_direction direction, struct ast_frame *frame);
276
277/*! \brief Update audiohook's status
278 * \param audiohook
279 * \param status
280 *
281 * \note once status is updated to DONE, this function can not be used to set the
282 * status back to any other setting. Setting DONE effectively locks the status as such.
283 */
285
286/*! \brief Wait for audiohook trigger to be triggered
287 * \param audiohook Audiohook to wait on
288 */
289void ast_audiohook_trigger_wait(struct ast_audiohook *audiohook);
290
291/*!
292 \brief Find out how many audiohooks from a certain source exist on a given channel, regardless of status.
293 \param chan The channel on which to find the spies
294 \param source The audiohook's source
295 \param type The type of audiohook
296 \return number of audiohooks which are from the source specified
297
298 Note: Function performs nlocking.
299*/
300int ast_channel_audiohook_count_by_source(struct ast_channel *chan, const char *source, enum ast_audiohook_type type);
301
302/*!
303 \brief Find out how many spies of a certain type exist on a given channel, and are in state running.
304 \param chan The channel on which to find the spies
305 \param source The source of the audiohook
306 \param type The type of spy to look for
307 \return number of running audiohooks which are from the source specified
308
309 Note: Function performs no locking.
310*/
311int ast_channel_audiohook_count_by_source_running(struct ast_channel *chan, const char *source, enum ast_audiohook_type type);
312
313/*! \brief Lock an audiohook
314 * \param ah Audiohook structure
315 */
316#define ast_audiohook_lock(ah) ast_mutex_lock(&(ah)->lock)
317
318/*! \brief Unlock an audiohook
319 * \param ah Audiohook structure
320 */
321#define ast_audiohook_unlock(ah) ast_mutex_unlock(&(ah)->lock)
322
323/*!
324 * \brief Adjust the volume on frames read from or written to a channel
325 * \param chan Channel to muck with
326 * \param direction Direction to set on
327 * \param volume Value to adjust the volume by
328 * \retval 0 on success
329 * \retval -1 on failure
330 * \since 1.6.1
331 */
333
334/*!
335 * \brief Adjust the volume on frames read from or written to a channel
336 * \param chan Channel to muck with
337 * \param direction Direction to set on
338 * \param volume Value to adjust the volume by
339 * \retval 0 on success
340 * \retval -1 on failure
341 */
343
344/*!
345 * \brief Retrieve the volume adjustment value on frames read from or written to a channel
346 * \param chan Channel to retrieve volume adjustment from
347 * \param direction Direction to retrieve
348 * \return adjustment value
349 * \since 1.6.1
350 */
352
353/*!
354 * \brief Retrieve the volume adjustment value on frames read from or written to a channel
355 * \param chan Channel to retrieve volume adjustment from
356 * \param direction Direction to retrieve
357 * \return adjustment value
358 */
360
361/*!
362 * \brief Adjust the volume on frames read from or written to a channel
363 * \param chan Channel to muck with
364 * \param direction Direction to increase
365 * \param volume Value to adjust the adjustment by
366 * \retval 0 on success
367 * \retval -1 on failure
368 * \since 1.6.1
369 */
371
372/*!
373 * \brief Adjust the volume on frames read from or written to a channel
374 * \param chan Channel to muck with
375 * \param direction Direction to increase
376 * \param volume Value to adjust the adjustment by
377 * \retval 0 on success
378 * \retval -1 on failure
379 */
381
382/*! \brief Mute frames read from or written to a channel
383 * \param chan Channel to muck with
384 * \param source Type of audiohook
385 * \param flag which direction to set / clear
386 * \param clear set or clear muted frames on direction based on flag parameter
387 * \retval 0 success
388 * \retval -1 failure
389 */
390int ast_audiohook_set_mute(struct ast_channel *chan, const char *source, enum ast_audiohook_flags flag, int clear);
391
392/*! \brief Mute frames read from or written for all audiohooks on a channel
393 * \param chan Channel to muck with
394 * \param source Type of audiohooks
395 * \param flag which direction to set / clear
396 * \param clear set or clear muted frames on direction based on flag parameter
397 * \retval >=0 number of muted audiohooks
398 * \retval -1 failure
399 */
400int ast_audiohook_set_mute_all(struct ast_channel *chan, const char *source, enum ast_audiohook_flags flag, int clear);
401
402#if defined(__cplusplus) || defined(c_plusplus)
403}
404#endif
405
406#endif /* _ASTERISK_AUDIOHOOK_H */
jack_status_t status
Definition app_jack.c:149
ast_audiohook_init_flags
Definition audiohook.h:71
@ AST_AUDIOHOOK_MANIPULATE_ALL_RATES
Definition audiohook.h:75
struct ast_frame * ast_audiohook_write_list(struct ast_channel *chan, struct ast_audiohook_list *audiohook_list, enum ast_audiohook_direction direction, struct ast_frame *frame)
Pass a frame off to be handled by the audiohook core.
Definition audiohook.c:1116
struct ast_frame * ast_audiohook_read_frame_all(struct ast_audiohook *audiohook, size_t samples, struct ast_format *format, struct ast_frame **read_frame, struct ast_frame **write_frame)
Reads a frame in from the audiohook structure in mixed audio mode and copies read and write frame dat...
Definition audiohook.c:488
int ast_audiohook_init(struct ast_audiohook *audiohook, enum ast_audiohook_type type, const char *source, enum ast_audiohook_init_flags flags)
Initialize an audiohook structure.
Definition audiohook.c:100
struct ast_frame * ast_audiohook_read_frame(struct ast_audiohook *audiohook, size_t samples, enum ast_audiohook_direction direction, struct ast_format *format)
Reads a frame in from the audiohook structure.
Definition audiohook.c:483
int ast_audiohook_set_mute(struct ast_channel *chan, const char *source, enum ast_audiohook_flags flag, int clear)
Mute frames read from or written to a channel.
Definition audiohook.c:1405
int ast_audiohook_write_frame(struct ast_audiohook *audiohook, enum ast_audiohook_direction direction, struct ast_frame *frame)
Writes a frame into the audiohook structure.
Definition audiohook.c:167
int ast_audiohook_remove(struct ast_channel *chan, struct ast_audiohook *audiohook)
Remove an audiohook from a specified channel.
Definition audiohook.c:758
ast_audiohook_direction
Definition audiohook.h:48
@ AST_AUDIOHOOK_DIRECTION_READ
Definition audiohook.h:49
@ AST_AUDIOHOOK_DIRECTION_WRITE
Definition audiohook.h:50
@ AST_AUDIOHOOK_DIRECTION_BOTH
Definition audiohook.h:51
int ast_audiohook_detach_source(struct ast_channel *chan, const char *source)
Detach specified source audiohook from channel.
Definition audiohook.c:735
int ast_audiohook_volume_get(struct ast_channel *chan, enum ast_audiohook_direction direction)
Retrieve the volume adjustment value on frames read from or written to a channel.
Definition audiohook.c:1355
int ast_audiohook_write_list_empty(struct ast_audiohook_list *audiohook_list)
Determine if a audiohook_list is empty or not.
Definition audiohook.c:1108
void ast_audiohook_trigger_wait(struct ast_audiohook *audiohook)
Wait for audiohook trigger to be triggered.
Definition audiohook.c:1131
int ast_audiohook_volume_adjust_float(struct ast_channel *chan, enum ast_audiohook_direction direction, float volume)
Adjust the volume on frames read from or written to a channel.
Definition audiohook.c:1385
int(* ast_audiohook_manipulate_callback)(struct ast_audiohook *audiohook, struct ast_channel *chan, struct ast_frame *frame, enum ast_audiohook_direction direction)
Callback function for manipulate audiohook type.
Definition audiohook.h:97
void ast_audiohook_detach_list(struct ast_audiohook_list *audiohook_list)
Detach audiohooks from list and destroy said list.
Definition audiohook.c:602
void ast_audiohook_update_status(struct ast_audiohook *audiohook, enum ast_audiohook_status status)
Update audiohook's status.
Definition audiohook.c:577
int ast_audiohook_set_mute_all(struct ast_channel *chan, const char *source, enum ast_audiohook_flags flag, int clear)
Mute frames read from or written for all audiohooks on a channel.
Definition audiohook.c:1432
ast_audiohook_flags
Definition audiohook.h:54
@ AST_AUDIOHOOK_COMPATIBLE
Definition audiohook.h:66
@ AST_AUDIOHOOK_WANTS_DTMF
Definition audiohook.h:58
@ AST_AUDIOHOOK_TRIGGER_MODE
Definition audiohook.h:55
@ AST_AUDIOHOOK_MUTE_READ
Definition audiohook.h:64
@ AST_AUDIOHOOK_MUTE_WRITE
Definition audiohook.h:65
@ AST_AUDIOHOOK_SUBSTITUTE_SILENCE
Definition audiohook.h:68
@ AST_AUDIOHOOK_SMALL_QUEUE
Definition audiohook.h:63
@ AST_AUDIOHOOK_TRIGGER_READ
Definition audiohook.h:56
@ AST_AUDIOHOOK_TRIGGER_WRITE
Definition audiohook.h:57
@ AST_AUDIOHOOK_TRIGGER_SYNC
Definition audiohook.h:59
int ast_channel_audiohook_count_by_source(struct ast_channel *chan, const char *source, enum ast_audiohook_type type)
Find out how many audiohooks from a certain source exist on a given channel, regardless of status.
Definition audiohook.c:1146
int ast_audiohook_detach(struct ast_audiohook *audiohook)
Detach audiohook from channel.
Definition audiohook.c:587
int ast_audiohook_volume_set_float(struct ast_channel *chan, enum ast_audiohook_direction direction, float volume)
Adjust the volume on frames read from or written to a channel.
Definition audiohook.c:1335
int ast_audiohook_attach(struct ast_channel *chan, struct ast_audiohook *audiohook)
Attach audiohook to channel.
Definition audiohook.c:521
int ast_channel_audiohook_count_by_source_running(struct ast_channel *chan, const char *source, enum ast_audiohook_type type)
Find out how many spies of a certain type exist on a given channel, and are in state running.
Definition audiohook.c:1186
int ast_audiohook_destroy(struct ast_audiohook *audiohook)
Destroys an audiohook structure.
Definition audiohook.c:124
ast_audiohook_type
Definition audiohook.h:35
@ AST_AUDIOHOOK_TYPE_MANIPULATE
Definition audiohook.h:38
@ AST_AUDIOHOOK_TYPE_SPY
Definition audiohook.h:36
@ AST_AUDIOHOOK_TYPE_WHISPER
Definition audiohook.h:37
ast_audiohook_status
Definition audiohook.h:41
@ AST_AUDIOHOOK_STATUS_DONE
Definition audiohook.h:45
@ AST_AUDIOHOOK_STATUS_NEW
Definition audiohook.h:42
@ AST_AUDIOHOOK_STATUS_RUNNING
Definition audiohook.h:43
@ AST_AUDIOHOOK_STATUS_SHUTDOWN
Definition audiohook.h:44
int ast_audiohook_volume_adjust(struct ast_channel *chan, enum ast_audiohook_direction direction, int volume)
Adjust the volume on frames read from or written to a channel.
Definition audiohook.c:1380
int ast_audiohook_set_frame_feed_direction(struct ast_audiohook *audiohook, enum ast_audiohook_direction direction)
Sets direction on audiohook.
Definition audiohook.c:150
int ast_audiohook_volume_set(struct ast_channel *chan, enum ast_audiohook_direction direction, int volume)
Adjust the volume on frames read from or written to a channel.
Definition audiohook.c:1330
void ast_audiohook_move_by_source(struct ast_channel *old_chan, struct ast_channel *new_chan, const char *source)
Move an audiohook from one channel to a new one.
Definition audiohook.c:693
void ast_audiohook_move_all(struct ast_channel *old_chan, struct ast_channel *new_chan)
Move all audiohooks from one channel to another.
Definition audiohook.c:709
float ast_audiohook_volume_get_float(struct ast_channel *chan, enum ast_audiohook_direction direction)
Retrieve the volume adjustment value on frames read from or written to a channel.
Definition audiohook.c:1360
static const char type[]
long int flag
Definition f2c.h:83
static struct ast_frame * read_frame(struct ast_filestream *s, int *whennext)
Definition file.c:930
direction
A set of macros to manage forward-linked lists.
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
Asterisk locking-related definitions:
pthread_cond_t ast_cond_t
Definition lock.h:185
A machine to gather up arbitrary frames and convert them to raw slinear on demand.
ast_cond_t trigger
Definition audiohook.h:106
struct timeval write_time
Definition audiohook.h:115
enum ast_audiohook_type type
Definition audiohook.h:107
struct timeval read_time
Definition audiohook.h:114
ast_audiohook_manipulate_callback manipulate_callback
Definition audiohook.h:118
unsigned int hook_internal_samp_rate
Definition audiohook.h:120
struct ast_slinfactory read_factory
Definition audiohook.h:112
struct ast_trans_pvt * trans_pvt
Definition audiohook.h:117
struct ast_audiohook_options options
Definition audiohook.h:119
enum ast_audiohook_init_flags init_flags
Definition audiohook.h:109
enum ast_audiohook_status status
Definition audiohook.h:108
enum ast_audiohook_direction direction
Definition audiohook.h:121
struct ast_format * format
Definition audiohook.h:116
unsigned int flags
Definition audiohook.h:111
ast_mutex_t lock
Definition audiohook.h:105
struct ast_slinfactory write_factory
Definition audiohook.h:113
const char * source
Definition audiohook.h:110
struct ast_audiohook::@196 list
Main Channel structure associated with a channel.
Definition of a media format.
Definition format.c:43
Data structure associated with a single frame of data.
Structure for mutex and tracking information.
Definition lock.h:142
Default structure for translators, with the basic fields and buffers, all allocated as part of the sa...
Definition translate.h:213