[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45288] trunk/blender: Added new command-line arguments --debug-ffmpeg and --debug-libmv to
Sergey Sharybin
sergey.vfx at gmail.com
Fri Mar 30 12:37:50 CEST 2012
Revision: 45288
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45288
Author: nazgul
Date: 2012-03-30 10:37:49 +0000 (Fri, 30 Mar 2012)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/build_files/scons/tools/Blender.py
trunk/blender/source/blender/blenkernel/BKE_global.h
trunk/blender/source/blender/blenkernel/intern/blender.c
trunk/blender/source/blender/imbuf/intern/util.c
trunk/blender/source/creator/CMakeLists.txt
trunk/blender/source/creator/creator.c
Modified: trunk/blender/build_files/scons/tools/Blender.py
===================================================================
--- trunk/blender/build_files/scons/tools/Blender.py 2012-03-30 10:37:39 UTC (rev 45287)
+++ trunk/blender/build_files/scons/tools/Blender.py 2012-03-30 10:37:49 UTC (rev 45288)
@@ -332,6 +332,9 @@
incs.append('#/extern/libmv')
defs.append('WITH_LIBMV')
+ if env['WITH_BF_FFMPEG']:
+ defs.append('WITH_FFMPEG')
+
if env['WITH_BF_PYTHON']:
incs.append('#/source/blender/python')
defs.append('WITH_PYTHON')
Modified: trunk/blender/source/blender/blenkernel/BKE_global.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_global.h 2012-03-30 10:37:39 UTC (rev 45287)
+++ trunk/blender/source/blender/blenkernel/BKE_global.h 2012-03-30 10:37:49 UTC (rev 45288)
@@ -107,6 +107,7 @@
#define G_DEBUG (1 << 12)
#define G_SCRIPT_AUTOEXEC (1 << 13)
#define G_SCRIPT_OVERRIDE_PREF (1 << 14) /* when this flag is set ignore the userprefs */
+#define G_DEBUG_FFMPEG (1 << 15)
/* #define G_NOFROZEN (1 << 17) also removed */
/* #define G_GREASEPENCIL (1 << 17) also removed */
Modified: trunk/blender/source/blender/blenkernel/intern/blender.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/blender.c 2012-03-30 10:37:39 UTC (rev 45287)
+++ trunk/blender/source/blender/blenkernel/intern/blender.c 2012-03-30 10:37:49 UTC (rev 45288)
@@ -281,7 +281,7 @@
/* special cases, override loaded flags: */
if (G.f != bfd->globalf) {
- const int flags_keep= (G_DEBUG | G_SWAP_EXCHANGE | G_SCRIPT_AUTOEXEC | G_SCRIPT_OVERRIDE_PREF);
+ const int flags_keep= (G_DEBUG | G_DEBUG_FFMPEG | G_SWAP_EXCHANGE | G_SCRIPT_AUTOEXEC | G_SCRIPT_OVERRIDE_PREF);
bfd->globalf= (bfd->globalf & ~flags_keep) | (G.f & flags_keep);
}
Modified: trunk/blender/source/blender/imbuf/intern/util.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/util.c 2012-03-30 10:37:39 UTC (rev 45287)
+++ trunk/blender/source/blender/imbuf/intern/util.c 2012-03-30 10:37:49 UTC (rev 45288)
@@ -231,8 +231,7 @@
ffmpeg_init = 1;
av_register_all();
avdevice_register_all();
-
- if ((G.f & G_DEBUG) == 0) {
+ if ((G.f & G_DEBUG_FFMPEG) == 0) {
silence_log_ffmpeg(1);
}
else {
Modified: trunk/blender/source/creator/CMakeLists.txt
===================================================================
--- trunk/blender/source/creator/CMakeLists.txt 2012-03-30 10:37:39 UTC (rev 45287)
+++ trunk/blender/source/creator/CMakeLists.txt 2012-03-30 10:37:49 UTC (rev 45288)
@@ -49,6 +49,10 @@
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)
Modified: trunk/blender/source/creator/creator.c
===================================================================
--- trunk/blender/source/creator/creator.c 2012-03-30 10:37:39 UTC (rev 45287)
+++ trunk/blender/source/creator/creator.c 2012-03-30 10:37:49 UTC (rev 45288)
@@ -247,6 +247,15 @@
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 @@
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 @@
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? */
More information about the Bf-blender-cvs
mailing list