Fork me on GitHub
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
janus_lua.c File Reference

Janus Lua plugin. More...

#include <jansson.h>
#include "janus_lua_data.h"
#include "janus_lua_extra.h"
Include dependency graph for janus_lua.c:

Data Structures

struct  janus_lua_callback
 
struct  janus_lua_rtp_relay_packet
 
struct  janus_lua_async_event
 

Macros

#define JANUS_LUA_VERSION   1
 
#define JANUS_LUA_VERSION_STRING   "0.0.1"
 
#define JANUS_LUA_DESCRIPTION   "A custom plugin for the Lua framework."
 
#define JANUS_LUA_NAME   "Janus Lua plugin"
 
#define JANUS_LUA_AUTHOR   "Meetecho s.r.l."
 
#define JANUS_LUA_PACKAGE   "janus.plugin.lua"
 

Typedefs

typedef enum janus_lua_event janus_lua_event
 
typedef struct janus_lua_callback janus_lua_callback
 
typedef struct janus_lua_rtp_relay_packet janus_lua_rtp_relay_packet
 
typedef enum janus_lua_async_event_type janus_lua_async_event_type
 
typedef struct janus_lua_async_event janus_lua_async_event
 

Enumerations

enum  janus_lua_event { janus_lua_event_none = 0 , janus_lua_event_resume , janus_lua_event_exit }
 
enum  janus_lua_async_event_type { janus_lua_async_event_type_none = 0 , janus_lua_async_event_type_pushevent }
 

Functions

janus_plugincreate (void)
 
int janus_lua_init (janus_callbacks *callback, const char *config_path)
 
void janus_lua_destroy (void)
 
int janus_lua_get_api_compatibility (void)
 
int janus_lua_get_version (void)
 
const char * janus_lua_get_version_string (void)
 
const char * janus_lua_get_description (void)
 
const char * janus_lua_get_name (void)
 
const char * janus_lua_get_author (void)
 
const char * janus_lua_get_package (void)
 
void janus_lua_create_session (janus_plugin_session *handle, int *error)
 
struct janus_plugin_resultjanus_lua_handle_message (janus_plugin_session *handle, char *transaction, json_t *message, json_t *jsep)
 
json_tjanus_lua_handle_admin_message (json_t *message)
 
void janus_lua_setup_media (janus_plugin_session *handle)
 
void janus_lua_incoming_rtp (janus_plugin_session *handle, janus_plugin_rtp *packet)
 
void janus_lua_incoming_rtcp (janus_plugin_session *handle, janus_plugin_rtcp *packet)
 
void janus_lua_incoming_data (janus_plugin_session *handle, janus_plugin_data *packet)
 
void janus_lua_data_ready (janus_plugin_session *handle)
 
void janus_lua_slow_link (janus_plugin_session *handle, int mindex, gboolean video, gboolean uplink)
 
void janus_lua_hangup_media (janus_plugin_session *handle)
 
void janus_lua_destroy_session (janus_plugin_session *handle, int *error)
 
json_tjanus_lua_query_session (janus_plugin_session *handle)
 
janus_lua_sessionjanus_lua_lookup_session (janus_plugin_session *handle)
 

Variables

volatile gint lua_initialized = 0
 
volatile gint lua_stopping = 0
 
janus_callbackslua_janus_core = NULL
 
lua_State * lua_state = NULL
 
janus_mutex lua_mutex = JANUS_MUTEX_INITIALIZER
 
GHashTable * lua_sessions
 
GHashTable * lua_ids
 
janus_mutex lua_sessions_mutex = JANUS_MUTEX_INITIALIZER
 

Detailed Description

Janus Lua plugin.

Author
Lorenzo Miniero loren.nosp@m.zo@m.nosp@m.eetec.nosp@m.ho.c.nosp@m.om

Check the Lua plugin documentation for more details.

Plugins Lua plugin API

Macro Definition Documentation

◆ JANUS_LUA_AUTHOR

#define JANUS_LUA_AUTHOR   "Meetecho s.r.l."

◆ JANUS_LUA_DESCRIPTION

#define JANUS_LUA_DESCRIPTION   "A custom plugin for the Lua framework."

