Set capture.rtp disabled by default

This commit is contained in:
Kaian 2015-09-22 12:13:46 +02:00
parent 34428e87c3
commit 7e1006d984
3 changed files with 44 additions and 34 deletions

View File

@ -36,38 +36,38 @@
//! Available configurable settings
setting_t settings[SETTING_COUNT] = {
{ SETTING_BACKGROUND, "background", SETTING_FMT_ENUM, "dark", SETTING_ENUM_BACKGROUND },
{ SETTING_COLORMODE, "colormode", SETTING_FMT_ENUM, "request", SETTING_ENUM_COLORMODE },
{ SETTING_SYNTAX, "syntax", SETTING_FMT_ENUM, "on", SETTING_ENUM_ONOFF },
{ SETTING_SYNTAX_TAG, "syntax.tag", SETTING_FMT_ENUM, "off", SETTING_ENUM_ONOFF },
{ SETTING_SYNTAX_BRANCH, "syntax.branch", SETTING_FMT_ENUM, "off", SETTING_ENUM_ONOFF },
{ SETTING_ALTKEY_HINT, "hintkeyalt", SETTING_FMT_ENUM, "off", SETTING_ENUM_ONOFF },
{ SETTING_EXITPROMPT, "exitprompt", SETTING_FMT_ENUM, "on", SETTING_ENUM_ONOFF },
{ SETTING_CAPTURE_LIMIT, "capture.limit", SETTING_FMT_NUMBER, "20000", NULL },
{ SETTING_CAPTURE_LOOKUP, "capture.lookup", SETTING_FMT_ENUM, "off", SETTING_ENUM_ONOFF },
{ SETTING_CAPTURE_DEVICE, "capture.device", SETTING_FMT_STRING, "any", NULL },
{ SETTING_CAPTURE_OUTFILE, "capture.outfile", SETTING_FMT_STRING, "", NULL },
{ SETTING_CAPTURE_KEYFILE, "capture.keyfile", SETTING_FMT_STRING, "", NULL },
{ SETTING_CAPTURE_RTP, "capture.rtp", SETTING_FMT_ENUM, "on", SETTING_ENUM_ONOFF },
{ SETTING_SIP_NOINCOMPLETE, "sip.noincomplete", SETTING_FMT_ENUM, "on", SETTING_ENUM_ONOFF },
{ SETTING_SIP_CALLS, "sip.calls", SETTING_FMT_ENUM, "off", SETTING_ENUM_ONOFF },
{ SETTING_SAVEPATH, "savepath", SETTING_FMT_STRING, "", NULL },
{ SETTING_DISPLAY_HOST, "displayhost", SETTING_FMT_ENUM, "off", SETTING_ENUM_ONOFF },
{ SETTING_DISPLAY_ALIAS, "displayalias", SETTING_FMT_ENUM, "off", SETTING_ENUM_ONOFF },
{ SETTING_CL_FILTER, "cl.filter", SETTING_FMT_STRING, "", NULL },
{ SETTING_CL_SCROLLSTEP, "cl.scrollstep", SETTING_FMT_NUMBER, "4", NULL },
{ SETTING_CF_FORCERAW, "cf.forceraw", SETTING_FMT_ENUM, "on", SETTING_ENUM_ONOFF },
{ SETTING_CF_RAWMINWIDTH, "cf.rawminwidth", SETTING_FMT_NUMBER, "40", NULL },
{ SETTING_CF_RAWFIXEDWIDTH, "cf.rawfixedwidth", SETTING_FMT_NUMBER, "", NULL },
{ SETTING_CF_SPLITCALLID, "cf.splitcallid", SETTING_FMT_ENUM, "off", SETTING_ENUM_ONOFF },
{ SETTING_CF_HIGHTLIGHT, "cf.highlight", SETTING_FMT_ENUM, "bold", SETTING_ENUM_HIGHLIGHT },
{ SETTING_CF_SCROLLSTEP, "cf.scrollstep", SETTING_FMT_NUMBER, "4", NULL },
{ SETTING_CF_LOCALHIGHLIGHT, "cf.localhighlight", SETTING_FMT_ENUM, "on", SETTING_ENUM_ONOFF },
{ SETTING_CF_SDP_INFO, "cf.sdpinfo", SETTING_FMT_ENUM, "off", SETTING_ENUM_SDP_INFO },
{ SETTING_CF_MEDIA, "cf.media", SETTING_FMT_ENUM, "on", SETTING_ENUM_ONOFF },
{ SETTING_CF_DELTA, "cf.deltatime", SETTING_FMT_ENUM, "on", SETTING_ENUM_ONOFF },
{ SETTING_CR_SCROLLSTEP, "cr.scrollstep", SETTING_FMT_NUMBER, "10", NULL },
{ SETTING_FILTER_METHODS, "filter.methods", SETTING_FMT_STRING, "", NULL },
{ SETTING_BACKGROUND, "background", SETTING_FMT_ENUM, "dark", SETTING_ENUM_BACKGROUND },
{ SETTING_COLORMODE, "colormode", SETTING_FMT_ENUM, "request", SETTING_ENUM_COLORMODE },
{ SETTING_SYNTAX, "syntax", SETTING_FMT_ENUM, SETTING_ON, SETTING_ENUM_ONOFF },
{ SETTING_SYNTAX_TAG, "syntax.tag", SETTING_FMT_ENUM, SETTING_OFF, SETTING_ENUM_ONOFF },
{ SETTING_SYNTAX_BRANCH, "syntax.branch", SETTING_FMT_ENUM, SETTING_OFF, SETTING_ENUM_ONOFF },
{ SETTING_ALTKEY_HINT, "hintkeyalt", SETTING_FMT_ENUM, SETTING_OFF, SETTING_ENUM_ONOFF },
{ SETTING_EXITPROMPT, "exitprompt", SETTING_FMT_ENUM, SETTING_ON, SETTING_ENUM_ONOFF },
{ SETTING_CAPTURE_LIMIT, "capture.limit", SETTING_FMT_NUMBER, "20000", NULL },
{ SETTING_CAPTURE_LOOKUP, "capture.lookup", SETTING_FMT_ENUM, SETTING_OFF, SETTING_ENUM_ONOFF },
{ SETTING_CAPTURE_DEVICE, "capture.device", SETTING_FMT_STRING, "any", NULL },
{ SETTING_CAPTURE_OUTFILE, "capture.outfile", SETTING_FMT_STRING, "", NULL },
{ SETTING_CAPTURE_KEYFILE, "capture.keyfile", SETTING_FMT_STRING, "", NULL },
{ SETTING_CAPTURE_RTP, "capture.rtp", SETTING_FMT_ENUM, SETTING_OFF, SETTING_ENUM_ONOFF },
{ SETTING_SIP_NOINCOMPLETE, "sip.noincomplete", SETTING_FMT_ENUM, SETTING_ON, SETTING_ENUM_ONOFF },
{ SETTING_SIP_CALLS, "sip.calls", SETTING_FMT_ENUM, SETTING_OFF, SETTING_ENUM_ONOFF },
{ SETTING_SAVEPATH, "savepath", SETTING_FMT_STRING, "", NULL },
{ SETTING_DISPLAY_HOST, "displayhost", SETTING_FMT_ENUM, SETTING_OFF, SETTING_ENUM_ONOFF },
{ SETTING_DISPLAY_ALIAS, "displayalias", SETTING_FMT_ENUM, SETTING_OFF, SETTING_ENUM_ONOFF },
{ SETTING_CL_FILTER, "cl.filter", SETTING_FMT_STRING, "", NULL },
{ SETTING_CL_SCROLLSTEP, "cl.scrollstep", SETTING_FMT_NUMBER, "4", NULL },
{ SETTING_CF_FORCERAW, "cf.forceraw", SETTING_FMT_ENUM, SETTING_ON, SETTING_ENUM_ONOFF },
{ SETTING_CF_RAWMINWIDTH, "cf.rawminwidth", SETTING_FMT_NUMBER, "40", NULL },
{ SETTING_CF_RAWFIXEDWIDTH, "cf.rawfixedwidth", SETTING_FMT_NUMBER, "", NULL },
{ SETTING_CF_SPLITCALLID, "cf.splitcallid", SETTING_FMT_ENUM, SETTING_OFF, SETTING_ENUM_ONOFF },
{ SETTING_CF_HIGHTLIGHT, "cf.highlight", SETTING_FMT_ENUM, "bold", SETTING_ENUM_HIGHLIGHT },
{ SETTING_CF_SCROLLSTEP, "cf.scrollstep", SETTING_FMT_NUMBER, "4", NULL },
{ SETTING_CF_LOCALHIGHLIGHT, "cf.localhighlight", SETTING_FMT_ENUM, SETTING_ON, SETTING_ENUM_ONOFF },
{ SETTING_CF_SDP_INFO, "cf.sdpinfo", SETTING_FMT_ENUM, SETTING_OFF, SETTING_ENUM_SDP_INFO },
{ SETTING_CF_MEDIA, "cf.media", SETTING_FMT_ENUM, SETTING_ON, SETTING_ENUM_ONOFF },
{ SETTING_CF_DELTA, "cf.deltatime", SETTING_FMT_ENUM, SETTING_ON, SETTING_ENUM_ONOFF },
{ SETTING_CR_SCROLLSTEP, "cr.scrollstep", SETTING_FMT_NUMBER, "10", NULL },
{ SETTING_FILTER_METHODS, "filter.methods", SETTING_FMT_STRING, "", NULL },
};
setting_t *

