Fork me on GitHub
Data Structures | Macros | Typedefs | Enumerations | Functions
janus_videoroom.c File Reference

Janus VideoRoom plugin. More...

#include "plugin.h"
#include <jansson.h>
#include <netdb.h>
#include "../debug.h"
#include "../apierror.h"
#include "../config.h"
#include "../mutex.h"
#include "../rtp.h"
#include "../rtpsrtp.h"
#include "../rtcp.h"
#include "../record.h"
#include "../sdp-utils.h"
#include "../utils.h"
#include "../ip-utils.h"
#include <sys/types.h>
#include <sys/socket.h>
Include dependency graph for janus_videoroom.c:

Data Structures

struct  janus_videoroom_message
 
struct  janus_videoroom
 
struct  janus_videoroom_session
 
struct  janus_videoroom_rtp_forwarder
 
struct  janus_videoroom_srtp_context
 
struct  janus_videoroom_rtcp_receiver
 
struct  janus_videoroom_publisher
 
struct  janus_videoroom_subscriber
 
struct  janus_videoroom_rtp_relay_packet
 

Macros

#define JANUS_VIDEOROOM_VERSION   9
 
#define JANUS_VIDEOROOM_VERSION_STRING   "0.0.9"
 
#define JANUS_VIDEOROOM_DESCRIPTION   "This is a plugin implementing a videoconferencing SFU (Selective Forwarding Unit) for Janus, that is an audio/video router."
 
#define JANUS_VIDEOROOM_NAME   "JANUS VideoRoom plugin"
 
#define JANUS_VIDEOROOM_AUTHOR   "Meetecho s.r.l."
 
#define JANUS_VIDEOROOM_PACKAGE   "janus.plugin.videoroom"
 
#define JANUS_VIDEOROOM_ERROR_UNKNOWN_ERROR   499
 
#define JANUS_VIDEOROOM_ERROR_NO_MESSAGE   421
 
#define JANUS_VIDEOROOM_ERROR_INVALID_JSON   422
 
#define JANUS_VIDEOROOM_ERROR_INVALID_REQUEST   423
 
#define JANUS_VIDEOROOM_ERROR_JOIN_FIRST   424
 
#define JANUS_VIDEOROOM_ERROR_ALREADY_JOINED   425
 
#define JANUS_VIDEOROOM_ERROR_NO_SUCH_ROOM   426
 
#define JANUS_VIDEOROOM_ERROR_ROOM_EXISTS   427
 
#define JANUS_VIDEOROOM_ERROR_NO_SUCH_FEED   428
 
#define JANUS_VIDEOROOM_ERROR_MISSING_ELEMENT   429
 
#define JANUS_VIDEOROOM_ERROR_INVALID_ELEMENT   430
 
#define JANUS_VIDEOROOM_ERROR_INVALID_SDP_TYPE   431
 
#define JANUS_VIDEOROOM_ERROR_PUBLISHERS_FULL   432
 
#define JANUS_VIDEOROOM_ERROR_UNAUTHORIZED   433
 
#define JANUS_VIDEOROOM_ERROR_ALREADY_PUBLISHED   434
 
#define JANUS_VIDEOROOM_ERROR_NOT_PUBLISHED   435
 
#define JANUS_VIDEOROOM_ERROR_ID_EXISTS   436
 
#define JANUS_VIDEOROOM_ERROR_INVALID_SDP   437
 

Typedefs

typedef enum janus_videoroom_p_type janus_videoroom_p_type
 
typedef struct janus_videoroom_message janus_videoroom_message
 
typedef struct janus_videoroom janus_videoroom
 
typedef struct janus_videoroom_session janus_videoroom_session
 
typedef struct janus_videoroom_srtp_context janus_videoroom_srtp_context
 
typedef struct janus_videoroom_rtp_forwarder janus_videoroom_rtp_forwarder
 
typedef struct janus_videoroom_rtcp_receiver janus_videoroom_rtcp_receiver
 
typedef struct janus_videoroom_publisher janus_videoroom_publisher
 
typedef struct janus_videoroom_subscriber janus_videoroom_subscriber
 
typedef struct janus_videoroom_rtp_relay_packet janus_videoroom_rtp_relay_packet
 

Enumerations

enum  janus_videoroom_p_type { janus_videoroom_p_type_none = 0, janus_videoroom_p_type_subscriber, janus_videoroom_p_type_publisher }
 

Functions

