[clutter] COGL_PIXEL_FORMAT_G_8
Hi When I use cogl_texture_get_cogl_texture(CLUTTER_TEXTURE (video)) to get the texture from a video and extract the data from the cogl_texture to a gdk pixbuf, pixbuf is corrupted. Its like three splits of the thumbnail in grey scale. When I checked the pixel format of the cogl texture it returned 8 (COGL_PIXEL_FORMAT_G_8) and the rowstride was equal to the width of the texture. But COGL documentation shows COGL_PIXEL_FORMAT_G_8 as FIXME. The pixbuf is extracted as follows Pixbuf = gdk_pixbuf_new_from_data(data_video, //extracted usig cogle_texture_get_data() GDK_COLORSPACE_RGB, FALSE, 8, Width, Height, Rowstride, NULL, NULL); I am using Clutter 1.0. The same thing used to work with the clutter 0.8. when used with clutter 0.8 the pixel format was COGL_PIXEL_FORMAT_24 and the rowstride was three times the width of the texture. Pls help Thanks Yaser Hameed
[clutter] EGL and OpenGL ES
Hi, I wonder if EGL and OpenGL ES is currently maintained or not? As I'm trying with the r1.0 and failed to compile with EGL backend. Regards, -Hieu
Re: [clutter] COGL_PIXEL_FORMAT_G_8
On Fri, 2009-08-07 at 07:04 +0100, Yaser Hameed (RBEI/ECA3) wrote: Hi When I use cogl_texture_get_cogl_texture(CLUTTER_TEXTURE (video)) to get the texture from a video and extract the data from the cogl_texture to a gdk pixbuf, pixbuf is corrupted. Its like three splits of the thumbnail in grey scale. Indeed you are right, the clutter sink now uploads the YUV frames to separate texture units and produce the final fragments using a fragment shader that do the YUV to RGB transformation. This is done to offload the costly colorspacing operation from the CPU to the GPU. When I checked the pixel format of the cogl texture it returned 8 (COGL_PIXEL_FORMAT_G_8) and the rowstride was equal to the width of the texture. But COGL documentation shows COGL_PIXEL_FORMAT_G_8 as FIXME. The texture unit 0 has the Y frame, ie a Grey scale image with 8 bits per pixel. The same thing used to work with the clutter 0.8. when used with clutter 0.8 the pixel format was COGL_PIXEL_FORMAT_24 and the rowstride was three times the width of the texture. Right, that was because the sink was not using shaders and thus the colospacing was done by the CPU and a RGB frame was uploaded. Pls help Several solutions here, not sure what is your exact use case (how often do you want to create pixbuf? is this for generating thumbnails? do you want to play the video while generating screenshots?) so blindly guessing you want to generate thumbnails. Clutter-Gst is not designed to extract thumbnails you should use GStreamer API to do so. As this is a FAQ GStreamer developers have written a small example that uses ffmpegcolorspace and appsink to retrieve a buffer, create a GdkPixbuf from and write a png to the disk. You can find this example at: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/tests/examples/snapshot/snapshot.c HTH, -- Damien -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.com
[clutter] Problems while cross compiling Clutter with SDL
Hi, I need some help to cross compiling Clutter. Right now I have sucessfully compiled clutter-1.0.0 on a i686 PC and I'm trying to compile it for a sh4 platform using SDL. I didn't got very far becouse I'm still having configure problems: *./configure --host=sh4-linux --with-flavour=sdl * checking for getpagesize... yes checking for working mmap... no checking for memset... yes checking for memcpy... yes checking for strcasecmp... yes checking for glib-mkenums... /usr/bin/glib-mkenums checking for glib-genmarshal... /usr/bin/glib-genmarshal checking for sh4-linux-pkg-config... /usr/bin/sh4-linux-pkg-config checking pkg-config is at least version 0.9.0... yes checking for dlopen in -ldl... yes checking for sdl-config... /usr/bin/sdl-config checking for glEnable in -lGL... no configure: error: libGL not found The platform files (include, lib, etc) are not in the default paths, like /usr/include and /usr/lib. They are in some other place like /opt/sh4/usr/include, /opt/sh4/usr/lib, /opt/sh4/usr/bin, and so on... Here is some of the config.log configure:13044: sh4-linux-gcc -o conftest -g -O2 conftest.c -ldl 5 configure:13051: $? = 0 configure:13072: result: yes configure:13889: checking for sdl-config configure:13907: found /usr/bin/sdl-config configure:13919: result: /usr/bin/sdl-config configure:13943: checking for glEnable in -lGL configure:13978: sh4-linux-gcc -o conftest -g -O2 conftest.c -lGL 5 /opt/STM/STLinux-2.3/devkit/sh4/lib/gcc/sh4-linux/4.2.3/../../../../sh4-linux/bin/ld: cannot find -lGL collect2: ld returned 1 exit status configure:13985: $? = 1 configure: failed program was: | /* confdefs.h. */ | #define PACKAGE_NAME clutter | #define PACKAGE_TARNAME clutter | #define PACKAGE_VERSION 1.0.0 | #define PACKAGE_STRING clutter 1.0.0 | #define PACKAGE_BUGREPORT http://bugzilla.o-hand.com/enter_bug.cgi?product=Clutter; | #define PACKAGE clutter | #define VERSION 1.0.0 | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR .libs/ | #define STDC_HEADERS 1 | #define HAVE_FCNTL_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_MALLOC 0 | #define malloc rpl_malloc | #define HAVE_STDLIB_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_MEMSET 1 | #define HAVE_MEMCPY 1 | #define HAVE_STRCASECMP 1 | #define HAVE_CLUTTER_SDL 1 | #define HAVE_COGL_GL 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. |Use char because int might match the return type of a GCC |builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern C | #endif | char glEnable (); | int | main () | { | return glEnable (); | ; | return 0; | } configure:14006: result: no configure:14015: error: libGL not found Any help is welcome. Thanks
Re: [clutter] EGL and OpenGL ES
On Fri, 2009-08-07 at 14:01 +0700, Hieu Le Trung wrote: I wonder if EGL and OpenGL ES is currently maintained or not? As I’m trying with the r1.0 and failed to compile with EGL backend. yes, as the release notes for the 1.0.0 release said: o The GL|ES backends are known to be broken; we are currently unable to test them, but we gladly accept patches for them until such time when we are able to resume testing. there is a patch attached to bug 1698: http://bugzilla.openedhand.com/show_bug.cgi?id=1698 that we'd like to integrate, as soon as we resolve some issues about copyright assignment; testing on multiple platforms would also be very well accepted. ciao, Emmanuele. -- Emmanuele Bassi, Senior Engineer| emmanuele.ba...@intel.com Intel Open Source Technology Center | http://oss.intel.com -- To unsubscribe send a mail to clutter+unsubscr...@o-hand.com