The plugin session and callbacks interface. More...
#include <plugin.h>
Data Fields | |
int(*const | init )(janus_callbacks *callback, const char *config_path) |
Plugin initialization/constructor. More... | |
void(*const | destroy )(void) |
Plugin deinitialization/destructor. More... | |
int(*const | get_api_compatibility )(void) |
Informative method to request the API version this plugin was compiled against. More... | |
int(*const | get_version )(void) |
Informative method to request the numeric version of the plugin. More... | |
const char *(*const | get_version_string )(void) |
Informative method to request the string version of the plugin. More... | |
const char *(*const | get_description )(void) |
Informative method to request a description of the plugin. More... | |
const char *(*const | get_name )(void) |
Informative method to request the name of the plugin. More... | |
const char *(*const | get_author )(void) |
Informative method to request the author of the plugin. More... | |
const char *(*const | get_package )(void) |
Informative method to request the package name of the plugin (what will be used in web applications to refer to it) More... | |
void(*const | create_session )(janus_plugin_session *handle, int *error) |
Method to create a new session/handle for a peer. More... | |
struct janus_plugin_result *(*const | handle_message )(janus_plugin_session *handle, char *transaction, json_t *message, json_t *jsep) |
Method to handle an incoming message/request from a peer. More... | |
struct json_t *(*const | handle_admin_message )(json_t *message) |
Method to handle an incoming Admin API message/request. More... | |
void(*const | setup_media )(janus_plugin_session *handle) |
Callback to be notified when the associated PeerConnection is up and ready to be used. More... | |
void(*const | incoming_rtp )(janus_plugin_session *handle, int mindex, gboolean video, char *buf, int len) |
Method to handle an incoming RTP packet from a peer. More... | |
void(*const | incoming_rtcp )(janus_plugin_session *handle, int mindex, gboolean video, char *buf, int len) |
Method to handle an incoming RTCP packet from a peer. More... | |
void(*const | incoming_data )(janus_plugin_session *handle, char *label, char *buf, int len) |
Method to handle incoming SCTP/DataChannel data from a peer (text only, for the moment) More... | |
void(*const | slow_link )(janus_plugin_session *handle, int mindex, gboolean video, gboolean uplink) |
Method to be notified by the core when too many NACKs have been received or sent by Janus, and so a slow or potentially unreliable network is to be expected for this peer. More... | |
void(*const | hangup_media )(janus_plugin_session *handle) |
Callback to be notified about DTLS alerts from a peer (i.e., the PeerConnection is not valid any more) More... | |
void(*const | destroy_session )(janus_plugin_session *handle, int *error) |
Method to destroy a session/handle for a peer. More... | |
json_t *(*const | query_session )(janus_plugin_session *handle) |
Method to get plugin-specific info of a session/handle. More... | |
The plugin session and callbacks interface.
void(* const janus_plugin::create_session)(janus_plugin_session *handle, int *error) |
Method to create a new session/handle for a peer.
[in] | handle | The plugin/gateway session that will be used for this peer |
[out] | error | An integer that may contain information about any error |
void(* const janus_plugin::destroy)(void) |
Plugin deinitialization/destructor.
void(* const janus_plugin::destroy_session)(janus_plugin_session *handle, int *error) |
Method to destroy a session/handle for a peer.
[in] | handle | The plugin/gateway session used for this peer |
[out] | error | An integer that may contain information about any error |
int(* const janus_plugin::get_api_compatibility)(void) |
Informative method to request the API version this plugin was compiled against.
const char*(* const janus_plugin::get_author)(void) |
Informative method to request the author of the plugin.
const char*(* const janus_plugin::get_description)(void) |
Informative method to request a description of the plugin.
const char*(* const janus_plugin::get_name)(void) |
Informative method to request the name of the plugin.
const char*(* const janus_plugin::get_package)(void) |
Informative method to request the package name of the plugin (what will be used in web applications to refer to it)
int(* const janus_plugin::get_version)(void) |
Informative method to request the numeric version of the plugin.
const char*(* const janus_plugin::get_version_string)(void) |
Informative method to request the string version of the plugin.
Method to handle an incoming Admin API message/request.
[in] | message | The json_t object containing the message/request JSON |
struct janus_plugin_result*(* const janus_plugin::handle_message)(janus_plugin_session *handle, char *transaction, json_t *message, json_t *jsep) |
Method to handle an incoming message/request from a peer.
[in] | handle | The plugin/gateway session used for this peer |
[in] | transaction | The transaction identifier for this message/request |
[in] | message | The json_t object containing the message/request JSON |
[in] | jsep | The json_t object containing the JSEP type/SDP, if available |
void(* const janus_plugin::hangup_media)(janus_plugin_session *handle) |
Callback to be notified about DTLS alerts from a peer (i.e., the PeerConnection is not valid any more)
[in] | handle | The plugin/gateway session used for this peer |
void(* const janus_plugin::incoming_data)(janus_plugin_session *handle, char *label, char *buf, int len) |
Method to handle incoming SCTP/DataChannel data from a peer (text only, for the moment)
[in] | handle | The plugin/gateway session used for this peer |
[in] | label | The label of the data channel to use |
[in] | buf | The message data (buffer) |
[in] | len | The buffer lenght |
void(* const janus_plugin::incoming_rtcp)(janus_plugin_session *handle, int mindex, gboolean video, char *buf, int len) |
Method to handle an incoming RTCP packet from a peer.
[in] | handle | The plugin/gateway session used for this peer |
[in] | mindex | Index of the source stream (relative to the SDP) |
[in] | video | Whether this is related to an audio or a video stream |
[in] | buf | The message data (buffer) |
[in] | len | The buffer lenght |
void(* const janus_plugin::incoming_rtp)(janus_plugin_session *handle, int mindex, gboolean video, char *buf, int len) |
Method to handle an incoming RTP packet from a peer.
[in] | handle | The plugin/gateway session used for this peer |
[in] | mindex | Index of the source stream (relative to the SDP) |
[in] | video | Whether this is an audio or a video frame |
[in] | buf | The packet data (buffer) |
[in] | len | The buffer lenght |
int(* const janus_plugin::init)(janus_callbacks *callback, const char *config_path) |
Plugin initialization/constructor.
[in] | callback | The callback instance the plugin can use to contact the Janus core |
[in] | config_path | Path of the folder where the configuration for this plugin can be found |
json_t*(* const janus_plugin::query_session)(janus_plugin_session *handle) |
Method to get plugin-specific info of a session/handle.
[in] | handle | The plugin/gateway session used for this peer |
void(* const janus_plugin::setup_media)(janus_plugin_session *handle) |
Callback to be notified when the associated PeerConnection is up and ready to be used.
[in] | handle | The plugin/gateway session used for this peer |
void(* const janus_plugin::slow_link)(janus_plugin_session *handle, int mindex, gboolean video, gboolean uplink) |
Method to be notified by the core when too many NACKs have been received or sent by Janus, and so a slow or potentially unreliable network is to be expected for this peer.
[in] | handle | The plugin/gateway session used for this peer |
[in] | uplink | Whether this is related to the uplink (Janus to peer) or downlink (peer to Janus) |
[in] | video | Whether this is related to an audio or a video stream |