94 skip_size =
sizeof(int) * framehooks->
count;
96 memset(skip, 0, skip_size);
100 original_frame = frame;
118 if (frame != original_frame) {
127 }
while (frame != original_frame);
138 ast_log(
LOG_ERROR,
"Version '%hu' of framehook interface not what we compiled against (%i)\n",
146 framehook->
chan = chan;
174 return framehook->
id;
187 if (framehook->
id ==
id) {
226 int moved_framehook_id;
260 if (moved_framehook_id < 0) {
261 ast_log(
LOG_WARNING,
"Failed framehook copy during masquerade. Expect loss of features.\n");
Asterisk main include file. File version handling, generic pbx functions.
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
#define ast_calloc(num, len)
A wrapper for calloc()
General Asterisk PBX channel definitions.
void ast_channel_set_unbridged_nolock(struct ast_channel *chan, int value)
Variant of ast_channel_set_unbridged. Use this if the channel is already locked prior to calling.
void ast_channel_framehooks_set(struct ast_channel *chan, struct ast_framehook_list *value)
struct ast_framehook_list * ast_channel_framehooks(const struct ast_channel *chan)
int ast_channel_is_bridged(const struct ast_channel *chan)
Determine if a channel is in a bridge.
int ast_framehook_list_contains_no_active_of_type(struct ast_framehook_list *framehooks, enum ast_frame_type type)
Determine if a framehook list is free of active framehooks consuming a specific type of frame.
int ast_framehook_attach(struct ast_channel *chan, struct ast_framehook_interface *i)
Attach an framehook onto a channel for frame interception.
static void framehook_detach(struct ast_framehook *framehook, enum framehook_detachment_mode mode)
struct ast_frame * ast_framehook_list_read_event(struct ast_framehook_list *framehooks, struct ast_frame *frame)
This is used by the channel API push a frame read event to a channel's framehook list.
int ast_framehook_detach(struct ast_channel *chan, int id)
Detach an framehook from a channel.
int ast_framehook_list_destroy(struct ast_channel *chan)
This is used by the channel API to detach and destroy all framehooks on a channel during channel dest...
void ast_framehook_list_fixup(struct ast_channel *old_chan, struct ast_channel *new_chan)
This is used by the channel API during a masquerade operation to move all mobile framehooks from the ...
int ast_framehook_list_contains_no_active(struct ast_framehook_list *framehooks)
Determine if a framehook list is free of active framehooks or not.
int ast_framehook_list_is_empty(struct ast_framehook_list *framehooks)
Determine if an framehook list is empty or not.
framehook_detachment_mode
@ FRAMEHOOK_DETACH_DESTROY
@ FRAMEHOOK_DETACH_PRESERVE
struct ast_frame * ast_framehook_list_write_event(struct ast_framehook_list *framehooks, struct ast_frame *frame)
This is used by the channel API push a frame write event to a channel's framehook list.
static struct ast_frame * framehook_list_push_event(struct ast_framehook_list *framehooks, struct ast_frame *frame, enum ast_framehook_event event)
ast_framehook_event
These are the types of events that the framehook's event callback can receive.
@ AST_FRAMEHOOK_EVENT_ATTACHED
@ AST_FRAMEHOOK_EVENT_DETACHED
@ AST_FRAMEHOOK_EVENT_WRITE
@ AST_FRAMEHOOK_EVENT_READ
#define AST_FRAMEHOOK_INTERFACE_VERSION
Asterisk internal frame definitions.
ast_frame_type
Frame types.
A set of macros to manage forward-linked lists.
#define AST_LIST_HEAD_NOLOCK(name, type)
Defines a structure to be used to hold a list of specified type (with no lock).
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define AST_LIST_EMPTY(head)
Checks whether the specified list contains any entries.
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
#define AST_LIST_TRAVERSE_SAFE_END
Closes a safe loop traversal block.
#define AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field)
Loops safely over (traverses) the entries in a list.
#define AST_LIST_REMOVE_CURRENT(field)
Removes the current entry from a list during a traversal.
#define AST_LIST_REMOVE_HEAD(head, field)
Removes and returns the head entry from a list.
Main Channel structure associated with a channel.
Data structure associated with a single frame of data.
ast_framehook_chan_fixup_callback chan_fixup_cb
ast_framehook_event_callback event_cb
ast_framehook_consume_callback consume_cb
ast_framehook_chan_fixup_callback chan_breakdown_cb
ast_framehook_destroy_callback destroy_cb
struct ast_framehook_list::@358 list
struct ast_framehook::@357 list
struct ast_framehook_interface i
struct ast_channel * chan
int detach_and_destroy_me