From c737a7aa052f2ecc0a2a3e859b7b6162a666b7ff Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Wed, 24 Sep 2008 02:07:41 +0200 Subject: can use several G_LOG_DOMAINs and GST_CATegories, with msvc8 --- ChangeLog | 12 ++++++ INSTALL | 96 +++++++++++++++++++++++++++++++++++++---------- TODO | 14 ++++++- docs/DEBUGGING | 62 ++++++++++++++++++++++++++++++ gst/gl/gstglfilterglass.c | 2 +- tests/pipelines | 3 ++ 6 files changed, 167 insertions(+), 22 deletions(-) create mode 100644 docs/DEBUGGING diff --git a/ChangeLog b/ChangeLog index 654a70a..85ffdc2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-09-24 Julien Isorce + + * INSTALL + * TODO + * docs/DEBUGGING + * gst/gl/gstglfilterglass.c + * tests/pipelines + Update install instructions. + Close TODO task 18. (works with msvc8 now) + Replace GST_CAT_LOG by GST_LOG. + Add a some debugging tips. + 2008-09-22 Filippo Argiolas * gst/gl/gstglpixbufoverlay.c: diff --git a/INSTALL b/INSTALL index 2889d6d..87e30c7 100644 --- a/INSTALL +++ b/INSTALL @@ -7,14 +7,21 @@ Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. -Cross-platform Installation -========================== -Using CMake http://www.cmake.org +Builders summary: +======================================================= +Cross-platform build: Using CMake http://www.cmake.org +Unix frozen builds: autotools or unix/codeblocks +Win32 frozen builds: win32/codeblocks or win32/vs8 +======================================================= + --------- -* WIN32: --------- +Cross-platform build: Using CMake http://www.cmake.org +====================================================== + +----------------- +* cmake on WIN32: +----------------- -mingw32: cd gst-plugins-gl @@ -41,7 +48,7 @@ mkdir codeblocks cd codeblocks cmake -G "CodeBlocks - MinGW Makefiles" ..\gst-plugins-gl Open GST-PLUGINS-GL.cbp and press Ctrl-F9 to build the project -result in gst\gl\libgstopengl.dll +result is gst\gl\libgstopengl.dll -Others: Type "cmake --help" to have a look of possible builds @@ -50,7 +57,7 @@ Eclipse CDT4 - MinGW Makefiles etc...) -On win32 I usually write a file named glcmake.bat -in the same dir as gst-plugins-gl is. +in the same dir as gst-plugins-gl dir is (not in the gst-plugins-gl dir). BUT IT IS NOT AN OBLIGATION This file contains: @@ -76,21 +83,72 @@ del *ache* && cmake -G "CodeBlocks - MinGW Makefiles" ..\gst-plugins-gl cmd rem ######################################################################## -In this way you have to set manually the env variables +In this way you have to set manually the env variables. + +---------------- +* cmake on UNIX: +---------------- -------- -* UNIX: -------- +-Unix Makefiles: +cd gst-plugins-gl +cd .. +mkdir unix +cd unix +cmake -G "Unix Makefiles" ../gst-plugins-gl +make +result is gst/gl/libgstopengl.so -For now just use ./autogen.sh then make -because I have not correctly configured yet the cmake build on -unix (cmake -G "Unix Makefiles") +-CodeBlocks: +cd gst-plugins-gl +cd .. +mkdir codeblocks +cd codeblocks +cmake -G "CodeBlocks - MinGW Makefiles" ../gst-plugins-gl +Open GST-PLUGINS-GL.cbp and press Ctrl-F9 to build the project +result is gst/gl/libgstopengl.so + +-Others: +Type "cmake --help" to have a look of possible builds +(Eclipse CDT4 - Unix Makefiles, +KDevelop3, +KDevelop3 - Unix Makefiles +etc...) + + +Unix frozen builds: autotools or unix/codeblocks +================================================ + +-Autotools +./autogen.sh +make result in gst-plugins-gl/gst/gl/.libs/libgstopengl.so -Or you can use gst-plugins-gl/unix/codeblocks/gstopengl/gstopengl.cbp -But this unix codeblocks build will be replaced when -the cmake build will work on unix because cmake can generate it -through cmake -G "CodeBlocks - Unix Makefiles" + +-CodeBlocks +gst-plugins-gl/unix/codeblocks/gstopengl/gstopengl.cbp + + +Win32 frozen builds: win32/codeblocks or win32/vs8 +================================================= + +-CodeBlocks +gst-plugins-gl\win32\codeblock\gstopengl.cbp + +-vs8 +gst-plugins-gl\win32\vs8\libgstopengl.sln + + +Simple test: +============ + +-From the command line: +export GST_GL_SHADER_DEBUG=1 +(or set GST_GL_SHADER_DEBUG=1 on win32) +gst-launch-0.10 --gst-debug=gldisplay:3 videotestsrc ! glimagesink + +see gst-plugins-gl/tests/pipelines for other simple cmd examples. +and gst-plugins-gl/tests/examples for more complex tests. + Basic Installation ================== diff --git a/TODO b/TODO index 992cea7..f636032 100644 --- a/TODO +++ b/TODO @@ -73,12 +73,22 @@ (for examples gleffects does not check you have shaders available so it can cause segfault.) (whereas using "gst_gl_display_gen_shader", the check is done) -- (ALSMOST DONE) 18: use a custom debug category in GstGLShader instead of g_debug etc.. +(DONE) - 18: use a custom debug category in GstGLShader instead of g_debug etc.. fargiolas: GstGLShader is a generic object not a gst_object, when I wrote it I asked at gstreamer developers which debugging system was better suited and gst_debug was not the proper choice. Maybe we can disable them is by setting a print handler (g_set_print_handler) and enabling them with some environment variable. - -> GST_GL_SHADER_DEBUG has to work on win32 too + -> GST_GL_SHADER_DEBUG has to work on win32+vc8, too. + Now it works, I have added: + #else /* _MSC_VER */ + /* varargs macros available since msvc8 (vs2005) */ + # if _MSC_VER >= 1400 + # define G_HAVE_ISO_VARARGS 1 + # define __func__ __FUNCTION__ + # endif + #endif /* not _MSC_VER */ + in the glibconfig.h file. + (DONE) - 19: update authors from the CVS repository diff --git a/docs/DEBUGGING b/docs/DEBUGGING new file mode 100644 index 0000000..7aea284 --- /dev/null +++ b/docs/DEBUGGING @@ -0,0 +1,62 @@ + +===== +Notes +===== + +First on win32, if you are using msvc, you should check the glibconfig.h file: +About line 130, you should have: + +#else /* _MSC_VER */ +/* varargs macros available since msvc8 (vs2005) */ +# if _MSC_VER >= 1400 +# define G_HAVE_ISO_VARARGS 1 +# define __func__ __FUNCTION__ +# endif +#endif /* not _MSC_VER */ + + +==================== +OpenGL context infos +==================== + +#gst-launch-0.10 --gst-debug=gldisplay:N pipeline +#N=1: errors +#N=2: errors warnings +#N=3: errors warnings infos +#N=4: errors warnings infos +#N=5: errors warnings infos logs + +gst-launch-0.10 --gst-debug=gldisplay:3 videotestsrc ! glimagesink + + +======= +Shaders +======= + +win32: +set GST_GL_SHADER_DEBUG=1 (or something else because setting it to 0 is NOT like to not setting it at all) +gst-launch-0.10 videotestsrc ! glimagesink +when you are done, just type "set GST_GL_SHADER_DEBUG=" to unset it. + +unix: +export GST_GL_SHADER_DEBUG=1 +gst-launch-0.10 videotestsrc ! glimagesink +when you are done, just type "export GST_GL_SHADER_DEBUG=" or "export GST_GL_SHADER_DEBUG=0" to unset it. + + +=========== +gl elements +=========== + +gst-launch-0.10 --gst-debug=gleffects:3 videotestsrc ! glupload ! gleffects effect=8 ! glimagesink +gst-launch-0.10 --gst-debug=gleffects:3,gldisplay:3 videotestsrc ! glupload ! gleffects effect=8 ! glimagesink + + +======== +Remarks: +======== + +If you are not already mind irreversible, or if you are still looking for a dev environment +then you should try CodeBlocks which is available on both linux and windows, or vs8(9) on windows. +Indeed, nowadays ponctual debug traces, like printf and others (I mean not definitive traces like GST_DEBUG), +are forbidden. They have been replaced by break points which are useable only through a good IDE. diff --git a/gst/gl/gstglfilterglass.c b/gst/gl/gstglfilterglass.c index 9b09eec..efe8317 100644 --- a/gst/gl/gstglfilterglass.c +++ b/gst/gl/gstglfilterglass.c @@ -294,7 +294,7 @@ gst_gl_filter_glass_callback (gint width, gint height, guint texture, gpointer s time_left -= 1000000 / 25; if (time_left > 2000) { - GST_CAT_LOG (GST_CAT_DEFAULT, "escape"); + GST_LOG ("escape"); return; } } diff --git a/tests/pipelines b/tests/pipelines index c67a517..e83d3af 100644 --- a/tests/pipelines +++ b/tests/pipelines @@ -56,3 +56,6 @@ gst-launch-0.10 videotestsrc ! glupload ! glfiltercube ! gleffects effect=3 ! gl gst-launch-0.10 videotestsrc ! glupload ! glbumper location=normalmap.bmp ! glimagesink gst-launch-0.10 videotestsrc ! glupload ! glbumper location=bumpwall.bmp ! "video/x-raw-gl, width=1200, height=800" ! glimagesink + +gst-launch-0.10 videotestsrc ! glupload ! glfilterglass ! glimagesink +gst-launch-0.10 videotestsrc ! glupload ! "video/x-raw-gl, width=640, height=480" ! glfilterglass ! glimagesink -- cgit v1.2.3