34 #include "asterisk/channel.h"
65 framehook->chan = NULL;
67 if (framehook->i.destroy_cb) {
68 framehook->i.destroy_cb(framehook->i.data);
99 ast_log(
LOG_ERROR,
"Version '%hu' of framehook interface not what we compiled against (%hu)\n",
127 return framehook->
id;
140 if (framehook->
id ==
id) {
ast_framehook_event_callback event_cb
Main Channel structure associated with a channel.
Asterisk main include file. File version handling, generic pbx functions.
static struct ast_frame * framehook_list_push_event(struct ast_framehook_list *framehooks, struct ast_frame *frame, enum ast_framehook_event event)
int ast_framehook_list_is_empty(struct ast_framehook_list *framehooks)
Determine if an framehook list is empty or not.
ast_framehook_event
These are the types of events that the framehook's event callback can receive.
int ast_framehook_detach(struct ast_channel *chan, int framehook_id)
Detach an framehook from a channel.
#define AST_LIST_EMPTY(head)
Checks whether the specified list contains any entries.
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...
#define AST_LIST_TRAVERSE_SAFE_END
Closes a safe loop traversal block.
int ast_framehook_attach(struct ast_channel *chan, struct ast_framehook_interface *i)
Attach an framehook onto a channel for frame interception.
struct ast_framehook::@272 list
Asterisk internal frame definitions.
#define AST_LIST_REMOVE_CURRENT(field)
Removes the current entry from a list during a traversal.
struct ast_framehook_list::@273 list
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_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
#define AST_FRAMEHOOK_INTERFACE_VERSION
struct ast_framehook_list * framehooks
void ast_log(int level, const char *file, int line, const char *function, const char *fmt,...)
Used for sending a log message This is the standard logger function. Probably the only way you will i...
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...
#define AST_LIST_ENTRY(type)
Declare a forward link structure inside a list entry.
struct ast_framehook_interface i
Data structure associated with a single frame of data.
int detach_and_destroy_me
#define AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field)
Loops safely over (traverses) the entries in a list.
struct ast_channel * chan
static void framehook_detach_and_destroy(struct ast_framehook *framehook)
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.
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.