diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-03-30 14:37:49 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-03-30 14:37:49 +0400 |
commit | 785373b03abd7bfd258a50a0f274c81229fbf98a (patch) | |
tree | bc438626382304accf1b1ccb9a29c4a629ffc442 /source/creator | |
parent | 81e3db364d589d747f17173b79490011d2a403f5 (diff) |
Added new command-line arguments --debug-ffmpeg and --debug-libmv to
be able to see debug prints coming from FFmpeg or libmv independently
of general blender debug messages.
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/creator/creator.c | 33 |
2 files changed, 36 insertions, 1 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 3374d653148..0873fd9a61f 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -49,6 +49,10 @@ if(WITH_LIBMV) add_definitions(-DWITH_LIBMV) endif() +if(WITH_CODEC_FFMPEG) + add_definitions(-DWITH_FFMPEG) +endif() + if(WITH_PYTHON) blender_include_dirs(../blender/python) add_definitions(-DWITH_PYTHON) diff --git a/source/creator/creator.c b/source/creator/creator.c index 3b5fc8687bf..c4da823381c 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -247,6 +247,15 @@ static int print_help(int UNUSED(argc), const char **UNUSED(argv), void *data) printf("Misc Options:\n"); BLI_argsPrintArgDoc(ba, "--debug"); BLI_argsPrintArgDoc(ba, "--debug-fpe"); + +#ifdef WITH_FFMPEG + BLI_argsPrintArgDoc(ba, "--debug-ffmpeg"); +#endif + +#ifdef WITH_LIBMV + BLI_argsPrintArgDoc(ba, "--debug-libmv"); +#endif + printf("\n"); BLI_argsPrintArgDoc(ba, "--factory-startup"); printf("\n"); @@ -359,13 +368,27 @@ static int debug_mode(int UNUSED(argc), const char **UNUSED(argv), void *data) printf("Build: %s %s %s %s\n", build_date, build_time, build_platform, build_type); #endif // WITH_BUILDINFO + BLI_argsPrint(data); + return 0; +} + #ifdef WITH_LIBMV +static int debug_mode_libmv(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) +{ libmv_startDebugLogging(); + + return 0; +} #endif - BLI_argsPrint(data); +#ifdef WITH_FFMPEG +static int debug_mode_ffmpeg(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) +{ + G.f |= G_DEBUG_FFMPEG; + return 0; } +#endif static int set_fpe(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) { @@ -1079,6 +1102,14 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle) BLI_argsAdd(ba, 1, "-d", "--debug", debug_doc, debug_mode, ba); BLI_argsAdd(ba, 1, NULL, "--debug-fpe", "\n\tEnable floating point exceptions", set_fpe, NULL); +#ifdef WITH_FFMPEG + BLI_argsAdd(ba, 1, NULL, "--debug-ffmpeg", "\n\tEnable debug messages from FFmpeg library", debug_mode_ffmpeg, NULL); +#endif + +#ifdef WITH_LIBMV + BLI_argsAdd(ba, 1, NULL, "--debug-libmv", "\n\tEnable debug messages from libmv library", debug_mode_libmv, NULL); +#endif + BLI_argsAdd(ba, 1, NULL, "--factory-startup", "\n\tSkip reading the "STRINGIFY (BLENDER_STARTUP_FILE)" in the users home directory", set_factory_startup, NULL); /* TODO, add user env vars? */ |