Fork me on GitHub
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions
janus_recordplay.c File Reference

Janus Record&Play plugin. More...

#include "plugin.h"
#include <dirent.h>
#include <arpa/inet.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <jansson.h>
#include "../debug.h"
#include "../apierror.h"
#include "../config.h"
#include "../mutex.h"
#include "../record.h"
#include "../sdp-utils.h"
#include "../rtp.h"
#include "../rtcp.h"
#include "../utils.h"
Include dependency graph for janus_recordplay.c:

Data Structures

struct  janus_recordplay_message
 
struct  janus_recordplay_rtp_header_extension
 
struct  janus_recordplay_frame_packet
 
struct  janus_recordplay_recording
 
struct  janus_recordplay_session
 

Macros

#define JANUS_RECORDPLAY_VERSION   4
 
#define JANUS_RECORDPLAY_VERSION_STRING   "0.0.4"
 
#define JANUS_RECORDPLAY_DESCRIPTION   "This is a trivial Record&Play plugin for Janus, to record WebRTC sessions and replay them."
 
#define JANUS_RECORDPLAY_NAME   "JANUS Record&Play plugin"
 
#define JANUS_RECORDPLAY_AUTHOR   "Meetecho s.r.l."
 
#define JANUS_RECORDPLAY_PACKAGE   "janus.plugin.recordplay"
 
#define AUDIO_PT   111
 
#define VIDEO_PT   100
 
#define JANUS_RECORDPLAY_ERROR_NO_MESSAGE   411
 
#define JANUS_RECORDPLAY_ERROR_INVALID_JSON   412
 
#define JANUS_RECORDPLAY_ERROR_INVALID_REQUEST   413
 
#define JANUS_RECORDPLAY_ERROR_INVALID_ELEMENT   414
 
#define JANUS_RECORDPLAY_ERROR_MISSING_ELEMENT   415
 
#define JANUS_RECORDPLAY_ERROR_NOT_FOUND   416
 
#define JANUS_RECORDPLAY_ERROR_INVALID_RECORDING   417
 
#define JANUS_RECORDPLAY_ERROR_INVALID_STATE   418
 
#define JANUS_RECORDPLAY_ERROR_INVALID_SDP   419
 
#define JANUS_RECORDPLAY_ERROR_RECORDING_EXISTS   420
 
#define JANUS_RECORDPLAY_ERROR_UNKNOWN_ERROR   499
 
#define ntohll(x)   ((1==ntohl(1)) ? (x) : ((gint64)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32))
 

Typedefs

typedef struct janus_recordplay_message janus_recordplay_message
 
typedef struct janus_recordplay_rtp_header_extension janus_recordplay_rtp_header_extension
 
typedef struct janus_recordplay_frame_packet janus_recordplay_frame_packet
 
typedef struct janus_recordplay_recording janus_recordplay_recording
 
typedef struct janus_recordplay_session janus_recordplay_session
 

Functions

janus_plugincreate (void)
 
int janus_recordplay_init (janus_callbacks *callback, const char *onfig_path)
 
void janus_recordplay_destroy (void)
 
int janus_recordplay_get_api_compatibility (void)
 
int janus_recordplay_get_version (void)
 
const char * janus_recordplay_get_version_string (void)
 
const char * janus_recordplay_get_description (void)
 
const char * janus_recordplay_get_name (void)
 
const char * janus_recordplay_get_author (void)
 
const char * janus_recordplay_get_package (void)
 
void janus_recordplay_create_session (janus_plugin_session *handle, int *error)
 
struct janus_plugin_resultjanus_recordplay_handle_message (janus_plugin_session *handle, char *transaction, json_t *message, json_t *jsep)
 
json_tjanus_recordplay_handle_admin_message (json_t *message)
 
void janus_recordplay_setup_media (janus_plugin_session *handle)
 
void janus_recordplay_incoming_rtp (janus_plugin_session *handle, janus_plugin_rtp *packet)
 
void janus_recordplay_incoming_rtcp (janus_plugin_session *handle, janus_plugin_rtcp *packet)
 
void janus_recordplay_incoming_data (janus_plugin_session *handle, janus_plugin_data *packet)
 
void janus_recordplay_slow_link (janus_plugin_session *handle, int uplink, int video)
 
void janus_recordplay_hangup_media (janus_plugin_session *handle)
 
void janus_recordplay_destroy_session (janus_plugin_session *handle, int *error)
 
json_tjanus_recordplay_query_session (janus_plugin_session *handle)
 
janus_recordplay_frame_packetjanus_recordplay_get_frames (const char *dir, const char *filename)
 
void janus_recordplay_update_recordings_list (void)
 
void janus_recordplay_send_rtcp_feedback (janus_plugin_session *handle, int video, char *buf, int len)
 

Detailed Description

Janus Record&Play plugin.

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

Check the Record&Play plugin documentation for more details.

Plugins

Macro Definition Documentation

◆ AUDIO_PT

#define AUDIO_PT   111

◆ JANUS_RECORDPLAY_AUTHOR

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

◆ JANUS_RECORDPLAY_DESCRIPTION

#define JANUS_RECORDPLAY_DESCRIPTION   "This is a trivial Record&Play plugin for Janus, to record WebRTC sessions and replay them."

◆ JANUS_RECORDPLAY_ERROR_INVALID_ELEMENT

#define JANUS_RECORDPLAY_ERROR_INVALID_ELEMENT   414

◆ JANUS_RECORDPLAY_ERROR_INVALID_JSON

#define JANUS_RECORDPLAY_ERROR_INVALID_JSON   412

