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.   | |
| void(*const | destroy )(void) | 
| Plugin deinitialization/destructor.   | |
| int(*const | get_api_compatibility )(void) | 
| Informative method to request the API version this plugin was compiled against.   | |
| int(*const | get_version )(void) | 
| Informative method to request the numeric version of the plugin.   | |
| const char *(*const | get_version_string )(void) | 
| Informative method to request the string version of the plugin.   | |
| const char *(*const | get_description )(void) | 
| Informative method to request a description of the plugin.   | |
| const char *(*const | get_name )(void) | 
| Informative method to request the name of the plugin.   | |
| const char *(*const | get_author )(void) | 
| Informative method to request the author of the plugin.   | |
| 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)   | |
| void(*const | create_session )(janus_plugin_session *handle, int *error) | 
| Method to create a new session/handle for a peer.   | |
| 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.   | |
| struct json_t *(*const | handle_admin_message )(json_t *message) | 
| Method to handle an incoming Admin API message/request.   | |
| void(*const | setup_media )(janus_plugin_session *handle) | 
| Callback to be notified when the associated PeerConnection is up and ready to be used.   | |
| void(*const | incoming_rtp )(janus_plugin_session *handle, janus_plugin_rtp *packet) | 
| Method to handle an incoming RTP packet from a peer.   | |
| void(*const | incoming_rtcp )(janus_plugin_session *handle, janus_plugin_rtcp *packet) | 
| Method to handle an incoming RTCP packet from a peer.   | |
| void(*const | incoming_data )(janus_plugin_session *handle, janus_plugin_data *packet) | 
| Method to handle incoming SCTP/DataChannel data from a peer (text only, for the moment)   | |
| void(*const | data_ready )(janus_plugin_session *handle) | 
| Method to be notified about the fact that the datachannel is ready to be written.   | |
| 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.   | |
| 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)   | |
| void(*const | destroy_session )(janus_plugin_session *handle, int *error) | 
| Method to destroy a session/handle for a peer.   | |
| json_t *(*const | query_session )(janus_plugin_session *handle) | 
| Method to get plugin-specific info of a session/handle.   | |
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::data_ready) (janus_plugin_session *handle) | 
Method to be notified about the fact that the datachannel is ready to be written.
| [in] | handle | The plugin/gateway session used for this peer | 
| 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.
message and jsep json_t objects to plugins. This means that you'll have to decrease your own reference yourself with a json_decref when you're done with them. You'll also have to free transaction with g_free | [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, janus_plugin_data *packet) | 
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] | packet | The message data and related info | 
| void(*const janus_plugin::incoming_rtcp) (janus_plugin_session *handle, janus_plugin_rtcp *packet) | 
Method to handle an incoming RTCP packet from a peer.
| [in] | handle | The plugin/gateway session used for this peer | 
| [in] | packet | The RTP packet and related data | 
| void(*const janus_plugin::incoming_rtp) (janus_plugin_session *handle, janus_plugin_rtp *packet) | 
Method to handle an incoming RTP packet from a peer.
| [in] | handle | The plugin/gateway session used for this peer | 
| [in] | packet | The RTP packet and related data | 
| 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] | mindex | Index of the stream the event refers to (relative to the SDP) | 
| [in] | video | Whether this is related to an audio or a video stream | 
| [in] | uplink | Whether this is related to the uplink (Janus to peer) or downlink (peer to Janus) |