#include <sys/types.h>
#include <sys/time.h>
Include dependency graph for frame.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | ast_frame |
Data structure associated with a single frame of data. More... | |
struct | ast_frame_chain |
struct | ast_option_header |
Defines | |
#define | AST_FRIENDLY_OFFSET |
#define | AST_MIN_OFFSET 32 /*! Make sure we keep at least this much handy */ |
#define | AST_MALLOCD_HDR (1 << 0) |
#define | AST_MALLOCD_DATA (1 << 1) |
#define | AST_MALLOCD_SRC (1 << 2) |
#define | AST_FRAME_DTMF 1 |
#define | AST_FRAME_VOICE 2 |
#define | AST_FRAME_VIDEO 3 |
#define | AST_FRAME_CONTROL 4 |
#define | AST_FRAME_NULL 5 |
#define | AST_FRAME_IAX 6 |
#define | AST_FRAME_TEXT 7 |
#define | AST_FRAME_IMAGE 8 |
#define | AST_FRAME_HTML 9 |
#define | AST_HTML_URL 1 |
#define | AST_HTML_DATA 2 |
#define | AST_HTML_BEGIN 4 |
#define | AST_HTML_END 8 |
#define | AST_HTML_LDCOMPLETE 16 |
#define | AST_HTML_NOSUPPORT 17 |
#define | AST_HTML_LINKURL 18 |
#define | AST_HTML_UNLINK 19 |
#define | AST_HTML_LINKREJECT 20 |
#define | AST_FORMAT_G723_1 (1 << 0) |
#define | AST_FORMAT_GSM (1 << 1) |
#define | AST_FORMAT_ULAW (1 << 2) |
#define | AST_FORMAT_ALAW (1 << 3) |
#define | AST_FORMAT_G726 (1 << 4) |
#define | AST_FORMAT_ADPCM (1 << 5) |
#define | AST_FORMAT_SLINEAR (1 << 6) |
#define | AST_FORMAT_LPC10 (1 << 7) |
#define | AST_FORMAT_G729A (1 << 8) |
#define | AST_FORMAT_SPEEX (1 << 9) |
#define | AST_FORMAT_ILBC (1 << 10) |
#define | AST_FORMAT_MAX_AUDIO (1 << 15) |
#define | AST_FORMAT_JPEG (1 << 16) |
#define | AST_FORMAT_PNG (1 << 17) |
#define | AST_FORMAT_H261 (1 << 18) |
#define | AST_FORMAT_H263 (1 << 19) |
#define | AST_FORMAT_MAX_VIDEO (1 << 24) |
#define | AST_CONTROL_HANGUP 1 |
#define | AST_CONTROL_RING 2 |
#define | AST_CONTROL_RINGING 3 |
#define | AST_CONTROL_ANSWER 4 |
#define | AST_CONTROL_BUSY 5 |
#define | AST_CONTROL_TAKEOFFHOOK 6 |
#define | AST_CONTROL_OFFHOOK 7 |
#define | AST_CONTROL_CONGESTION 8 |
#define | AST_CONTROL_FLASH 9 |
#define | AST_CONTROL_WINK 10 |
#define | AST_CONTROL_OPTION 11 |
#define | AST_CONTROL_RADIO_KEY 12 |
#define | AST_CONTROL_RADIO_UNKEY 13 |
#define | AST_CONTROL_PROGRESS 14 |
#define | AST_SMOOTHER_FLAG_G729 (1 << 0) |
#define | AST_OPTION_FLAG_REQUEST 0 |
#define | AST_OPTION_FLAG_ACCEPT 1 |
#define | AST_OPTION_FLAG_REJECT 2 |
#define | AST_OPTION_FLAG_QUERY 4 |
#define | AST_OPTION_FLAG_ANSWER 5 |
#define | AST_OPTION_FLAG_WTF 6 |
#define | AST_OPTION_TONE_VERIFY 1 |
#define | AST_OPTION_TDD 2 |
#define | AST_OPTION_RELAXDTMF 3 |
#define | AST_OPTION_AUDIO_MODE 4 |
Functions | |
void | ast_frfree (struct ast_frame *fr) |
Frees a frame. | |
ast_frame * | ast_frisolate (struct ast_frame *fr) |
Copies a frame. | |
ast_frame * | ast_frdup (struct ast_frame *fr) |
Copies a frame. | |
ast_frame * | ast_fr_fdread (int fd) |
Reads a frame from an fd. | |
int | ast_fr_fdwrite (int fd, struct ast_frame *frame) |
Writes a frame to an fd. | |
int | ast_fr_fdhangup (int fd) |
Sends a hangup to an fd. | |
char * | ast_getformatname (int format) |
Get the name of a format. | |
char * | ast_getformatname_multiple (char *buf, unsigned n, int format) |
Get the names of a set of formats. | |
int | ast_getformatbyname (char *name) |
char * | ast_codec2str (int codec) |
Get a name from a format. | |
int | ast_best_codec (int fmts) |
Pick the best codec. | |
ast_smoother * | ast_smoother_new (int bytes) |
void | ast_smoother_set_flags (struct ast_smoother *smoother, int flags) |
int | ast_smoother_get_flags (struct ast_smoother *smoother) |
void | ast_smoother_free (struct ast_smoother *s) |
void | ast_smoother_reset (struct ast_smoother *s, int bytes) |
int | ast_smoother_feed (struct ast_smoother *s, struct ast_frame *f) |
ast_frame * | ast_smoother_read (struct ast_smoother *s) |
void | ast_frame_dump (char *name, struct ast_frame *f, char *prefix) |
|
Remote end has answered Definition at line 194 of file frame.h. Referenced by __ast_request_and_dial(), ast_dsp_process(), ast_frame_dump(), ast_read(), ast_waitfordigit_full(), ast_waitstream(), ast_waitstream_fr(), and ast_waitstream_full(). |
|
Remote end is busy Definition at line 196 of file frame.h. Referenced by __ast_request_and_dial(), ast_dsp_process(), ast_frame_dump(), and ast_indicate(). |
|
Congestion (circuits busy) Definition at line 202 of file frame.h. Referenced by __ast_request_and_dial(), ast_dsp_process(), ast_frame_dump(), and ast_indicate(). |
|
Flash hook Definition at line 204 of file frame.h. Referenced by ast_frame_dump(). |
|
Other end has hungup Definition at line 188 of file frame.h. Referenced by __ast_request_and_dial(), ast_fr_fdhangup(), ast_fr_fdread(), ast_frame_dump(), ast_queue_hangup(), ast_read(), ast_recvchar(), ast_waitfordigit_full(), ast_waitstream(), ast_waitstream_fr(), and ast_waitstream_full(). |
|
Line is off hook Definition at line 200 of file frame.h. Referenced by ast_frame_dump(). |
|
Set a low-level option Definition at line 208 of file frame.h. Referenced by ast_frame_dump(). |
|
Indicate CALL_PROCEEDING or PROGRESS Definition at line 214 of file frame.h. Referenced by __ast_request_and_dial(), and ast_indicate(). |
|
Key Radio Definition at line 210 of file frame.h. Referenced by ast_frame_dump(). |
|
Un-Key Radio Definition at line 212 of file frame.h. Referenced by ast_frame_dump(). |
|
Local ring Definition at line 190 of file frame.h. Referenced by ast_frame_dump(). |
|
Remote end is ringing Definition at line 192 of file frame.h. Referenced by __ast_request_and_dial(), ast_dsp_process(), ast_frame_dump(), ast_indicate(), ast_waitfordigit_full(), ast_waitstream(), ast_waitstream_fr(), and ast_waitstream_full(). |
|
Make it go off hook Definition at line 198 of file frame.h. Referenced by ast_frame_dump(). |
|
Wink Definition at line 206 of file frame.h. Referenced by ast_frame_dump(). |
|
ADPCM (IMA) Definition at line 162 of file frame.h. Referenced by ast_best_codec(), ast_getformatbyname(), ast_getformatname(), ast_rtp_read(), and ast_rtp_write(). |
|
Raw A-law data (G.711) Definition at line 158 of file frame.h. Referenced by ast_best_codec(), ast_dsp_process(), ast_getformatbyname(), ast_getformatname(), ast_rtp_read(), and ast_rtp_write(). |
|
G.723.1 compression Definition at line 152 of file frame.h. Referenced by ast_best_codec(), ast_getformatbyname(), ast_getformatname(), ast_rtp_read(), and ast_rtp_write(). |
|
ADPCM (G.726, 32kbps) Definition at line 160 of file frame.h. Referenced by ast_best_codec(), ast_getformatbyname(), ast_getformatname(), ast_rtp_read(), and ast_rtp_write(). |
|
G.729A audio Definition at line 168 of file frame.h. Referenced by ast_best_codec(), ast_getformatbyname(), ast_getformatname(), ast_rtp_read(), and ast_rtp_write(). |
|
GSM compression Definition at line 154 of file frame.h. Referenced by ast_best_codec(), ast_getformatbyname(), ast_getformatname(), ast_rtp_read(), and ast_rtp_write(). |
|
H.261 Video Definition at line 180 of file frame.h. Referenced by ast_getformatbyname(), ast_getformatname(), and ast_rtp_write(). |
|
H.263 Video Definition at line 182 of file frame.h. Referenced by ast_getformatbyname(), ast_getformatname(), and ast_rtp_write(). |
|
iLBC Free Compression Definition at line 172 of file frame.h. Referenced by ast_best_codec(), ast_getformatbyname(), ast_getformatname(), ast_rtp_read(), and ast_rtp_write(). |
|
JPEG Images Definition at line 176 of file frame.h. Referenced by ast_getformatname(). |
|
LPC10, 180 samples/frame Definition at line 166 of file frame.h. Referenced by ast_best_codec(), ast_getformatbyname(), and ast_getformatname(). |
|
Maximum audio format Definition at line 174 of file frame.h. Referenced by ast_closestream(), ast_playstream(), ast_rtp_read(), and ast_writestream(). |
|
Max one |
|
PNG Images Definition at line 178 of file frame.h. Referenced by ast_getformatname(). |
|
Raw 16-bit Signed Linear (8000 Hz) PCM Definition at line 164 of file frame.h. Referenced by ast_app_getvoice(), ast_best_codec(), ast_dsp_call_progress(), ast_dsp_digitdetect(), ast_dsp_process(), ast_dsp_silence(), ast_getformatbyname(), ast_getformatname(), and ast_rtp_read(). |
|
SpeeX Free Compression Definition at line 170 of file frame.h. Referenced by ast_best_codec(), ast_getformatbyname(), ast_getformatname(), ast_rtp_read(), and ast_rtp_write(). |
|
Raw mu-law data (G.711) Definition at line 156 of file frame.h. Referenced by ast_best_codec(), ast_dsp_process(), ast_getformatbyname(), ast_getformatname(), ast_rtp_read(), and ast_rtp_write(). |
|
A control frame, subclass is AST_CONTROL_* Definition at line 118 of file frame.h. Referenced by __ast_request_and_dial(), ast_channel_bridge(), ast_dsp_process(), ast_fr_fdhangup(), ast_fr_fdread(), ast_frame_dump(), ast_queue_control(), ast_queue_hangup(), ast_read(), ast_recvchar(), ast_waitfordigit_full(), ast_waitstream(), ast_waitstream_fr(), ast_waitstream_full(), and ast_write(). |
|
A DTMF digit, subclass is the digit Definition at line 112 of file frame.h. Referenced by ast_app_getvoice(), ast_channel_bridge(), ast_dsp_process(), ast_dtmf_stream(), ast_frame_dump(), ast_read(), ast_rtp_bridge(), ast_waitfordigit(), ast_waitfordigit_full(), ast_waitstream(), ast_waitstream_fr(), ast_waitstream_full(), and ast_write(). |
|
HTML Frame Definition at line 128 of file frame.h. Referenced by ast_frame_dump(). |
|
Inter Aterisk Exchange private frame type Definition at line 122 of file frame.h. Referenced by ast_frame_dump(). |
|
Image Frames Definition at line 126 of file frame.h. Referenced by ast_channel_bridge(), and ast_frame_dump(). |
|
An empty, useless frame Definition at line 120 of file frame.h. Referenced by ast_channel_masquerade(), ast_dsp_process(), ast_frame_dump(), ast_read(), ast_rtcp_read(), ast_rtp_read(), and ast_softhangup_nolock(). |
|
Text messages Definition at line 124 of file frame.h. Referenced by ast_channel_bridge(), ast_frame_dump(), ast_recvchar(), and ast_write(). |
|
Video frame, maybe?? :) Definition at line 116 of file frame.h. Referenced by ast_channel_bridge(), ast_frame_dump(), ast_rtp_bridge(), ast_rtp_read(), ast_rtp_write(), ast_write(), and ast_writestream(). |
|
Voice data, subclass is AST_FORMAT_* Definition at line 114 of file frame.h. Referenced by ast_app_getvoice(), ast_channel_bridge(), ast_dsp_call_progress(), ast_dsp_digitdetect(), ast_dsp_process(), ast_dsp_silence(), ast_frame_dump(), ast_prod(), ast_queue_frame(), ast_read(), ast_rtp_bridge(), ast_rtp_read(), ast_rtp_write(), ast_smoother_feed(), ast_smoother_read(), ast_waitfordigit_full(), ast_waitstream_full(), ast_write(), and ast_writestream(). |
|
Value:
Definition at line 98 of file frame.h. Referenced by ast_frdup(), ast_frisolate(), ast_prod(), ast_rtp_read(), and ast_smoother_read(). |
|
Beginning frame Definition at line 136 of file frame.h. Referenced by ast_frame_dump(). |
|
Data frame Definition at line 134 of file frame.h. Referenced by ast_frame_dump(). |
|
End frame Definition at line 138 of file frame.h. Referenced by ast_frame_dump(). |
|
Load is complete Definition at line 140 of file frame.h. Referenced by ast_frame_dump(). |
|
Reject link request Definition at line 148 of file frame.h. Referenced by ast_frame_dump(). |
|
Send URL, and track Definition at line 144 of file frame.h. Referenced by ast_frame_dump(). |
|
Peer is unable to support HTML Definition at line 142 of file frame.h. Referenced by ast_frame_dump(). |
|
No more HTML linkage Definition at line 146 of file frame.h. Referenced by ast_frame_dump(). |
|
Sending a URL Definition at line 132 of file frame.h. Referenced by ast_channel_sendurl(), and ast_frame_dump(). |
|
Need the data be free'd? Definition at line 106 of file frame.h. Referenced by ast_frfree(), and ast_frisolate(). |
|
Need the header be free'd? Definition at line 104 of file frame.h. Referenced by ast_frdup(), ast_frfree(), and ast_frisolate(). |
|
Need the source be free'd? (haha!) Definition at line 108 of file frame.h. Referenced by ast_frfree(), and ast_frisolate(). |
|
Definition at line 101 of file frame.h. Referenced by ast_smoother_feed(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 216 of file frame.h. Referenced by ast_rtp_write(), ast_smoother_feed(), and ast_smoother_read(). |
|
Pick the best codec.
Definition at line 233 of file channel.c. References AST_FORMAT_ADPCM, AST_FORMAT_ALAW, AST_FORMAT_G723_1, AST_FORMAT_G726, AST_FORMAT_G729A, AST_FORMAT_GSM, AST_FORMAT_ILBC, AST_FORMAT_LPC10, AST_FORMAT_SLINEAR, AST_FORMAT_SPEEX, AST_FORMAT_ULAW, ast_log(), and LOG_WARNING.
|
|
Get a name from a format.
Definition at line 487 of file frame.c.
|
|
Sends a hangup to an fd.
Definition at line 383 of file frame.c. References AST_CONTROL_HANGUP, ast_fr_fdwrite(), and AST_FRAME_CONTROL.
|
|
Reads a frame from an fd.
Definition at line 321 of file frame.c. References AST_CONTROL_HANGUP, AST_FRAME_CONTROL, ast_frisolate(), ast_log(), and LOG_WARNING.
|
|
Writes a frame to an fd.
Definition at line 369 of file frame.c. References ast_log(), ast_frame::data, ast_frame::datalen, and LOG_WARNING. Referenced by ast_fr_fdhangup().
|
|
Definition at line 600 of file frame.c. References AST_CONTROL_ANSWER, AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_FLASH, AST_CONTROL_HANGUP, AST_CONTROL_OFFHOOK, AST_CONTROL_OPTION, AST_CONTROL_RADIO_KEY, AST_CONTROL_RADIO_UNKEY, AST_CONTROL_RING, AST_CONTROL_RINGING, AST_CONTROL_TAKEOFFHOOK, AST_CONTROL_WINK, AST_FRAME_CONTROL, AST_FRAME_DTMF, AST_FRAME_HTML, AST_FRAME_IAX, AST_FRAME_IMAGE, AST_FRAME_NULL, AST_FRAME_TEXT, AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_getformatname(), AST_HTML_BEGIN, AST_HTML_DATA, AST_HTML_END, AST_HTML_LDCOMPLETE, AST_HTML_LINKREJECT, AST_HTML_LINKURL, AST_HTML_NOSUPPORT, AST_HTML_UNLINK, AST_HTML_URL, ast_verbose(), COLOR_BLACK, COLOR_BRCYAN, COLOR_BRGREEN, COLOR_BRMAGENTA, COLOR_BRRED, COLOR_YELLOW, ast_frame::data, ast_frame::frametype, ast_frame::subclass, and term_color(). Referenced by ast_read(), and ast_write().
|
|
Copies a frame.
Definition at line 283 of file frame.c. References AST_FRIENDLY_OFFSET, AST_MALLOCD_HDR, ast_frame::data, ast_frame::datalen, ast_frame::delivery, ast_frame::frametype, malloc, ast_frame::samples, ast_frame::src, and ast_frame::subclass. Referenced by ast_queue_frame(), and ast_rtp_write().
|
|
|
Copies a frame.
Definition at line 242 of file frame.c. References AST_FRIENDLY_OFFSET, ast_log(), AST_MALLOCD_DATA, AST_MALLOCD_HDR, AST_MALLOCD_SRC, ast_frame::data, ast_frame::datalen, ast_frame::frametype, free, LOG_WARNING, malloc, ast_frame::mallocd, ast_frame::samples, ast_frame::src, strdup, and ast_frame::subclass. Referenced by ast_fr_fdread().
|
|
Definition at line 454 of file frame.c. References AST_FORMAT_ADPCM, AST_FORMAT_ALAW, AST_FORMAT_G723_1, AST_FORMAT_G726, AST_FORMAT_G729A, AST_FORMAT_GSM, AST_FORMAT_H261, AST_FORMAT_H263, AST_FORMAT_ILBC, AST_FORMAT_LPC10, AST_FORMAT_SLINEAR, AST_FORMAT_SPEEX, and AST_FORMAT_ULAW.
|
|
Get the name of a format.
Definition at line 392 of file frame.c. References AST_FORMAT_ADPCM, AST_FORMAT_ALAW, AST_FORMAT_G723_1, AST_FORMAT_G726, AST_FORMAT_G729A, AST_FORMAT_GSM, AST_FORMAT_H261, AST_FORMAT_H263, AST_FORMAT_ILBC, AST_FORMAT_JPEG, AST_FORMAT_LPC10, AST_FORMAT_PNG, AST_FORMAT_SLINEAR, AST_FORMAT_SPEEX, and AST_FORMAT_ULAW. Referenced by ast_frame_dump(), ast_getformatname_multiple(), ast_read(), ast_register_translator(), ast_rtp_read(), ast_rtp_write(), ast_set_read_format(), ast_set_write_format(), ast_streamfile(), ast_translator_build_path(), ast_unregister_translator(), and ast_writestream().
|
|
Get the names of a set of formats.
Definition at line 427 of file frame.c. References ast_getformatname().
|
|
Definition at line 79 of file frame.c. References AST_FRAME_VOICE, ast_log(), AST_MIN_OFFSET, AST_SMOOTHER_FLAG_G729, ast_frame::data, ast_frame::datalen, ast_frame::delivery, ast_frame::frametype, LOG_NOTICE, LOG_WARNING, ast_frame::offset, s, ast_frame::samples, SMOOTHER_SIZE, and ast_frame::subclass. Referenced by ast_rtp_write().
|
|
Definition at line 185 of file frame.c. Referenced by ast_rtp_destroy(), and ast_rtp_write().
|
|
Definition at line 69 of file frame.c. References s.
|
|
Definition at line 58 of file frame.c. References ast_smoother_reset(), malloc, and s. Referenced by ast_rtp_write().
|
|
Definition at line 134 of file frame.c. References AST_FRAME_VOICE, AST_FRIENDLY_OFFSET, AST_SMOOTHER_FLAG_G729, and s. Referenced by ast_rtp_write().
|
|
Definition at line 52 of file frame.c. References s. Referenced by ast_smoother_new().
|
|
Definition at line 74 of file frame.c. References s. Referenced by ast_rtp_write().
|