View File

@ -55,6 +55,13 @@ typedef struct setting_option setting_t;
#define SETTING_ENUM_HIGHLIGHT (const char *[]){ "bold", "reverse", "reversebold", NULL }
#define SETTING_ENUM_SDP_INFO (const char *[]){ "off", "first", "full", NULL}
//! Other useful defines
#define SETTING_ON "on"
#define SETTING_OFF "off"
#define SETTING_YES "yes"
#define SETTING_NO "no"
//! Available setting Options
enum setting_id {
SETTING_BACKGROUND = 0,

View File

@ -31,6 +31,7 @@
#include "sip_call.h"
#include "sip.h"
#include "setting.h"
sip_call_t *
call_create(char *callid)
@ -46,8 +47,10 @@ call_create(char *callid)
vector_set_destroyer(call->msgs, msg_destroyer);
// Create an empty vector to store rtp packets
call->rtp_packets = vector_create(0, 40);
vector_set_destroyer(call->rtp_packets, capture_packet_destroyer);
if (setting_enabled(SETTING_CAPTURE_RTP)) {
call->rtp_packets = vector_create(0, 40);
vector_set_destroyer(call->rtp_packets, capture_packet_destroyer);
}
// Create an empty vector to strore stream data
call->streams = vector_create(0, 2);