janus_plugincreate (void)
 
int janus_videoroom_init (janus_callbacks *callback, const char *config_path)
 
void janus_videoroom_destroy (void)
 
int janus_videoroom_get_api_compatibility (void)
 
int janus_videoroom_get_version (void)
 
const char * janus_videoroom_get_version_string (void)
 
const char * janus_videoroom_get_description (void)
 
const char * janus_videoroom_get_name (void)
 
const char * janus_videoroom_get_author (void)
 
const char * janus_videoroom_get_package (void)
 
void janus_videoroom_create_session (janus_plugin_session *handle, int *error)
 
struct janus_plugin_resultjanus_videoroom_handle_message (janus_plugin_session *handle, char *transaction, json_t *message, json_t *jsep)
 
json_tjanus_videoroom_handle_admin_message (json_t *message)
 
void janus_videoroom_setup_media (janus_plugin_session *handle)
 
void janus_videoroom_incoming_rtp (janus_plugin_session *handle, janus_plugin_rtp *packet)
 
void janus_videoroom_incoming_rtcp (janus_plugin_session *handle, janus_plugin_rtcp *packet)
 
void janus_videoroom_incoming_data (janus_plugin_session *handle, janus_plugin_data *packet)
 
void janus_videoroom_data_ready (janus_plugin_session *handle)
 
void janus_videoroom_slow_link (janus_plugin_session *handle, int uplink, int video)
 
void janus_videoroom_hangup_media (janus_plugin_session *handle)
 
void janus_videoroom_destroy_session (janus_plugin_session *handle, int *error)
 
json_tjanus_videoroom_query_session (janus_plugin_session *handle)
 

Detailed Description

Janus VideoRoom plugin.

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

Check the VideoRoom plugin documentation for more details.

Plugins

Macro Definition Documentation

◆ JANUS_VIDEOROOM_AUTHOR

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

◆ JANUS_VIDEOROOM_DESCRIPTION

#define JANUS_VIDEOROOM_DESCRIPTION   "This is a plugin implementing a videoconferencing SFU (Selective Forwarding Unit) for Janus, that is an audio/video router."

◆ JANUS_VIDEOROOM_ERROR_ALREADY_JOINED

#define JANUS_VIDEOROOM_ERROR_ALREADY_JOINED   425

◆ JANUS_VIDEOROOM_ERROR_ALREADY_PUBLISHED

#define JANUS_VIDEOROOM_ERROR_ALREADY_PUBLISHED   434

◆ JANUS_VIDEOROOM_ERROR_ID_EXISTS

#define JANUS_VIDEOROOM_ERROR_ID_EXISTS   436

◆ JANUS_VIDEOROOM_ERROR_INVALID_ELEMENT

#define JANUS_VIDEOROOM_ERROR_INVALID_ELEMENT   430

◆ JANUS_VIDEOROOM_ERROR_INVALID_JSON

#define JANUS_VIDEOROOM_ERROR_INVALID_JSON   422

◆ JANUS_VIDEOROOM_ERROR_INVALID_REQUEST

#define JANUS_VIDEOROOM_ERROR_INVALID_REQUEST   423

◆ JANUS_VIDEOROOM_ERROR_INVALID_SDP

#define JANUS_VIDEOROOM_ERROR_INVALID_SDP   437

◆ JANUS_VIDEOROOM_ERROR_INVALID_SDP_TYPE

#define JANUS_VIDEOROOM_ERROR_INVALID_SDP_TYPE   431

◆ JANUS_VIDEOROOM_ERROR_JOIN_FIRST

#define JANUS_VIDEOROOM_ERROR_JOIN_FIRST   424

◆ JANUS_VIDEOROOM_ERROR_MISSING_ELEMENT

#define JANUS_VIDEOROOM_ERROR_MISSING_ELEMENT   429

◆ JANUS_VIDEOROOM_ERROR_NO_MESSAGE

#define JANUS_VIDEOROOM_ERROR_NO_MESSAGE   421

◆ JANUS_VIDEOROOM_ERROR_NO_SUCH_FEED

#define JANUS_VIDEOROOM_ERROR_NO_SUCH_FEED   428

◆ JANUS_VIDEOROOM_ERROR_NO_SUCH_ROOM

#define JANUS_VIDEOROOM_ERROR_NO_SUCH_ROOM   426

◆ JANUS_VIDEOROOM_ERROR_NOT_PUBLISHED

