mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 09:40:08 +00:00
debug-dump: print usage with "help"
This commit is contained in:
@@ -299,6 +299,12 @@ bool parse_log_cfg(const char *conf_str,
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#define DUMP_FILE_USAGE \
|
||||
"* debug-dump=<module>[=<n>][,<module2>[=<n>]\n" \
|
||||
" Dumps specified buffer to a file for debugging, n-th buffer may " \
|
||||
"be selected, name is <module>.dump.\n" \
|
||||
" Avaiable modules: lavc-avframe, lavd-avframe\n"
|
||||
ADD_TO_PARAM("debug-dump", DUMP_FILE_USAGE);
|
||||
void debug_file_dump(const char *key, void (*serialize)(const void *data, FILE *), void *data) {
|
||||
const char *dump_file_val = get_commandline_param("debug-dump");
|
||||
static thread_local unordered_map<string, int> skip_map;
|
||||
@@ -306,6 +312,13 @@ void debug_file_dump(const char *key, void (*serialize)(const void *data, FILE *
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp(dump_file_val, "help") == 0) {
|
||||
color_printf("\n" TBOLD("debug-dump") " usage:\n");
|
||||
printf("%s\n", DUMP_FILE_USAGE);
|
||||
exit_uv(0);
|
||||
return;
|
||||
}
|
||||
|
||||
// check if key is contained
|
||||
string not_first = string(",") + key;
|
||||
int skip_n = 0;
|
||||
|
||||
@@ -1076,11 +1076,6 @@ ADD_TO_PARAM("audio-disable-adaptive-buffer", "* audio-disable-adaptive-buffer\n
|
||||
" Disables audio adaptive playback buffer (CoreAudio/JACK)\n");
|
||||
ADD_TO_PARAM("color", "* color=CT\n"
|
||||
" [experimental] Color space to use, C - colorimetry: 0 - undefined, 1 - BT.709, 2 - BT.2020/2100, 3 - P3; T - transfer fn: 0 - undefined, 1 - 709, 2 - HLG; 3 - PQ (signalized to GLFW on mac, NDI receiver)\n");
|
||||
#ifdef DEBUG
|
||||
ADD_TO_PARAM("debug-dump", "* debug-dump=<module>[=<n>][,<module2>[=<n>]\n"
|
||||
" Dumps specified buffer for debugging, n-th buffer may be selected, name is <module>.dump.\n"
|
||||
" Avaiable modules: lavd-uncompressed\n");
|
||||
#endif
|
||||
ADD_TO_PARAM("incompatible", "* incompatible\n"
|
||||
" Features that may possibly not be compatible with at least older or even any other UG version.\n");
|
||||
ADD_TO_PARAM("low-latency-audio", "* low-latency-audio[=ultra]\n"
|
||||
|
||||
Reference in New Issue
Block a user