I am writing a simple filter which will basically take data from the input queues, copy it to an output queue buffer. I figure this was the best step, before writing a full fledged filter.
It looks something like this when used in the "echo" test application :
MSAlsaRead --> MyFilter --> MSAlsaWrite
The filter's process looks something like this : mblk_t *im, *om; while((im=ms_queue_get(f->inputs[0]))!=NULL){ len = im->b_wptr - im->b_rptr;
om = allocb(len, 0); memcpy(om->b_wptr, im->b_rptr, len); om->b_wptr += len; if (om!=NULL) ms_queue_put(f->outputs[0],om); }
This works perfectly well and we can hear the echo clearly.
It even works with the "ring" application.
Now, I wrote a video graph as follows : MSV4L2Capture --> MSPixConv --> MSSizeConv --> MSTheoraEnc --> MSTheoraDec --> MSVideoOut This shows me a video preview.
I try to slip in my simple filter as follows : MSV4L2Capture --> MSPixConv --> MSSizeConv --> MyFilter --> MSVideoOut
But I just see the first 4 frames, that's about a fraction of a second's video and that's it.... it get's stuck.
Some debugging shows that run_graph() is still looping.