55 .
type =
"REMB Values",
94 remb_values = remb_store->
data;
146 frexp(bitrate, &exp);
147 exp = exp > 18 ? exp - 18 : 0;
158 unsigned int bitrate;
168 e->
command =
"remb set {send|receive}";
170 "Usage: remb set {send|receive} <channel> <bitrate in bits>\n" 171 " Set the REMB value which overwrites what we send or receive\n";
181 if (sscanf(a->
argv[4],
"%30d", &bitrate) != 1) {
182 ast_cli(a->
fd,
"%s is not a valid bitrate in bits\n", a->
argv[4]);
184 }
else if (strcasecmp(a->
argv[2],
"send") && strcasecmp(a->
argv[2],
"receive")) {
185 ast_cli(a->
fd,
"%s is not a valid direction for REMB\n", a->
argv[2]);
202 if (framehook_id < 0) {
203 ast_cli(a->
fd,
"Could not attach framehook for modifying REMB\n");
209 remb_values =
ast_calloc(1,
sizeof(*remb_values));
211 ast_cli(a->
fd,
"Could not create a place to store provided REMB value\n");
220 ast_cli(a->
fd,
"Could not create a place to store provided REMB value\n");
228 remb_store->
data = remb_values;
231 remb_values = remb_store->
data;
234 if (!strcasecmp(a->
argv[2],
"send")) {
236 }
else if (!strcasecmp(a->
argv[2],
"receive")) {
243 ast_cli(a->
fd,
"Set REMB %s override to a bitrate of %s on %s\n", a->
argv[2], a->
argv[3], a->
argv[4]);
#define ast_channel_lock(chan)
Main Channel structure associated with a channel.
#define AST_CLI_DEFINE(fn, txt,...)
Asterisk main include file. File version handling, generic pbx functions.
float send_bitrate
The amount of bitrate to use for REMB sent to the channel.
static char * handle_remb_set(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
int ast_cli_unregister_multiple(struct ast_cli_entry *e, int len)
Unregister multiple commands.
#define ast_channel_unref(c)
Decrease channel reference count.
descriptor for a cli entry.
ast_framehook_event
These are the types of events that the framehook's event callback can receive.
static void remb_values_free(void *data)
int ast_framehook_detach(struct ast_channel *chan, int framehook_id)
Detach an framehook from a channel.
An object that represents data received in a feedback report.
Structure for a data store type.
#define ast_cli_register_multiple(e, len)
Register multiple commands.
Structure for a data store object.
struct ast_datastore * ast_channel_datastore_find(struct ast_channel *chan, const struct ast_datastore_info *info, const char *uid)
Find a datastore on a channel.
struct ast_rtp_rtcp_feedback_remb remb
void ast_cli(int fd, const char *fmt,...)
float receive_bitrate
The amount of bitrate to use for REMB received from the channel.
struct ast_frame_subclass subclass
int ast_framehook_attach(struct ast_channel *chan, struct ast_framehook_interface *i)
Attach an framehook onto a channel for frame interception.
static int load_module(void)
General Asterisk PBX channel definitions.
static int unload_module(void)
#define AST_FRAMEHOOK_INTERFACE_VERSION
#define ast_channel_unlock(chan)
#define ast_calloc(num, len)
A wrapper for calloc()
static const struct ast_datastore_info remb_info
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS|AST_MODFLAG_LOAD_ORDER, "HTTP Phone Provisioning",.support_level=AST_MODULE_SUPPORT_EXTENDED,.load=load_module,.unload=unload_module,.reload=reload,.load_pri=AST_MODPRI_CHANNEL_DEPEND,.requires="http",)
static struct ast_cli_entry remb_cli[]
Standard Command Line Interface.
char * ast_complete_channels(const char *line, const char *word, int pos, int state, int rpos)
Command completion for the list of active channels.
Data structure associated with a single frame of data.
#define AST_RTP_RTCP_PSFB
#define ast_datastore_alloc(info, uid)
union ast_frame::@263 data
#define ASTERISK_GPL_KEY
The text the key() function should return.
struct ast_channel * ast_channel_get_by_name(const char *name)
Find a channel by name.
Pluggable RTP Architecture.
Asterisk module definitions.
int ast_channel_datastore_add(struct ast_channel *chan, struct ast_datastore *datastore)
Add a datastore to a channel.
static struct ast_frame * remb_hook_event_cb(struct ast_channel *chan, struct ast_frame *frame, enum ast_framehook_event event, void *data)
#define AST_RTP_RTCP_FMT_REMB