◆ JANUS_RECORDPLAY_ERROR_INVALID_RECORDING

#define JANUS_RECORDPLAY_ERROR_INVALID_RECORDING   417

◆ JANUS_RECORDPLAY_ERROR_INVALID_REQUEST

#define JANUS_RECORDPLAY_ERROR_INVALID_REQUEST   413

◆ JANUS_RECORDPLAY_ERROR_INVALID_SDP

#define JANUS_RECORDPLAY_ERROR_INVALID_SDP   419

◆ JANUS_RECORDPLAY_ERROR_INVALID_STATE

#define JANUS_RECORDPLAY_ERROR_INVALID_STATE   418

◆ JANUS_RECORDPLAY_ERROR_MISSING_ELEMENT

#define JANUS_RECORDPLAY_ERROR_MISSING_ELEMENT   415

◆ JANUS_RECORDPLAY_ERROR_NO_MESSAGE

#define JANUS_RECORDPLAY_ERROR_NO_MESSAGE   411

◆ JANUS_RECORDPLAY_ERROR_NOT_FOUND

#define JANUS_RECORDPLAY_ERROR_NOT_FOUND   416

◆ JANUS_RECORDPLAY_ERROR_RECORDING_EXISTS

#define JANUS_RECORDPLAY_ERROR_RECORDING_EXISTS   420

◆ JANUS_RECORDPLAY_ERROR_UNKNOWN_ERROR

#define JANUS_RECORDPLAY_ERROR_UNKNOWN_ERROR   499

◆ JANUS_RECORDPLAY_NAME

#define JANUS_RECORDPLAY_NAME   "JANUS Record&Play plugin"

◆ JANUS_RECORDPLAY_PACKAGE

#define JANUS_RECORDPLAY_PACKAGE   "janus.plugin.recordplay"

◆ JANUS_RECORDPLAY_VERSION

#define JANUS_RECORDPLAY_VERSION   4

◆ JANUS_RECORDPLAY_VERSION_STRING

#define JANUS_RECORDPLAY_VERSION_STRING   "0.0.4"

◆ ntohll

#define ntohll ( x)    ((1==ntohl(1)) ? (x) : ((gint64)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32))

◆ VIDEO_PT

#define VIDEO_PT   100

Typedef Documentation

◆ janus_recordplay_frame_packet

typedef struct janus_recordplay_frame_packet janus_recordplay_frame_packet

◆ janus_recordplay_message

typedef struct janus_recordplay_message janus_recordplay_message

◆ janus_recordplay_recording

typedef struct janus_recordplay_recording janus_recordplay_recording

◆ janus_recordplay_rtp_header_extension

typedef struct janus_recordplay_rtp_header_extension janus_recordplay_rtp_header_extension

◆ janus_recordplay_session

typedef struct janus_recordplay_session janus_recordplay_session

Function Documentation

◆ create()

janus_plugin * create ( void )

◆ janus_recordplay_create_session()

void janus_recordplay_create_session ( janus_plugin_session * handle,
int * error )

◆ janus_recordplay_destroy()

void janus_recordplay_destroy ( void )

◆ janus_recordplay_destroy_session()

void janus_recordplay_destroy_session ( janus_plugin_session * handle,
int * error )

◆ janus_recordplay_get_api_compatibility()

int janus_recordplay_get_api_compatibility ( void )

◆ janus_recordplay_get_author()

const char * janus_recordplay_get_author ( void )

◆ janus_recordplay_get_description()

const char * janus_recordplay_get_description ( void )

◆ janus_recordplay_get_frames()

janus_recordplay_frame_packet * janus_recordplay_get_frames ( const char * dir,
const char * filename )

◆ janus_recordplay_get_name()

const char * janus_recordplay_get_name ( void )

◆ janus_recordplay_get_package()

const char * janus_recordplay_get_package ( void )

◆ janus_recordplay_get_version()

int janus_recordplay_get_version ( void )

◆ janus_recordplay_get_version_string()

const char * janus_recordplay_get_version_string ( void )

◆ janus_recordplay_handle_admin_message()

json_t * janus_recordplay_handle_admin_message ( json_t * message)

◆ janus_recordplay_handle_message()

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

◆ janus_recordplay_hangup_media()

void janus_recordplay_hangup_media ( janus_plugin_session * handle)

◆ janus_recordplay_incoming_data()

void janus_recordplay_incoming_data ( janus_plugin_session * handle,
janus_plugin_data * packet )

◆ janus_recordplay_incoming_rtcp()

void janus_recordplay_incoming_rtcp ( janus_plugin_session * handle,
janus_plugin_rtcp * packet )

◆ janus_recordplay_incoming_rtp()

void janus_recordplay_incoming_rtp ( janus_plugin_session * handle,
janus_plugin_rtp * packet )

◆ janus_recordplay_init()

int janus_recordplay_init ( janus_callbacks * callback,
const char * onfig_path )

◆ janus_recordplay_query_session()

json_t * janus_recordplay_query_session ( janus_plugin_session * handle)

◆ janus_recordplay_send_rtcp_feedback()

void janus_recordplay_send_rtcp_feedback ( janus_plugin_session * handle,
int video,
char * buf,
int len )

◆ janus_recordplay_setup_media()

void janus_recordplay_setup_media ( janus_plugin_session * handle)

◆ janus_recordplay_slow_link()

void janus_recordplay_slow_link ( janus_plugin_session * handle,
int uplink,
int video )

◆ janus_recordplay_update_recordings_list()

void janus_recordplay_update_recordings_list ( void )