Fork me on GitHub
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
janus_callbacks Struct Reference

Callbacks to contact the gateway. More...

#include <plugin.h>

Data Fields

int(*const push_event )(janus_plugin_session *handle, janus_plugin *plugin, const char *transaction, const char *message, const char *sdp_type, const char *sdp)
 Callback to push events/messages to a peer.
void(*const relay_rtp )(janus_plugin_session *handle, int video, char *buf, int len)
 Callback to relay RTP packets to a peer.
void(*const relay_rtcp )(janus_plugin_session *handle, int video, char *buf, int len)
 Callback to relay RTCP messages to a peer.
void(*const relay_data )(janus_plugin_session *handle, char *buf, int len)
 Callback to relay SCTP/DataChannel messages to a peer.
void(*const close_pc )(janus_plugin_session *handle)
 Callback to ask the core to close a WebRTC PeerConnection.
void(*const end_session )(janus_plugin_session *handle)
 Callback to ask the core to get rid of a plugin/gateway session.

Detailed Description

Callbacks to contact the gateway.

Field Documentation

void(* const janus_callbacks::close_pc)(janus_plugin_session *handle)

Callback to ask the core to close a WebRTC PeerConnection.

Note
A call to this method will result in the core invoking the hangup_media callback on this plugin when done
Parameters
[in]handleThe plugin/gateway session that the PeerConnection is related to
void(* const janus_callbacks::end_session)(janus_plugin_session *handle)

Callback to ask the core to get rid of a plugin/gateway session.

Note
A call to this method will result in the core invoking the destroy_session callback on this plugin when done
Parameters
[in]handleThe plugin/gateway session to get rid of
int(* const janus_callbacks::push_event)(janus_plugin_session *handle, janus_plugin *plugin, const char *transaction, const char *message, const char *sdp_type, const char *sdp)

Callback to push events/messages to a peer.

Parameters
[in]handleThe plugin/gateway session used for this peer
[in]pluginThe plugin instance that is sending the message/event
[in]transactionThe transaction identifier this message refers to
[in]messageThe stringified version of the JSON message
[in]sdp_typeThe type of the SDP attached to the message/event, if any (offer/answer)
[in]sdpThe SDP attached to the message/event, if any (in case the plugin is requesting or responding to a media setup)
void(* const janus_callbacks::relay_data)(janus_plugin_session *handle, char *buf, int len)

Callback to relay SCTP/DataChannel messages to a peer.

Parameters
[in]handleThe plugin/gateway session that will be used for this peer
[in]bufThe message data (buffer)
[in]lenThe buffer lenght
void(* const janus_callbacks::relay_rtcp)(janus_plugin_session *handle, int video, char *buf, int len)

Callback to relay RTCP messages to a peer.

Parameters
[in]handleThe plugin/gateway session that will be used for this peer
[in]videoWhether this is related to an audio or a video stream
[in]bufThe message data (buffer)
[in]lenThe buffer lenght
void(* const janus_callbacks::relay_rtp)(janus_plugin_session *handle, int video, char *buf, int len)

Callback to relay RTP packets to a peer.

Parameters
[in]handleThe plugin/gateway session used for this peer
[in]videoWhether this is an audio or a video frame
[in]bufThe packet data (buffer)
[in]lenThe buffer lenght

The documentation for this struct was generated from the following file: