Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build_files/scons/tools/Blender.py3
-rw-r--r--source/blender/blenkernel/BKE_global.h1
-rw-r--r--source/blender/blenkernel/intern/blender.c2
-rw-r--r--source/blender/imbuf/intern/util.c3
-rw-r--r--source/creator/CMakeLists.txt4
-rw-r--r--source/creator/creator.c33
6 files changed, 42 insertions, 4 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index 8341d51318b..ec7b6a0ce4c 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -332,6 +332,9 @@ def creator(env):
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')
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index fab42b5667b..80c9244d232 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -107,6 +107,7 @@ typedef struct Global {
#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 */
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index b8df30c5de9..bb52af86e00 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -281,7 +281,7 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
/* 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);
}
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c
index 008be2fde74..c21c58a114a 100644
--- a/source/blender/imbuf/intern/util.c
+++ b/source/blender/imbuf/intern/util.c
@@ -231,8 +231,7 @@ void do_init_ffmpeg(void)
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 {
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? */