Giter Site home page Giter Site logo

umlaeute / gem Goto Github PK

View Code? Open in Web Editor NEW
98.0 98.0 28.0 21.9 MB

Graphics Environment for Multimedia (official repository)

Home Page: https://gem.iem.at

License: Other

Shell 0.43% AppleScript 0.03% NSIS 0.29% Makefile 1.20% C++ 57.94% C 37.89% Objective-C 0.79% Batchfile 0.01% M4 1.34% GLSL 0.01% Objective-C++ 0.09%

gem's Introduction

umlaeute's github stats

gem's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gem's Issues

[text2d] and [text3d] crash when loading font

with the latest code from here, [text2d] and [text3d] crashes when sending a [load vera.ttf( message twice.

here is a backtrace :

(gdb) thread apply all bt

Thread 1 (Thread 0x7ffff7fc1740 (LWP 26229)):
#0  0x0000000000000020 in ?? ()
#1  0x00007ffff39315e9 in text2d::makeFont (this=0xb28070, 
    fontfile=0x84b798 "/home/antoine/pd/Gem/tests/../examples/data/vera.ttf")
    at text2d.cpp:61
#2  0x00007ffff389d9a0 in TextBase::fontNameMess (this=this@entry=0xb28070, 
    filename=...) at TextBaseFTGL.cpp:172
#3  0x00007ffff389cc06 in TextBase::_CallbackClass_fontNameMess_505::callback (
    data=<optimized out>, v0=<optimized out>) at TextBaseFTGL.cpp:505
#4  0x0000000000467a5f in pd_typedmess ()
#5  0x000000000046947a in outlet_anything ()
#6  0x000000000046795b in pd_typedmess ()
#7  0x00000000004728aa in binbuf_eval ()
#8  0x000000000041d69f in text_click ()
#9  0x000000000044d877 in canvas_doclick ()
#10 0x0000000000467a69 in pd_typedmess ()
#11 0x000000000046795b in pd_typedmess ()
#12 0x00000000004728aa in binbuf_eval ()
#13 0x000000000047c629 in socketreceiver_read ()
#14 0x000000000047b17a in sys_domicrosleep.constprop.3 ()
#15 0x0000000000476731 in m_mainloop ()
#16 0x00007ffff6defde5 in __libc_start_main (main=0x411800 <main>, argc=2, ubp_av=0x7fffffffe0a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe098) at libc-start.c:260
#17 0x0000000000411831 in _start ()

