Two jit.matrixset questions?

Oct 7, 2006 at 6:23pm

Two jit.matrixset questions?

Hello,

I’m a Jitter beginner trying to use a jit.matrix.set as a recordbuffer for my Isight camera. Basicaly I wan’t to record up to 10 seconds to memory and then play around with it.

My first problem is that I would like to dynamicaly allocate how many frames the matrixset uses (I will have several of these buffers and would like to conserve memory), but I can’t get it to work. I’ve tried to send a matrixcount message before every increase in index, but it just slows down my machine to a crawl and doesn’t record anything except black frames. I also tried to start at ten frames and increase matrixcount from there, but the result is the same. Of course everything works fine if I predefine matrixcount.

Second problem is that I would like to have a mode where the buffer always keeps the ten previous seconds from a live feed so I can srub in it, but I have no idea how to acomplish this since the write and read methods both uses the index message.

Any suggestions would be very appriciated.

tia

#28023
Oct 7, 2006 at 7:35pm

Dynamically allocating memory of this magnitude is not a good idea.
While you may have good intentions in trying to conserve memory, your
machine is going to hate you as you have already noticed. Machines
don’t like having to constantly make drastic changes in memory
allocation. It’s much better to just set a limit and allocate that
much.

wes

On 10/7/06, Adam Wittsell wrote:
>
> Hello,
>
> I’m a Jitter beginner trying to use a jit.matrix.set as a recordbuffer for my Isight camera. Basicaly I wan’t to record up to 10 seconds to memory and then play around with it.
>
> My first problem is that I would like to dynamicaly allocate how many frames the matrixset uses (I will have several of these buffers and would like to conserve memory), but I can’t get it to work. I’ve tried to send a matrixcount message before every increase in index, but it just slows down my machine to a crawl and doesn’t record anything except black frames. I also tried to start at ten frames and increase matrixcount from there, but the result is the same. Of course everything works fine if I predefine matrixcount.
>
> Second problem is that I would like to have a mode where the buffer always keeps the ten previous seconds from a live feed so I can srub in it, but I have no idea how to acomplish this since the write and read methods both uses the index message.
>
> Any suggestions would be very appriciated.
>
> tia
>
>
> –
> Adam Wittsell
> AVSL
>

#85620
Oct 10, 2006 at 1:21am

check out the xray.jit.3dbuffer object at maxobjects.com. its pretty much designed for just this task…

edit: doh.. thats ^^his^^ object..

#85621
Oct 10, 2006 at 11:25am

Thanks a lot! Just what I was looking for.

#85622

You must be logged in to reply to this topic.