Asterisk - The Open Source Telephony Project
18.5.0
|
Asterisk internal frame definitions. More...
#include "asterisk/endian.h"
Go to the source code of this file.
Macros | |
#define | AST_SMOOTHER_FLAG_BE (1 << 1) |
#define | AST_SMOOTHER_FLAG_FORCED (1 << 2) |
#define | AST_SMOOTHER_FLAG_G729 (1 << 0) |
AST_Smoother | |
#define | ast_smoother_feed(s, f) __ast_smoother_feed(s, f, 0) |
#define | ast_smoother_feed_be(s, f) __ast_smoother_feed(s, f, 0) |
#define | ast_smoother_feed_le(s, f) __ast_smoother_feed(s, f, 1) |
struct 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) |
int | ast_smoother_test_flag (struct ast_smoother *s, int flag) |
void | ast_smoother_free (struct ast_smoother *s) |
void | ast_smoother_reset (struct ast_smoother *s, int bytes) |
void | ast_smoother_reconfigure (struct ast_smoother *s, int bytes) |
Reconfigure an existing smoother to output a different number of bytes per frame. More... | |
int | __ast_smoother_feed (struct ast_smoother *s, struct ast_frame *f, int swap) |
struct ast_frame * | ast_smoother_read (struct ast_smoother *s) |
Asterisk internal frame definitions.
Definition in file smoother.h.
#define ast_smoother_feed | ( | s, | |
f | |||
) | __ast_smoother_feed(s, f, 0) |
Definition at line 76 of file smoother.h.
Referenced by ast_rtp_write(), generic_fax_exec(), mbl_read(), mbl_write(), and multicast_rtp_write().
#define ast_smoother_feed_be | ( | s, | |
f | |||
) | __ast_smoother_feed(s, f, 0) |
Definition at line 81 of file smoother.h.
Referenced by ast_rtp_write(), and multicast_rtp_write().
#define ast_smoother_feed_le | ( | s, | |
f | |||
) | __ast_smoother_feed(s, f, 1) |
Definition at line 82 of file smoother.h.
#define AST_SMOOTHER_FLAG_BE (1 << 1) |
Definition at line 35 of file smoother.h.
Referenced by ast_rtp_write(), and multicast_rtp_write().
#define AST_SMOOTHER_FLAG_FORCED (1 << 2) |
Definition at line 36 of file smoother.h.
Referenced by ast_rtp_write(), and multicast_rtp_write().
#define AST_SMOOTHER_FLAG_G729 (1 << 0) |
Definition at line 34 of file smoother.h.
Referenced by __ast_smoother_feed(), ast_smoother_read(), and smoother_frame_feed().
int __ast_smoother_feed | ( | struct ast_smoother * | s, |
struct ast_frame * | f, | ||
int | swap | ||
) |
Definition at line 133 of file smoother.c.
References ao2_bump, ast_format_cmp(), AST_FORMAT_CMP_NOT_EQUAL, ast_format_get_name(), AST_FRAME_VOICE, ast_log, AST_MIN_OFFSET, AST_SMOOTHER_FLAG_G729, ast_swapcopy_samples(), ast_frame::data, ast_frame::datalen, ast_smoother::f, ast_smoother::flags, ast_smoother::format, ast_frame_subclass::format, ast_frame::frametype, ast_smoother::len, LOG_WARNING, ast_frame::offset, ast_smoother::opt, ast_smoother::opt_needs_swap, ast_frame::ptr, ast_frame::samples, ast_smoother::samplesperbyte, ast_smoother::size, smoother_frame_feed(), SMOOTHER_SIZE, and ast_frame::subclass.
void ast_smoother_free | ( | struct ast_smoother * | s | ) |
Definition at line 220 of file smoother.c.
References ao2_cleanup, ast_free, and ast_smoother::format.
Referenced by ast_rtp_destroy(), ast_rtp_dtmf_end_with_duration(), ast_rtp_local_bridge(), ast_rtp_write(), destroy_session(), generic_fax_exec(), mbl_load_device(), multicast_rtp_destroy(), and unload_module().
int ast_smoother_get_flags | ( | struct ast_smoother * | smoother | ) |
Definition at line 118 of file smoother.c.
References ast_smoother::flags.
struct ast_smoother* ast_smoother_new | ( | int | bytes | ) |
Definition at line 108 of file smoother.c.
References ast_calloc, ast_smoother_reset(), and NULL.
Referenced by ast_rtp_write(), generic_fax_exec(), mbl_load_device(), and multicast_rtp_write().
struct ast_frame* ast_smoother_read | ( | struct ast_smoother * | s | ) |
Definition at line 169 of file smoother.c.
References ast_format_get_sample_rate(), AST_FRAME_VOICE, AST_FRIENDLY_OFFSET, ast_log, ast_samp2tv(), AST_SMOOTHER_FLAG_G729, ast_tvadd(), ast_tvzero(), ast_smoother::data, ast_frame::data, ast_frame::datalen, ast_smoother::delivery, ast_frame::delivery, ast_smoother::f, ast_smoother::flags, ast_smoother::format, ast_frame_subclass::format, ast_smoother::framedata, ast_frame::frametype, ast_smoother::len, LOG_WARNING, NULL, ast_frame::offset, ast_smoother::opt, ast_frame::ptr, ast_frame::samples, ast_smoother::samplesperbyte, ast_smoother::size, and ast_frame::subclass.
Referenced by ast_rtp_write(), generic_fax_exec(), mbl_read(), mbl_write(), and multicast_rtp_write().
void ast_smoother_reconfigure | ( | struct ast_smoother * | s, |
int | bytes | ||
) |
Reconfigure an existing smoother to output a different number of bytes per frame.
s | the smoother to reconfigure |
bytes | the desired number of bytes per output frame |
Definition at line 86 of file smoother.c.
References NULL, ast_smoother::opt, ast_smoother::opt_needs_swap, ast_smoother::size, and smoother_frame_feed().
void ast_smoother_reset | ( | struct ast_smoother * | s, |
int | bytes | ||
) |
Definition at line 79 of file smoother.c.
References ao2_cleanup, ast_smoother::format, and ast_smoother::size.
Referenced by ast_smoother_new(), and mbl_new().
void ast_smoother_set_flags | ( | struct ast_smoother * | smoother, |
int | flags | ||
) |
Definition at line 123 of file smoother.c.
References ast_smoother::flags.
Referenced by ast_rtp_write(), and multicast_rtp_write().
int ast_smoother_test_flag | ( | struct ast_smoother * | s, |
int | flag | ||
) |
Definition at line 128 of file smoother.c.
References ast_smoother::flags.
Referenced by ast_rtp_write(), and multicast_rtp_write().