diff --git a/src/debug.cpp b/src/debug.cpp index 9b0ca170f..4b98d3c2d 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -299,6 +299,12 @@ bool parse_log_cfg(const char *conf_str, } #ifdef DEBUG +#define DUMP_FILE_USAGE \ + "* debug-dump=[=][,[=]\n" \ + " Dumps specified buffer to a file for debugging, n-th buffer may " \ + "be selected, name is .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 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; diff --git a/src/host.cpp b/src/host.cpp index fd1c54ae3..3bbeac346 100644 --- a/src/host.cpp +++ b/src/host.cpp @@ -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=[=][,[=]\n" - " Dumps specified buffer for debugging, n-th buffer may be selected, name is .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"