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

Janus AudioBridge plugin. More...

#include "plugin.h"
#include <jansson.h>
#include <opus/opus.h>
#include <sys/time.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 dependency graph for janus_audiobridge.c:

Data Structures

struct  janus_audiobridge_message
 
struct  janus_audiobridge_room
 
struct  janus_audiobridge_session
 
struct  janus_audiobridge_participant
 
struct  janus_audiobridge_rtp_relay_packet
 
struct  janus_audiobridge_rtp_forwarder
 
struct  wav_header
 

Macros

#define JANUS_AUDIOBRIDGE_VERSION   10
 
#define JANUS_AUDIOBRIDGE_VERSION_STRING   "0.0.10"
 
#define JANUS_AUDIOBRIDGE_DESCRIPTION   "This is a plugin implementing an audio conference bridge for Janus, mixing Opus streams."
 
#define JANUS_AUDIOBRIDGE_NAME   "JANUS AudioBridge plugin"
 
#define JANUS_AUDIOBRIDGE_AUTHOR   "Meetecho s.r.l."
 
#define JANUS_AUDIOBRIDGE_PACKAGE   "janus.plugin.audiobridge"
 
#define MIN_SEQUENTIAL   2
 
#define MAX_MISORDER   50
 
#define DEFAULT_PREBUFFERING   6
 
#define BUFFER_SAMPLES   8000
 
#define OPUS_SAMPLES   160
 
#define DEFAULT_COMPLEXITY   4
 
#define JANUS_AUDIOBRIDGE_ERROR_UNKNOWN_ERROR   499
 
#define JANUS_AUDIOBRIDGE_ERROR_NO_MESSAGE   480
 
#define JANUS_AUDIOBRIDGE_ERROR_INVALID_JSON   481
 
#define JANUS_AUDIOBRIDGE_ERROR_INVALID_REQUEST   482
 
#define JANUS_AUDIOBRIDGE_ERROR_MISSING_ELEMENT   483
 
#define JANUS_AUDIOBRIDGE_ERROR_INVALID_ELEMENT   484
 
#define JANUS_AUDIOBRIDGE_ERROR_NO_SUCH_ROOM   485
 
#define JANUS_AUDIOBRIDGE_ERROR_ROOM_EXISTS   486
 
#define JANUS_AUDIOBRIDGE_ERROR_NOT_JOINED   487
 
#define JANUS_AUDIOBRIDGE_ERROR_LIBOPUS_ERROR   488
 
#define JANUS_AUDIOBRIDGE_ERROR_UNAUTHORIZED   489
 
#define JANUS_AUDIOBRIDGE_ERROR_ID_EXISTS   490
 
#define JANUS_AUDIOBRIDGE_ERROR_ALREADY_JOINED   491
 
#define JANUS_AUDIOBRIDGE_ERROR_NO_SUCH_USER   492
 
#define JANUS_AUDIOBRIDGE_ERROR_INVALID_SDP   493
 

Typedefs

typedef struct janus_audiobridge_message janus_audiobridge_message
 
typedef struct janus_audiobridge_room janus_audiobridge_room
 
typedef struct janus_audiobridge_session janus_audiobridge_session
 
typedef struct janus_audiobridge_participant janus_audiobridge_participant
 
typedef struct janus_audiobridge_rtp_relay_packet janus_audiobridge_rtp_relay_packet
 
typedef struct janus_audiobridge_rtp_forwarder janus_audiobridge_rtp_forwarder
 
typedef struct wav_header wav_header
 

Functions

janus_plugincreate (void)
 
int janus_audiobridge_init (janus_callbacks *callback, const char *config_path)
 
void janus_audiobridge_destroy (void)
 
int janus_audiobridge_get_api_compatibility (void)
 
int janus_audiobridge_get_version (void)
 
const char * janus_audiobridge_get_version_string (void)
 
const char * janus_audiobridge_get_description (void)
 
const char * janus_audiobridge_get_name (void)
 
const char * janus_audiobridge_get_author (void)
 
const char * janus_audiobridge_get_package (void)
 
void janus_audiobridge_create_session (janus_plugin_session *handle, int *error)
 
struct janus_plugin_resultjanus_audiobridge_handle_message (janus_plugin_session *handle, char *transaction, json_t *message, json_t *jsep)
 
void janus_audiobridge_setup_media (janus_plugin_session *handle)
 
