Helper tool to convert Janus .mjr recordings to .pcap files. More...
#include <arpa/inet.h>
#include <endian.h>
#include <inttypes.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/time.h>
#include <glib.h>
#include <jansson.h>
#include "../debug.h"
#include "pp-rtp.h"
Data Structures | |
struct | mjr2pcap_global_header |
struct | mjr2pcap_packet_header |
struct | mjr2pcap_ethernet_header |
struct | mjr2pcap_ip_header |
struct | mjr2pcap_udp_header |
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)) |
Typedefs | |
typedef struct mjr2pcap_global_header | mjr2pcap_global_header |
typedef struct mjr2pcap_packet_header | mjr2pcap_packet_header |
typedef struct mjr2pcap_ethernet_header | mjr2pcap_ethernet_header |
typedef struct mjr2pcap_ip_header | mjr2pcap_ip_header |
typedef struct mjr2pcap_udp_header | mjr2pcap_udp_header |
Functions | |
int | main (int argc, char *argv[]) |
Variables | |
int | janus_log_level = 4 |
gboolean | janus_log_timestamps = FALSE |
gboolean | janus_log_colors = TRUE |
char * | janus_log_global_prefix = NULL |
int | lock_debug = 0 |
int | working = 0 |
Helper tool to convert Janus .mjr recordings to .pcap files.
Our Janus WebRTC gateway provides a simple helper (janus_recorder) to allow plugins to record audio, video and text frames sent by users. The mjr2pcap
tool is a simple utility that allows you remove extract RTP packets from Janus recordings and save them to a .pcap file instead. Notice that network levels are simulated, and so are timestamps for when the packets have really been received, since that info is not stored in .mjr files. As such, its main purpose is helping analyze RTP packets, rather than investigate network issues.
Using the utility is quite simple. Just pass, as arguments to the tool, the path to the .mjr source file, and the path to the destination file, e.g.:
./mjr2pcap /path/to/source.mjr /path/to/destination.pcap
An attempt to process a non-RTP recording will result in an error.
#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)) |
typedef struct mjr2pcap_ethernet_header mjr2pcap_ethernet_header |
typedef struct mjr2pcap_global_header mjr2pcap_global_header |
typedef struct mjr2pcap_ip_header mjr2pcap_ip_header |
typedef struct mjr2pcap_packet_header mjr2pcap_packet_header |
typedef struct mjr2pcap_udp_header mjr2pcap_udp_header |
int main | ( | int | argc, |
char * | argv[] ) |
gboolean janus_log_colors = TRUE |
char* janus_log_global_prefix = NULL |
int janus_log_level = 4 |
gboolean janus_log_timestamps = FALSE |
int lock_debug = 0 |
int working = 0 |