linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Inqueue - Outqueue filter


From: Simon Morlat
Subject: Re: [Linphone-developers] Inqueue - Outqueue filter
Date: Tue, 17 Aug 2010 18:00:14 +0200

Hi,

Interesting case:
You are leaking im. You should free it with freemsg() after it is
copied. Since im possibly comes from the V4L2 filter that is sending its
own mmap'd buffers within the mblk_t, by missing to free im, the
refcounts of mblk_t do not decrement to 1, thus V4L2 stops sending
frames because they are restituted. See v4l2.c for details.

Simon

Le samedi 17 juillet 2010 à 00:05 +0530, Raseel Bhagat a écrit :
> Hi, 
> 
> 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.
> 
> Any idea, what I am doing wrong ?
> 
> --
> Raseel
> _______________________________________________
> Linphone-developers mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/linphone-developers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]