Janus_lua_data.h File Reference - Janus WebRTC Server

Fork me on GitHub Janus (multistream)
  • Home
  • Demos
  • Documentation
  • Papers
  • Need help?
  • Janus (0.x)
  • JanusCon!
  • Main Page
  • Related Pages
  • Topics
  • Data Structures
  • Files
  •  
  • File List
  • Globals
Loading... Searching... No Matches
  • src
  • plugins
Data Structures | Typedefs | Functions | Variables janus_lua_data.h File ReferencePlugins » Lua plugin API

Janus Lua data/session definition (headers) More...

#include <lua.h> #include <lualib.h> #include <lauxlib.h> #include "plugin.h" #include "debug.h" #include "apierror.h" #include "config.h" #include "mutex.h" #include "rtp.h" #include "rtcp.h" #include "sdp-utils.h" #include "record.h" #include "utils.h" Include dependency graph for janus_lua_data.h: This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  janus_lua_session
 

Typedefs

typedef struct janus_lua_session janus_lua_session
 

Functions

janus_lua_session * janus_lua_lookup_session (janus_plugin_session *handle)
 

Variables

volatile gint lua_initialized
 
volatile gint lua_stopping
 
janus_callbacks * lua_janus_core
 
lua_State * lua_state
 
janus_mutex lua_mutex
 
GHashTable * lua_sessions
 
GHashTable * lua_ids
 
janus_mutex lua_sessions_mutex
 

Detailed Description

Janus Lua data/session definition (headers)

AuthorLorenzo Miniero loren.nosp@m.zo@m.nosp@m.eetec.nosp@m.ho.c.nosp@m.om CopyrightGNU General Public License v3

The Janus Lua plugin implements all the mandatory hooks to allow the C code to interact with a custom Lua script, and vice-versa. That said, the janus_lua_extra.c code allows for custom hooks to be added in C, to expose additional Lua functions and implement more complex media management than the one provided by the stock plugin. For this to work, though, the janus_lua_session object and its indexing in the hashtable need to be defined externally, which is what this file is for.

Notice that all the management associated to sessions (creating or destroying sessions, locking their global mutex, updating the hashtable) is done in the core of the Lua plugin: here we only define them, so that they can be accessed/used by the extra code too.

Lua plugin API

Typedef Documentation

◆ janus_lua_session

typedef struct janus_lua_session janus_lua_session

Function Documentation

◆ janus_lua_lookup_session()

janus_lua_session * janus_lua_lookup_session ( janus_plugin_session * handle)

Variable Documentation

◆ lua_ids

GHashTable * lua_ids

◆ lua_initialized

volatile gint lua_initialized
extern

◆ lua_janus_core

janus_callbacks* lua_janus_core
extern

◆ lua_mutex

janus_mutex lua_mutex
extern

◆ lua_sessions

GHashTable* lua_sessions
extern

◆ lua_sessions_mutex

janus_mutex lua_sessions_mutex
extern

◆ lua_state

lua_State* lua_state
extern

◆ lua_stopping

volatile gint lua_stopping
Last updated on Thu Jul 10 2025 — Janus WebRTC Server © Meetecho 2014-2025

Từ khóa » H Lửa