void janus_audiobridge_incoming_rtp (janus_plugin_session *handle, int video, char *buf, int len)
 
void janus_audiobridge_incoming_rtcp (janus_plugin_session *handle, int video, char *buf, int len)
 
void janus_audiobridge_hangup_media (janus_plugin_session *handle)
 
void janus_audiobridge_destroy_session (janus_plugin_session *handle, int *error)
 
json_tjanus_audiobridge_query_session (janus_plugin_session *handle)
 

Detailed Description

Janus AudioBridge plugin.

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

Check the AudioBridge plugin documentation for more details.

Plugins

Macro Definition Documentation

#define BUFFER_SAMPLES   8000
#define DEFAULT_COMPLEXITY   4
#define DEFAULT_PREBUFFERING   6
#define JANUS_AUDIOBRIDGE_AUTHOR   "Meetecho s.r.l."
#define JANUS_AUDIOBRIDGE_DESCRIPTION   "This is a plugin implementing an audio conference bridge for Janus, mixing Opus streams."
#define JANUS_AUDIOBRIDGE_ERROR_ALREADY_JOINED   491
#define JANUS_AUDIOBRIDGE_ERROR_ID_EXISTS   490
#define JANUS_AUDIOBRIDGE_ERROR_INVALID_ELEMENT   484
#define JANUS_AUDIOBRIDGE_ERROR_INVALID_JSON   481
#define JANUS_AUDIOBRIDGE_ERROR_INVALID_REQUEST   482
#define JANUS_AUDIOBRIDGE_ERROR_INVALID_SDP   493
#define JANUS_AUDIOBRIDGE_ERROR_LIBOPUS_ERROR   488
#define JANUS_AUDIOBRIDGE_ERROR_MISSING_ELEMENT   483
#define JANUS_AUDIOBRIDGE_ERROR_NO_MESSAGE   480
#define JANUS_AUDIOBRIDGE_ERROR_NO_SUCH_ROOM   485
#define JANUS_AUDIOBRIDGE_ERROR_NO_SUCH_USER   492
#define JANUS_AUDIOBRIDGE_ERROR_NOT_JOINED   487
#define JANUS_AUDIOBRIDGE_ERROR_ROOM_EXISTS   486
#define JANUS_AUDIOBRIDGE_ERROR_UNAUTHORIZED   489
#define JANUS_AUDIOBRIDGE_ERROR_UNKNOWN_ERROR   499
#define JANUS_AUDIOBRIDGE_NAME   "JANUS AudioBridge plugin"
#define JANUS_AUDIOBRIDGE_PACKAGE   "janus.plugin.audiobridge"
#define JANUS_AUDIOBRIDGE_VERSION   10
#define JANUS_AUDIOBRIDGE_VERSION_STRING   "0.0.10"
#define MAX_MISORDER   50
#define MIN_SEQUENTIAL   2
#define OPUS_SAMPLES   160

Typedef Documentation

typedef struct wav_header wav_header

Function Documentation

janus_eventhandler * create ( void  )
void janus_audiobridge_create_session ( janus_plugin_session handle,
int *  error 
)
void janus_audiobridge_destroy ( void  )
void janus_audiobridge_destroy_session ( janus_plugin_session handle,
int *  error 
)
int janus_audiobridge_get_api_compatibility ( void  )
const char * janus_audiobridge_get_author ( void  )
const char * janus_audiobridge_get_description ( void  )
const char * janus_audiobridge_get_name ( void  )
const char * janus_audiobridge_get_package ( void  )
int janus_audiobridge_get_version ( void  )
const char * janus_audiobridge_get_version_string ( void  )
struct janus_plugin_result * janus_audiobridge_handle_message ( janus_plugin_session handle,
char *  transaction,
json_t message,
json_t jsep 
)
void janus_audiobridge_hangup_media ( janus_plugin_session handle)
void janus_audiobridge_incoming_rtcp ( janus_plugin_session handle,
int  video,
char *  buf,
int  len 
)
void janus_audiobridge_incoming_rtp ( janus_plugin_session handle,
int  video,
char *  buf,
int  len 
)
int janus_audiobridge_init ( janus_callbacks callback,
const char *  config_path 
)
json_t * janus_audiobridge_query_session ( janus_plugin_session handle)
void janus_audiobridge_setup_media ( janus_plugin_session handle)