#define JANUS_VIDEOROOM_ERROR_NOT_PUBLISHED   435

◆ JANUS_VIDEOROOM_ERROR_PUBLISHERS_FULL

#define JANUS_VIDEOROOM_ERROR_PUBLISHERS_FULL   432

◆ JANUS_VIDEOROOM_ERROR_ROOM_EXISTS

#define JANUS_VIDEOROOM_ERROR_ROOM_EXISTS   427

◆ JANUS_VIDEOROOM_ERROR_UNAUTHORIZED

#define JANUS_VIDEOROOM_ERROR_UNAUTHORIZED   433

◆ JANUS_VIDEOROOM_ERROR_UNKNOWN_ERROR

#define JANUS_VIDEOROOM_ERROR_UNKNOWN_ERROR   499

◆ JANUS_VIDEOROOM_NAME

#define JANUS_VIDEOROOM_NAME   "JANUS VideoRoom plugin"

◆ JANUS_VIDEOROOM_PACKAGE

#define JANUS_VIDEOROOM_PACKAGE   "janus.plugin.videoroom"

◆ JANUS_VIDEOROOM_VERSION

#define JANUS_VIDEOROOM_VERSION   9

◆ JANUS_VIDEOROOM_VERSION_STRING

#define JANUS_VIDEOROOM_VERSION_STRING   "0.0.9"

Typedef Documentation

◆ janus_videoroom

◆ janus_videoroom_message

◆ janus_videoroom_p_type

◆ janus_videoroom_publisher

◆ janus_videoroom_rtcp_receiver

◆ janus_videoroom_rtp_forwarder

◆ janus_videoroom_rtp_relay_packet

◆ janus_videoroom_session

◆ janus_videoroom_srtp_context

◆ janus_videoroom_subscriber

Enumeration Type Documentation

◆ janus_videoroom_p_type

Enumerator
janus_videoroom_p_type_none 
janus_videoroom_p_type_subscriber 
janus_videoroom_p_type_publisher 

Function Documentation

◆ create()

janus_plugin* create ( void  )

◆ janus_videoroom_create_session()

void janus_videoroom_create_session ( janus_plugin_session handle,
int *  error 
)

◆ janus_videoroom_data_ready()

void janus_videoroom_data_ready ( janus_plugin_session handle)

◆ janus_videoroom_destroy()

void janus_videoroom_destroy ( void  )

◆ janus_videoroom_destroy_session()

void janus_videoroom_destroy_session ( janus_plugin_session handle,
int *  error 
)

◆ janus_videoroom_get_api_compatibility()

int janus_videoroom_get_api_compatibility ( void  )

◆ janus_videoroom_get_author()

const char * janus_videoroom_get_author ( void  )

◆ janus_videoroom_get_description()

const char * janus_videoroom_get_description ( void  )

◆ janus_videoroom_get_name()

const char * janus_videoroom_get_name ( void  )

◆ janus_videoroom_get_package()

const char * janus_videoroom_get_package ( void  )

◆ janus_videoroom_get_version()

int janus_videoroom_get_version ( void  )

◆ janus_videoroom_get_version_string()

const char * janus_videoroom_get_version_string ( void  )

◆ janus_videoroom_handle_admin_message()

json_t * janus_videoroom_handle_admin_message ( json_t message)

◆ janus_videoroom_handle_message()

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

◆ janus_videoroom_hangup_media()

void janus_videoroom_hangup_media ( janus_plugin_session handle)

◆ janus_videoroom_incoming_data()

void janus_videoroom_incoming_data ( janus_plugin_session handle,
janus_plugin_data packet 
)

◆ janus_videoroom_incoming_rtcp()

void janus_videoroom_incoming_rtcp ( janus_plugin_session handle,
janus_plugin_rtcp packet 
)

◆ janus_videoroom_incoming_rtp()

void janus_videoroom_incoming_rtp ( janus_plugin_session handle,
janus_plugin_rtp packet 
)

◆ janus_videoroom_init()

int janus_videoroom_init ( janus_callbacks callback,
const char *  config_path 
)

◆ janus_videoroom_query_session()

json_t * janus_videoroom_query_session ( janus_plugin_session handle)

◆ janus_videoroom_setup_media()

void janus_videoroom_setup_media ( janus_plugin_session handle)

◆ janus_videoroom_slow_link()

void janus_videoroom_slow_link ( janus_plugin_session handle,
int  uplink,
int  video 
)