developing a port type issue

Hi, it’s the first time i develop a custom port type so probably I’m missing something.
I defined a “TimeCodedImage” port type that is simply a struct like:

typedef struct
    VuoImage timecodedimage;
    VuoTime timecodeoftheimage;
} CremTimecodeImage;

and then I implemented some simple node that treat this, like SetTimecodedImage , JoinTimecodeAndImage , GetImageFromTimecodedImage, GetTimecodeFromTimecodedImage, that do these quite intuitive stuff. I then packed everything in a .vuonode file and put in my Modules folder. Everything works, but when i try to connect the output of SetTimecodedImage node to the input of an Enqueue node, it simply doesn’t connect.

I’m probably missing some step so I’d love some tips to be able to work with my new port type.

Attached you can find the code of nodes and types.

2021-06-11 10_53_14.gif (6.14 KB)

1 Like

I just discovered “frame” port type, “make video frame” node and all the others that makes my job absolutely useless as it’s already implemented in Vuo.
But I’d like anyway to understand my mistake, to be able to deal with that in the future.  

1 Like

Basically, the missing piece is that you need to implement the VuoList_CremTimecodeImage data type, in addition to CremTimecodeImage. For the built-in types, we generate the VuoList_* types using a script. You can either run that script or do the equivalent with a search-and-replace in VuoList.h and (This may change when we implement iteration and lists of lists.)

Here’s an example: However, I ran into a different problem trying to get this to work, which I think is a bug in Vuo rather than the example code. So the example is not particularly useful until we fix that bug. But if you do want to take a look at it…

  • Unzip the example.
  • In Terminal:
    • cd to the unzipped folder.
    • mkdir build
    • cd build
    • cmake ..
    • make
  • The cremaschi.Timecode.JoinTimecodeAndImage node class should now show up in Vuo.
1 Like