◆ JANUS_LUA_NAME

#define JANUS_LUA_NAME   "Janus Lua plugin"

◆ JANUS_LUA_PACKAGE

#define JANUS_LUA_PACKAGE   "janus.plugin.lua"

◆ JANUS_LUA_VERSION

#define JANUS_LUA_VERSION   1

◆ JANUS_LUA_VERSION_STRING

#define JANUS_LUA_VERSION_STRING   "0.0.1"

Typedef Documentation

◆ janus_lua_async_event

typedef struct janus_lua_async_event janus_lua_async_event

◆ janus_lua_async_event_type

◆ janus_lua_callback

typedef struct janus_lua_callback janus_lua_callback

◆ janus_lua_event

◆ janus_lua_rtp_relay_packet

typedef struct janus_lua_rtp_relay_packet janus_lua_rtp_relay_packet

Enumeration Type Documentation

◆ janus_lua_async_event_type

Enumerator
janus_lua_async_event_type_none 
janus_lua_async_event_type_pushevent 

◆ janus_lua_event

Enumerator
janus_lua_event_none 
janus_lua_event_resume 
janus_lua_event_exit 

Function Documentation

◆ create()

janus_plugin * create ( void )

◆ janus_lua_create_session()

void janus_lua_create_session ( janus_plugin_session * handle,
int * error )

◆ janus_lua_data_ready()

void janus_lua_data_ready ( janus_plugin_session * handle)

◆ janus_lua_destroy()

void janus_lua_destroy ( void )

◆ janus_lua_destroy_session()

void janus_lua_destroy_session ( janus_plugin_session * handle,
int * error )

◆ janus_lua_get_api_compatibility()

int janus_lua_get_api_compatibility ( void )

◆ janus_lua_get_author()

const char * janus_lua_get_author ( void )

◆ janus_lua_get_description()

const char * janus_lua_get_description ( void )

◆ janus_lua_get_name()

const char * janus_lua_get_name ( void )

◆ janus_lua_get_package()

const char * janus_lua_get_package ( void )

◆ janus_lua_get_version()

int janus_lua_get_version ( void )

◆ janus_lua_get_version_string()

const char * janus_lua_get_version_string ( void )

◆ janus_lua_handle_admin_message()

json_t * janus_lua_handle_admin_message ( json_t * message)

◆ janus_lua_handle_message()

struct janus_plugin_result * janus_lua_handle_message ( janus_plugin_session * handle,
char * transaction,
json_t * message,
json_t * jsep )

◆ janus_lua_hangup_media()

void janus_lua_hangup_media ( janus_plugin_session * handle)

◆ janus_lua_incoming_data()

void janus_lua_incoming_data ( janus_plugin_session * handle,
janus_plugin_data * packet )

◆ janus_lua_incoming_rtcp()

void janus_lua_incoming_rtcp ( janus_plugin_session * handle,
janus_plugin_rtcp * packet )

◆ janus_lua_incoming_rtp()

void janus_lua_incoming_rtp ( janus_plugin_session * handle,
janus_plugin_rtp * packet )

◆ janus_lua_init()

int janus_lua_init ( janus_callbacks * callback,
const char * config_path )

◆ janus_lua_lookup_session()

janus_lua_session * janus_lua_lookup_session ( janus_plugin_session * handle)

◆ janus_lua_query_session()

json_t * janus_lua_query_session ( janus_plugin_session * handle)

◆ janus_lua_setup_media()

void janus_lua_setup_media ( janus_plugin_session * handle)

◆ janus_lua_slow_link()

void janus_lua_slow_link ( janus_plugin_session * handle,
int mindex,
gboolean video,
gboolean uplink )

Variable Documentation

◆ lua_ids

GHashTable * lua_ids

◆ lua_initialized

volatile gint lua_initialized = 0

◆ lua_janus_core

janus_callbacks* lua_janus_core = NULL

◆ lua_mutex

◆ lua_sessions

GHashTable* lua_sessions

◆ lua_sessions_mutex

janus_mutex lua_sessions_mutex = JANUS_MUTEX_INITIALIZER

◆ lua_state

lua_State* lua_state = NULL

◆ lua_stopping

volatile gint lua_stopping = 0