the file "/home/antoine/pd/Gem/tests/../examples/data/vera.ttf" exists (if not, an error is shown in Pd's console without crash)

this happends on ubuntu 12.04, 13.10 and 14.04

pix_share_write crashes on [set ...( message

crash occurs sometimes (yes it should be better to reproduce it each time, but I can't...) when I send a [set ...( message to [pix_share_write]

$ uname -srpio
Linux 3.2.0-53-generic x86_64 x86_64 GNU/Linux

here is a gdb backtrace :

#0  0x00007ffff3a6b581 in pix_share_write::getShm (this=0xb7db60, argc=<optimized out>, argv=<optimized out>) at pix_share_write.cpp:316
#1  0x00007ffff3a6b8eb in setMessCallback (argv=<optimized out>, argc=<optimized out>, data=0xbd7210, s=<optimized out>) at pix_share_write.cpp:378
#2  pix_share_write::setMessCallback (data=0xbd7210, s=<optimized out>, argc=<optimized out>, argv=<optimized out>) at pix_share_write.cpp:373
#3  0x0000000000465c29 in pd_typedmess ()
#4  0x000000000046767a in outlet_anything ()
#5  0x0000000000465b5b in pd_typedmess ()
#6  0x000000000047091a in binbuf_eval ()
#7  0x000000000041c186 in message_float ()
#8  0x00000000004674bf in outlet_float ()
#9  0x00000000004675ea in outlet_list ()
#10 0x00000000004b19bd in trigger_list ()
#11 0x00000000004b1d40 in trigger_float ()
#12 0x00000000004674bf in outlet_float ()
#13 0x00007fffdd8305fa in routeOSC_doanything (x=0xb7e8a0, s=0xb7da70, argc=1, argv=0xca6800) at routeOSC.c:340
#14 0x0000000000465b5b in pd_typedmess ()
#15 0x000000000046767a in outlet_anything ()
#16 0x0000000000465b5b in pd_typedmess ()
#17 0x0000000000465b5b in pd_typedmess ()
#18 0x000000000046767a in outlet_anything ()
#19 0x00007fffda735d2f in unpackOSC_list (x=0xca67b0, s=<optimized out>, argc=<optimized out>, argv=<optimized out>) at unpackOSC.c:277
#20 0x00000000004675ea in outlet_list ()
#21 0x00007fffda531ffa in slipdec_dump (dosend=1, x=0xb52a70) at slipdec.c:77
#22 slipdec_list (x=0xb52a70, s=<optimized out>, ac=<optimized out>, av=0x823520) at slipdec.c:121
#23 0x00000000004675ea in outlet_list ()
#24 0x0000000000466789 in inlet_list ()
#25 0x00000000004675ea in outlet_list ()
#26 0x00007fffd9d2019c in iemnet__streamout (outlet=0xb53090, argc=<optimized out>, argv=<optimized out>, stream=<optimized out>) at iemnet.c:75
#27 0x00007fffd9d2117a in iemnet__receiver_tick (x=0x7fffcc000de0) at iemnet_receiver.c:150
#28 0x00007fffd9d21956 in pollfun (x=<optimized out>, fd=<optimized out>) at iemnet_notify.c:63
#29 0x00000000004792ea in sys_domicrosleep.constprop.3 ()
#30 0x000000000047b0ea in sys_pollgui ()
#31 0x000000000047477a in m_mainloop ()
#32 0x00007ffff6e0476d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#33 0x00000000004114d1 in _start ()

(new) filmDS: EOM is not reported

when the end of the video-file is reached, the new (ATL-free) implementation of filmDS does not report that back to the plugin-host, and the last image just stays.

also, when opening a film, it seems that the last frame is displayed as default.

videoDV4L doesn't build while DV plugins is enabled by configure

on Ubuntu 14.04 with :

sudo apt-get update
sudo apt-get install libdv4-dev libraw1394-dev libiec61883-0 
git pull
./configure

I got :

  capture-support
    use PLUGINS      : yes
    use v4l              : yes (libv4l)
    use v4l2             : yes (libv4l)
    use ieee1394         : yes (libdc1394)
    use DV               : yes
    use Unicap           : yes
    use Video-for-WinDOS : no
    use QuickTime        : no
    use AVFoundation     : no

But after make there is no gem_videoDV4L.so.

It appears that HAVE_LIB_LIBIEC61883 is not defined while the library is well installed.
If I commented the lines 10 and 15 of plugins/videoDV4L/Makefile.am then ./configure && make I have a gem_videoDV4L.so.

But I didn't test it since I have no DV camcorder under the hand.

FYI the full ./configure log is here : https://gist.github.com/avilleret/9457535e645aa6806425

any.h broken on OSX/64bit

the following fails on OSX-10.9(mavericks), at least when building 64bit binaries:

    pixBlock pix;
    pixBlock*pixPtr=&pix;
    GemState state;
    state.set(_PIX, pixPtr) ;
    if(!state.get(_PIX, pixPtr))
      error("oops");

the compiler used is:

    $ g++ --version
    Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-    dir=/usr/include/c++/4.2.1
    Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
    Target: x86_64-apple-darwin13.0.0

the problem did not occur on linux-64bit using g++

this is the cause for images not being displayed at all

gemlist : default argument on constructor

trying to build Gem version 0.93.git 50cc112 on Mac OSX, got :

gemlist_info.cpp:37:42: error: addition of default argument on redeclaration makes this constructor a default constructor
gemlist_info :: gemlist_info    (t_floatarg arg0=0) {
                                            ^    ~
./gemlist_info.h:32:3: note: previous declaration is here
  gemlist_info (t_floatarg);    // CON
  ^
1 error generated.

according to [1], the default arg should be in the constructor's declaration

[1] : http://stackoverflow.com/questions/18313509/default-argument-gcc-vs-clang

mingw: fails to detect OpenGL properly

the autoconf macro ax_check_gl fails to properly detect OpenGL when running on MinGW.

while it does detect the presence of the GL/gl.h headers, it fails to detect a linkable library (should be opengl32).

[glsl_vertex] doesn't load shader if [open( have been received before startRendering()

to reproduce :

  1. open examples/10.glsl/01.simple_texture.pd
  2. click on the bang at the left of load shader comment
  3. start rendering

I got this in the console :

[glsl_fragment]: shader 'texture.frag' will be loaded when rendering is turned on (openGL context needed)
[pix_texture]: using mode 0: TEXTURE_2D
GLEW version 1.10.0
[gemglxwindow]: Direct Rendering enabled!
[glsl_fragment]: shader 'texture.frag' will be loaded when rendering is turned on (openGL context needed)
[glsl_fragment]: need to load a shader

and the shader doesn't work.

Loading shader after starting rendering works fine.

pix_mano / pix_hit : undefined AbsInt and FLOAT_CLAMP

when building pix_mano on Ubuntu today I got :
pix_mano.cpp:673:51: error: 'AbsInt' was not declared in this scope

when building pix_hit I got :
pix_hit.cpp:430:43: error: 'FLOAT_CLAMP' was not declared in this scope

those functions are defined in Utils/Functions.h

videoVLC is crashing Pd on Win7 / MSVC w32 build

I have a gem_videoVLC.dll, libvlc.dll and libvlccore.dll beside my Gem.dll
but when launching Pd it crashes and I got this error in terminal :
GemDylib throwing: DLLerror<0x7e>Le module spécifié est introuvable
which could be in English : The specified module can't be found
and I don't know how to debug this further...

libvlc.dll version is 2.1.0.0
and all other Gem's plugins are disable.

videoVLC has red/blue reversed on (w32/mingw)

  • cross-compiled Gem (c74203e)
    • build-machine: Debian/sid/64bit x86_64-linux-gnu
    • target: i686-w64-mingw32
  • cross-compiled videoVLC
    • using VLC 2.5.5-Rincewind
  • use it on W7/32bit
    • opened screen:// device

Result:

  • screen is captured
  • colorspace is RGBA
  • colors are wrong: red becomes blue and blue becomes red

videoUNICAP build fails on Linux due to undefined math functions

I don't know why this happens but today when building videoUNICAP on Ubuntu 14.04 I got :

videoUNICAP.cpp: In function 'float {anonymous}::dimension_penalty(int, int, unicap_rect_t&)':
videoUNICAP.cpp:237:30: error: 'sqrt' was not declared in this scope
         double r=sqrt(w*w+h*h);
videoUNICAP.cpp:239:25: error: 'fabs' was not declared in this scope
         return fabs(r-r0);
videoUNICAP.cpp:242:26: error: 'sqrt' was not declared in this scope
         double r=sqrt(w*h);
videoUNICAP.cpp:244:25: error: 'fabs' was not declared in this scope
         return fabs(r-r0);
videoUNICAP.cpp:247:31: error: 'fabs' was not declared in this scope
       return fabs(w-size.width);
videoUNICAP.cpp:249:32: error: 'fabs' was not declared in this scope
       return fabs(h-size.height);

[mesh_square] crash when mesh size > 1000

to reproduce create a mesh with size > 1000 x 1000

since texCoords array is statically allocated with MAXGRID defined to 1000 in mesh_square.h, setting a mesh size above this limit is very dangerous...

fix : allocate dynamically texCoords array.

`gem_state 0/1` is gone

with the multicontext support, the [gemhead] no longer emits gem_state 1 (and ... 0) messages.

this breaks some patches

mingw: fails to detect pthreads properly

the autoconf macro ax_pthread fails to properly detect pthread-support when running on MinGW.

while it does detect the presence of the pthread.h header, it fails to detect a linkable library (should be pthread).

the result is, that compilation succeeds, but linking fails.

cleanup context variables on object/context destruction

When an object that holds context-specific data (using gem::ContextData<>) is destroyed, all context-data should be destroyed in the correct context.
This involves switching to each context and freeing any resources.
e.g.

     static void GemContext::forEachContext(GemBase&obj) {
        oldctx=getCurrentContext();
        for ctx in contexts
        do
            ctx.makeCurrent();
            obj.removedContext();
        done
        oldctx.makeCurrent();
    }

Similiary, when an openGL-context is destroyed (e.g. by closing a window), each object holding context-specific data should be called to free the resources of this context:

    myContext::destroy() {
          makeCurrent();
          for obj in GemBase::objects
          do
                obj.removedContext();
          done
    }

better `--with-*-flags` interpretation

currently we can add --with-FOO-includes=BAR and --with-FOO-libs=BAZ when calling configure.

however, it's unclear what BAR and BAZ are meant to be.

the documentation (./configure --help) mentions that these are actual paths, but it doesn't seem to work:

  • have BAZ be the library path for libFOO
  • then configure will correctly detect the existence of libFOO
  • but it will not add -lFOO to the GEM_FOO_LIBS

also it would be nice if we could add more complex compiler/linker-flags with these flags (similar to what PKG_foo_FLAGS already offers via environmental variables.

`FTGL` defined despite of --without-ftgl option

On MacOSX 10.9.4, configuring with :

./configure --without-ftgl

leads to :

./TextBase.h:38:12: fatal error: 'FTFont.h' file not found

adding #undef FTGL on line 37 of TextBase.h avoid the error.
So it seems that FTGL is defined somewhere on my system and --without-ftgl does not override it.

W32 build (MSVC)

we really want to have proper w32-builds back (using VisualStudio)

build on Mac OSX 10.9.4 : error: implicit instantiation of undefined template

I got this when trying to build Gem version 0.93.git 50cc112 on Mac OSX 10.9.4 :

In file included from Properties.cpp:3:
In file included from ./Properties.h:25:
../../src/Utils/any.h:46:23: error: implicit instantiation of undefined template
      'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
    const std::string from;
                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from Properties.cpp:3:
In file included from ./Properties.h:25:
../../src/Utils/any.h:47:23: error: implicit instantiation of undefined template
      'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
    const std::string to;
                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from Properties.cpp:3:
In file included from ./Properties.h:25:
../../src/Utils/any.h:38:31: error: implicit instantiation of undefined template
      'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
    virtual const std::string what(void) {
                              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from Properties.cpp:3:
In file included from ./Properties.h:25:
../../src/Utils/any.h:39:28: error: implicit instantiation of undefined template
      'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
      std::string result = std::string("bad cast(");
                           ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from Properties.cpp:3:
In file included from ./Properties.h:25:
../../src/Utils/any.h:39:19: error: implicit instantiation of undefined template
      'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
      std::string result = std::string("bad cast(");
                  ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from Properties.cpp:3:
In file included from ./Properties.h:25:
../../src/Utils/any.h:41:16: error: implicit instantiation of undefined template
      'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
      result+= std::string("->");
               ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from Properties.cpp:3:
In file included from ./Properties.h:25:
../../src/Utils/any.h:43:16: error: implicit instantiation of undefined template
      'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >'
      result+= std::string(")");
               ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:188:33: note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
7 errors generated.

[pix_curve] crashes

  • [pix_curve R G B] (no alpha table)
  • input pixes in RGBA-mode
  • segfault!
  • backtrace leads to name_A->s_name access

conclusion: table-names are not properly initialized

building with FTGL on Mac OS X

ftgl package has been fixed by brew team
but now, when trying to build Gem with FTGL, I got :

/usr/local/Cellar/ftgl/2.1.3-rc5/include/FTGL/ftglyph.h:50:19: error: variable has incomplete type 'class FTGL_EXPORT'

complete log is here : https://gist.github.com/avilleret/9a73e77c69c2448a01c2

I notice that make CPPFLAGS=$(pkg-config --cflags freetype2) works

since the include path returned by $(pkg-config --cflags freetype2) is already there when I do make alone, what's the difference ?

videoVIDS: set controls

allow to programmatically change the controls of the capturing device when using videoVIDS

model-loaders broken in multicontext

when compiling Gem with multicontext enabled (as is now the default), the model-loaders stop working, with the error:

symbol not found ___GLEW_VERSION_1_1

[glsl_program] crashes Pd when deleting if rendering has not been started

to reproduce :
1- open a new patch
2- put a [glsl_program] inside it
3- delete [glsl_program]

Pd crashes with this backtrace :

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3e91962 in glsl_program::~glsl_program (this=0xbf4810, __in_chrg=<optimized out>) at glsl_program.cpp:138
138   if(GLEW_VERSION_2_0 && m_program)
(gdb) thread apply all bt 

Thread 1 (Thread 0x7ffff7fbb740 (LWP 23805)):
#0  0x00007ffff3e91962 in glsl_program::~glsl_program (this=0xbf4810, __in_chrg=<optimized out>) at glsl_program.cpp:138
#1  0x00007ffff3e919f9 in glsl_program::~glsl_program (this=0xbf4810, __in_chrg=<optimized out>) at glsl_program.cpp:146
#2  0x000000000046dcb9 in pd_free ()
#3  0x000000000041795d in glist_delete ()
#4  0x000000000044ed3e in canvas_doclear ()
#5  0x00000000004520bd in canvas_cut ()
#6  0x000000000046fc7d in pd_typedmess ()
#7  0x000000000046fa3c in pd_typedmess ()
#8  0x00000000004794cc in binbuf_eval ()
#9  0x0000000000483e7c in socketreceiver_read ()
#10 0x00000000004831fd in sys_domicrosleep.constprop ()
#11 0x000000000047fb40 in m_mainloop ()
#12 0x00007ffff6deeec5 in __libc_start_main (main=0x411e10 <main>, argc=5, argv=0x7fffffffded8, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffdec8) at libc-start.c:287
#13 0x0000000000411e3e in _start ()

if rendering is started before deleting, Pd doesn't crash

can't load gem_modelOBJ.so due to undefined symbol

I got an error when loading model plugin (at Pd's startup) :

dylib loading file '/usr/local/lib/pd/extra/Gem/gem_modelOBJ.so'!
library loading returned: dlerror '/usr/local/lib/pd/extra/Gem/gem_modelOBJ.so: undefined symbol: __GLEW_VERSION_1_1'

on Ubuntu 14.04 64bit, with both Intel and Nvidia (331.38) driver.

filmDS : can't load anything after trying to load an unsupported file

on Windows 7 with latest Gem from Git

to reproduce :

  1. open pix_film-help.pd
  2. open a supported file such as examples/data/homer.avi
  3. try to open an unsupported file such as examples/data/anim-1.mov, you should see something like : Unable to connect filters -2147220969 in red in the Pd's console.
  4. try to load examples/data/homer.avi again, and I got Unable to add SampleFilter 262701

[gemvertexbuffer] VBO size issue

when I set the VBO size to 3 and try to draw a simple triangle, only 2 points appear and the first one is wrong

I have to increase VBO size up to 8 to see the 3 points and up to 10 to see the right colors.
A point always appear at (0,0) but it is not in my tables. This lead to wrong geos.

Here is a patch that reproduces the problem.

--- START ----

N canvas 787 372 1084 672 10;

X msg 792 483 draw line;

X msg 607 287 position XYZ , color color;

X obj 580 261 t a b;

X obj 580 36 gemhead;

X obj 791 456 loadbang;

X obj 208 226 loadbang;

X obj 383 402 table XYZ 9;

X obj 382 378 table color 12;

X msg 222 292 ; color const 1;

X msg 171 348 1 , 1 , 0 , -1 , 1 , 0 , 0.2 , 0.5 , 0;

X obj 171 314 t b b;

X obj 171 381 t a b;

X obj 201 416 f;

X obj 231 415 + 1;

X obj 171 446 tabwrite XYZ;

X msg 216 377 0;

X msg 695 365 resize 3;

X msg 696 428 resize $1;

X floatatom 696 409 5 0 0 0 - - -, f 5;

X obj 579 575 gemvertexbuffer 3;

X text 728 409 increase VBO size to display all points;

X obj 394 189 gemwin;

X msg 411 139 destroy;

X msg 394 108 color 0 0 1 , create , 1;

X connect 0 0 19 0;

X connect 1 0 19 0;

X connect 2 0 19 0;

X connect 2 1 1 0;

X connect 3 0 2 0;

X connect 4 0 0 0;

X connect 5 0 8 0;

X connect 5 0 10 0;

X connect 9 0 11 0;

X connect 10 0 9 0;

X connect 10 1 15 0;

X connect 11 0 14 0;

X connect 11 1 12 0;

X connect 12 0 13 0;

X connect 12 0 14 1;

X connect 13 0 12 1;

X connect 15 0 12 1;

X connect 16 0 19 0;

X connect 17 0 19 0;

X connect 18 0 17 0;

X connect 22 0 21 0;

X connect 23 0 21 0;

--- END ---

MediaFoundation plugins on w32

Like Quicktime on Mac OS, DirectShow seems to be deprecated on Windows (starting with Vista I guess).
Like AVFoundation on Mac OS, there is MediaFoundation on Windows to work with media (and replace DirectShow).

So I guess it's time to build some MediaFoundation plugin for Windows...

videoVLC plugin crash at loading

with a fresh build from today, the videoVLC plugin crashes Pd on startup on Ubuntu 14.04 64bit with this backtrace :

Program received signal SIGSEGV, Segmentation fault.
gem::plugins::videoVLC::resize (this=this@entry=0x857040, 
    width=width@entry=64, height=height@entry=64, format=<optimized out>, 
    format@entry=6408) at videoVLC.cpp:342
342     delete m_convertImg;
(gdb) thread apply all bt

Thread 2 (Thread 0x7fffe20a0700 (LWP 20763)):
#0  0x00007ffff6ebb03d in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007fffe41a7248 in ?? () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#2  0x00007ffff739f182 in start_thread (arg=0x7fffe20a0700)
    at pthread_create.c:312
#3  0x00007ffff6ec838d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 1 (Thread 0x7ffff7fbb740 (LWP 20754)):
#0  gem::plugins::videoVLC::resize (this=this@entry=0x857040, 
    width=width@entry=64, height=height@entry=64, format=<optimized out>, 
    format@entry=6408) at videoVLC.cpp:342
#1  0x00007fffe27d6208 in gem::plugins::videoVLC::videoVLC (this=0x857040)
    at videoVLC.cpp:65
#2  0x00007fffe27d62db in gem::PluginFactoryRegistrar::allocator<gem::plugins::videoVLC, gem::plugins::video> () at ../../src/plugins/PluginFactoryTimple.h:134
#3  0x00007ffff3e35faf in doGetInstance (id=..., this=<optimized out>)
    at ../../src/plugins/PluginFactoryTimple.h:70
#4  getInstance (id=...) at ../../src/plugins/PluginFactoryTimple.h:96
#5  addPlugin (ID=..., 
    available=<error reading variable: access outside bounds of object referenced via synthetic pointer>, this=0x8d9520) at video.cpp:81
#6  gem::plugins::video::getInstance () at video.cpp:112
#7  0x00007ffff3df9f15 in gem::plugins::init () at PluginFactory.cpp:175
#8  0x00000000004889ac in sys_do_load_lib ()
#9  0x0000000000488d28 in sys_load_lib ()
#10 0x0000000000481083 in glob_initfromgui ()
#11 0x000000000046fb68 in pd_typedmess ()
#12 0x00000000004794cc in binbuf_eval ()
#13 0x0000000000483e7c in socketreceiver_read ()
#14 0x00000000004831fd in sys_domicrosleep.constprop ()
#15 0x000000000047fb40 in m_mainloop ()
#16 0x00007ffff6deeec5 in __libc_start_main (main=0x411e10 <main>, argc=5, 
    argv=0x7fffffffdee8, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffded8) at libc-start.c:287
#17 0x0000000000411e3e in _start ()

multipointer support

it would be great if the mouse-events reported by [gem*window] would have a pointer-ID, so one could actually attach multiple-pointers to a single window (think multitouch)

unicap plugin crashes Pd on rendering

here is a gdb backtrace :
Program received signal SIGSEGV, Segmentation fault.
gem::plugins::videoUNICAP::start (this=0xc29bd0) at videoUNICAP.cpp:394
394 format.size.width = format.sizes[default_size].width;
(gdb) bt
#0 gem::plugins::videoUNICAP::start (this=0xc29bd0) at videoUNICAP.cpp:394
#1 0x00007ffff38b0ccf in GemBase::gem_startstopMess (this=0xc5c8c0, state=1) at GemBase.cpp:105
#2 0x0000000000467a29 in pd_typedmess ()
#3 0x000000000046947a in outlet_anything ()
#4 0x00007ffff3915329 in gemhead::outputRenderOnOff (this=0xc58c10, state=) at gemhead.cpp:251
#5 0x00007ffff3918127 in gemreceive::proxyCallback (p=, s=0x73d770, argc=1, argv=0x7fffffffda10) at gemreceive.cpp:284
#6 0x000000000046795b in pd_typedmess ()
#7 0x00007ffff386a9e4 in GemMan::renderChain (s=0xc145d0, start=) at Manager.cpp:490
#8 0x00007ffff386d82f in GemMan::startRendering () at Manager.cpp:846
#9 0x00000000004692bf in outlet_float ()
#10 0x0000000000472b2b in binbuf_eval ()
#11 0x000000000041d69f in text_click ()
#12 0x000000000044d877 in canvas_doclick ()
#13 0x0000000000467a69 in pd_typedmess ()
#14 0x000000000046795b in pd_typedmess ()
#15 0x00000000004728aa in binbuf_eval ()
#16 0x000000000047c629 in socketreceiver_read ()
#17 0x000000000047b17a in sys_domicrosleep.constprop.3 ()
#18 0x0000000000476731 in m_mainloop ()
#19 0x00007ffff6e0376d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#20 0x0000000000411831 in _start ()

this occurs with an IIDC camera plugged (Sony XCD-V60 FW800).
To reproduce : plug a valid unicap device, open pix_video-help.pd, send [driver unicap( to [pix_video] then create Gem window and start rendering : it crashes.

libunicap version : 0.9.5
pd 0.45-4
git build today from git

W32 build (mingw)

we really want to have proper w32-builds again (preferrably using mingw)

this probably means that new filmDS and videoDS plugins

configure defaults for ENABLE are reversed

GEM_ARG_ENABLE seems to not enable the option by default.
e.g. we have GEM_ARG_ENABLE([multicontext],...) and ./configure --help shows

--disable-multicontext
but really it is not enabled. (we have to manually turn it on by using --enable-multicontext)

expected behaviour:

  • GEM_ARG_ENABLE enables the flag by default

pix_share_read crashes on render()

here is a gdb backtrace :

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff3a6b164 in pix_share_read::render (this=0xb9d4d0, state=0x7fffffffb840) at pix_share_read.cpp:38
38        int csize=pix.image.setCsizeByFormat(h->format);
bt
#0  0x00007ffff3a6b164 in pix_share_read::render (this=0xb9d4d0, state=0x7fffffffb840) at pix_share_read.cpp:38
#1  0x00007ffff38b1dfa in GemBase::gem_renderMess (this=0xb9d4d0, cache=<optimized out>, state=0x7fffffffb840) at GemBase.cpp:154
#2  0x0000000000465c29 in pd_typedmess ()
#3  0x000000000046767a in outlet_anything ()
#4  0x00000000004af713 in trigger_anything ()
#5  0x0000000000465b5b in pd_typedmess ()
#6  0x000000000046767a in outlet_anything ()
#7  0x0000000000465b5b in pd_typedmess ()
#8  0x000000000046767a in outlet_anything ()
#9  0x0000000000465b5b in pd_typedmess ()
#10 0x0000000000465b5b in pd_typedmess ()
#11 0x000000000046767a in outlet_anything ()
#12 0x0000000000465b5b in pd_typedmess ()
#13 0x0000000000465b5b in pd_typedmess ()
#14 0x000000000046767a in outlet_anything ()
#15 0x00007ffff38b1d35 in GemBase::continueRender (this=0xb9b5d0, state=<optimized out>) at GemBase.cpp:167
#16 0x00007ffff38b1e05 in GemBase::gem_renderMess (this=0xb9b5d0, cache=<optimized out>, state=0x7fffffffb840) at GemBase.cpp:155
#17 0x0000000000465c29 in pd_typedmess ()
#18 0x000000000046767a in outlet_anything ()
#19 0x00007ffff38b1d35 in GemBase::continueRender (this=0xb5ee90, state=<optimized out>) at GemBase.cpp:167
#20 0x00007ffff38b1e05 in GemBase::gem_renderMess (this=0xb5ee90, cache=<optimized out>, state=0x7fffffffb840) at GemBase.cpp:155
#21 0x0000000000465c29 in pd_typedmess ()
#22 0x000000000046767a in outlet_anything ()
#23 0x00007ffff38b1d35 in GemBase::continueRender (this=0xb5ebe0, state=<optimized out>) at GemBase.cpp:167
#24 0x00007ffff38b1e05 in GemBase::gem_renderMess (this=0xb5ebe0, cache=<optimized out>, state=0x7fffffffb840) at GemBase.cpp:155
#25 0x0000000000465c29 in pd_typedmess ()
#26 0x000000000046767a in outlet_anything ()
#27 0x0000000000465b5b in pd_typedmess ()
#28 0x000000000046767a in outlet_anything ()
#29 0x0000000000465b5b in pd_typedmess ()
#30 0x0000000000465b5b in pd_typedmess ()
#31 0x000000000046767a in outlet_anything ()
#32 0x00007ffff3916936 in gemhead::renderGL (this=0xb9c220, state=0x7fffffffb840) at gemhead.cpp:160
#33 0x00007ffff3916c79 in gemhead::bangMess (this=0xb9c220) at gemhead.cpp:185
#34 0x0000000000467399 in outlet_bang ()
#35 0x0000000000467399 in outlet_bang ()
#36 0x0000000000463e39 in bindlist_bang ()
#37 0x0000000000467399 in outlet_bang ()
#38 0x00000000004af6c8 in trigger_anything ()
#39 0x0000000000465b5b in pd_typedmess ()
#40 0x000000000046767a in outlet_anything ()
#41 0x00007ffff38b1d35 in GemBase::continueRender (this=0x7012cb0, state=<optimized out>) at GemBase.cpp:167
#42 0x00007ffff38b1e05 in GemBase::gem_renderMess (this=0x7012cb0, cache=<optimized out>, state=0x7fffffffc200) at GemBase.cpp:155
#43 0x0000000000465c29 in pd_typedmess ()
#44 0x000000000046767a in outlet_anything ()
#45 0x00007ffff38b1d35 in GemBase::continueRender (this=0x7013aa0, state=<optimized out>) at GemBase.cpp:167
#46 0x00007ffff38b1e05 in GemBase::gem_renderMess (this=0x7013aa0, cache=<optimized out>, state=0x7fffffffc200) at GemBase.cpp:155
#47 0x0000000000465c29 in pd_typedmess ()
#48 0x000000000046767a in outlet_anything ()
#49 0x00007ffff38b1d35 in GemBase::continueRender (this=0x7013c20, state=<optimized out>) at GemBase.cpp:167
#50 0x00007ffff38b1e05 in GemBase::gem_renderMess (this=0x7013c20, cache=<optimized out>, state=0x7fffffffc200) at GemBase.cpp:155
#51 0x0000000000465c29 in pd_typedmess ()
#52 0x000000000046767a in outlet_anything ()
#53 0x00007ffff38b1d35 in GemBase::continueRender (this=0x7013e70, state=<optimized out>) at GemBase.cpp:167
#54 0x00007ffff38b1e05 in GemBase::gem_renderMess (this=0x7013e70, cache=<optimized out>, state=0x7fffffffc200) at GemBase.cpp:155
#55 0x0000000000465c29 in pd_typedmess ()
#56 0x000000000046767a in outlet_anything ()
#57 0x00007ffff38b1d35 in GemBase::continueRender (this=0x70140c0, state=<optimized out>) at GemBase.cpp:167
#58 0x00007ffff38b1e05 in GemBase::gem_renderMess (this=0x70140c0, cache=<optimized out>, state=0x7fffffffc200) at GemBase.cpp:155
#59 0x0000000000465c29 in pd_typedmess ()
#60 0x000000000046767a in outlet_anything ()
#61 0x00007ffff38b1d35 in GemBase::continueRender (this=0x7012470, state=<optimized out>) at GemBase.cpp:167
#62 0x00007ffff38b1e05 in GemBase::gem_renderMess (this=0x7012470, cache=<optimized out>, state=0x7fffffffc200) at GemBase.cpp:155
#63 0x0000000000465c29 in pd_typedmess ()
#64 0x000000000046767a in outlet_anything ()
#65 0x00007ffff38b1d35 in GemBase::continueRender (this=0x7012fd0, state=<optimized out>) at GemBase.cpp:167
#66 0x00007ffff38b1e05 in GemBase::gem_renderMess (this=0x7012fd0, cache=<optimized out>, state=0x7fffffffc200) at GemBase.cpp:155
#67 0x0000000000465c29 in pd_typedmess ()
#68 0x000000000046767a in outlet_anything ()
#69 0x00007ffff3916936 in gemhead::renderGL (this=0x70120d0, state=0x7fffffffc200) at gemhead.cpp:160
#70 0x00007ffff3916c79 in gemhead::bangMess (this=0x70120d0) at gemhead.cpp:185
#71 0x0000000000467399 in outlet_bang ()
#72 0x0000000000467399 in outlet_bang ()
#73 0x0000000000467399 in outlet_bang ()
#74 0x00000000004af6c8 in trigger_anything ()
#75 0x0000000000465b5b in pd_typedmess ()
#76 0x000000000046767a in outlet_anything ()
#77 0x0000000000465b5b in pd_typedmess ()
#78 0x0000000000465b5b in pd_typedmess ()
#79 0x000000000046767a in outlet_anything ()
#80 0x00000000004af713 in trigger_anything ()
#81 0x0000000000465b5b in pd_typedmess ()
#82 0x000000000046767a in outlet_anything ()
#83 0x0000000000465b5b in pd_typedmess ()
#84 0x000000000046767a in outlet_anything ()
#85 0x00000000004af713 in trigger_anything ()
#86 0x0000000000465b5b in pd_typedmess ()
#87 0x000000000046767a in outlet_anything ()
#88 0x0000000000465b5b in pd_typedmess ()
#89 0x0000000000465b5b in pd_typedmess ()
#90 0x000000000046767a in outlet_anything ()
#91 0x00007fffdd8301ad in routeOSC_doanything (x=0x7998670, s=0xca5bd0, argc=0, argv=0x7887980) at routeOSC.c:380
#92 0x0000000000465b5b in pd_typedmess ()
#93 0x000000000046767a in outlet_anything ()
#94 0x00007fffda735d2f in unpackOSC_list (x=0x7887930, s=<optimized out>, argc=<optimized out>, argv=<optimized out>) at unpackOSC.c:277
#95 0x00000000004675ea in outlet_list ()
#96 0x00007fffd9d212aa in iemnet__receiver_tick (x=0x7875fd0) at iemnet_receiver.c:148
#97 0x00007fffd9d21c7d in pollfun (z=<optimized out>, fd=<optimized out>) at iemnet_notify.c:126
#98 0x00000000004792ea in sys_domicrosleep.constprop.3 ()
#99 0x000000000047b0ea in sys_pollgui ()
#100 0x000000000047477a in m_mainloop ()
#101 0x00007ffff6e0476d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#102 0x00000000004114d1 in _start ()
(gdb) 

is it possible that shm_addr is invalid but not NULL ?
Could a call of shmat(shm_id,NULL,0666); at each render cycle fix this ?
Does it make sense ? Is it efficienet ?
I'll give it a try (but double check this time before sending a pull request :-) )

A

building : freetype2 include path not added on Mac OS X 10.9

On Mac OS 10.9.4, when configuring with :

./configure --enable-multicontext --enable-fat-binary=i386`

I got this at make time :

/usr/local/Cellar/ftgl/2.1.3-rc5/include/FTGL/ftgl.h:32:10: fatal error: 'ft2build.h' file not found

I noticed that pkg-config --cflags ftgl returns :

-I/usr/local/Cellar/ftgl/2.1.3-rc5/include -I/usr/local/Cellar/ftgl/2.1.3-rc5/include/FTGL 

while on my Ubuntu machine it includes the freetype2 header path :

-I/usr/include/FTGL -I/usr/include/freetype2  

I've installed ftgl through brew Formula.
Do we have to find those headers manually, or does this belong to brew team to provide a good .pc file ?

The complete make log is here :
https://gist.github.com/avilleret/fe01b9c9d9a90d88b757

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.