#include <arpa/inet.h>#include <sys/stat.h>#include <errno.h>#include <libgen.h>#include <glib.h>#include <jansson.h>#include "record.h"#include "debug.h"#include "utils.h"
Macros | |
| #define | htonll(x) ((1==htonl(1)) ? (x) : ((gint64)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32)) |
| #define | ntohll(x) ((1==ntohl(1)) ? (x) : ((gint64)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32)) |
Functions | |
| void | janus_recorder_init (gboolean tempnames, const char *extension) |
| Initialize the recorder code. More... | |
| void | janus_recorder_deinit (void) |
| De-initialize the recorder code. More... | |
| janus_recorder * | janus_recorder_create (const char *dir, const char *codec, const char *filename) |
| Create a new recorder. More... | |
| janus_recorder * | janus_recorder_create_full (const char *dir, const char *codec, const char *fmtp, const char *filename) |
| Create a new recorder with additional info. More... | |
| int | janus_recorder_save_frame (janus_recorder *recorder, char *buffer, uint length) |
| Save an RTP frame in the recorder. More... | |
| int | janus_recorder_close (janus_recorder *recorder) |
| Close the recorder. More... | |
| void | janus_recorder_destroy (janus_recorder *recorder) |
| Destroy the recorder instance. More... | |
| #define htonll | ( | x | ) | ((1==htonl(1)) ? (x) : ((gint64)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32)) |
| #define ntohll | ( | x | ) | ((1==ntohl(1)) ? (x) : ((gint64)ntohl((x) & 0xFFFFFFFF) << 32) | ntohl((x) >> 32)) |
| int janus_recorder_close | ( | janus_recorder * | recorder | ) |
Close the recorder.
| [in] | recorder | The janus_recorder instance to close |
| janus_recorder* janus_recorder_create | ( | const char * | dir, |
| const char * | codec, | ||
| const char * | filename | ||
| ) |
Create a new recorder.
| [in] | dir | Path of the directory to save the recording into (will try to create it if it doesn't exist) |
| [in] | codec | Codec the packets to record are encoded in ("vp8", "opus", "h264", "g711", "vp9") |
| [in] | filename | Filename to use for the recording |
| janus_recorder* janus_recorder_create_full | ( | const char * | dir, |
| const char * | codec, | ||
| const char * | fmtp, | ||
| const char * | filename | ||
| ) |
Create a new recorder with additional info.
| [in] | dir | Path of the directory to save the recording into (will try to create it if it doesn't exist) |
| [in] | codec | Codec the packets to record are encoded in ("vp8", "opus", "h264", "g711", "vp9") |
| [in] | fmtp | Codec-specific details (e.g., the H.264 or VP9 profile) |
| [in] | filename | Filename to use for the recording |
| void janus_recorder_deinit | ( | void | ) |
De-initialize the recorder code.
| void janus_recorder_destroy | ( | janus_recorder * | recorder | ) |
Destroy the recorder instance.
| [in] | recorder | The janus_recorder instance to destroy |
| void janus_recorder_init | ( | gboolean | tempnames, |
| const char * | extension | ||
| ) |
Initialize the recorder code.
| [in] | tempnames | Whether the filenames should have a temporary extension, while saving, or not |
| [in] | extension | Extension to add in case tempnames is true |
| int janus_recorder_save_frame | ( | janus_recorder * | recorder, |
| char * | buffer, | ||
| uint | length | ||
| ) |
Save an RTP frame in the recorder.
| [in] | recorder | The janus_recorder instance to save the frame to |
| [in] | buffer | The frame data to save |
| [in] | length | The frame data length |