#include <asterisk/lock.h>
#include <asterisk/frame.h>
#include <asterisk/logger.h>
#include <asterisk/options.h>
#include <asterisk/cli.h>
#include <asterisk/term.h>
#include <asterisk/utils.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include "asterisk.h"
Include dependency graph for frame.c:
Go to the source code of this file.
Data Structures | |
struct | ast_smoother |
Defines | |
#define | SMOOTHER_SIZE 8000 |
Functions | |
void | ast_smoother_reset (struct ast_smoother *s, int size) |
ast_smoother * | ast_smoother_new (int size) |
int | ast_smoother_get_flags (struct ast_smoother *s) |
void | ast_smoother_set_flags (struct ast_smoother *s, int flags) |
int | ast_smoother_feed (struct ast_smoother *s, struct ast_frame *f) |
ast_frame * | ast_smoother_read (struct ast_smoother *s) |
void | ast_smoother_free (struct ast_smoother *s) |
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 *f) |
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. | |
void | ast_frame_dump (char *name, struct ast_frame *f, char *prefix) |
int | init_framer (void) |
Variables | |
ast_cli_entry | cli_show_codecs |
ast_cli_entry | cli_show_codecs_audio |
ast_cli_entry | cli_show_codecs_video |
ast_cli_entry | cli_show_codecs_image |
ast_cli_entry | cli_show_codec_n |
|
Definition at line 35 of file frame.c. Referenced by ast_smoother_feed(). |
|
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().
|
|
Definition at line 782 of file frame.c. References ast_cli_register(), cli_show_codec_n, cli_show_codecs, cli_show_codecs_audio, cli_show_codecs_image, and cli_show_codecs_video. Referenced by main().
|
|
Initial value:
Definition at line 597 of file frame.c. Referenced by init_framer(). |
|
Initial value:
Definition at line 562 of file frame.c. Referenced by init_framer(). |
|
Initial value:
Definition at line 564 of file frame.c. Referenced by init_framer(). |
|
Initial value:
Definition at line 568 of file frame.c. Referenced by init_framer(). |
|
Initial value:
Definition at line 566 of file frame.c. Referenced by init_framer(). |