linphone-users
[Top][All Lists]
Advanced

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

Re: [Linphone-users] Custom Splitter Filter


From: Chanwit Kaewkasi
Subject: Re: [Linphone-users] Custom Splitter Filter
Date: Fri, 5 Apr 2013 15:44:05 +0700

Thank you, Ghislain !! 
It solved the root of my problem.

Best regards,

-chanwit

--
Chanwit Kaewkasi
linkedin.com/in/chanwit


On Fri, Apr 5, 2013 at 3:39 PM, Ghislain Mary <address@hidden> wrote:
Hi,

This filter already exists in mediastreamer2, this is the tee filter (MS_TEE_ID).

Cheers,
Ghislain


On 5 April 2013 10:33, Chanwit Kaewkasi <address@hidden> wrote:
Hi all,

I am writing a small custom MS filter that is trying to split an input to 2 outputs.

Here it is:

MSFilterDesc ms_splitter_desc={
.id=MS_SPLITTER_ID,
.name="MSSplitter",
.text=N_("Split input to 2 channels"),
.category=MS_FILTER_OTHER,
.ninputs=1,
.noutputs=2,
.process=splitter_process,
.methods=splitter_methods
};

and here's my splitter_process():

static void splitter_process(MSFilter *f){
mblk_t *refm;

while((refm=ms_queue_get(f->inputs[0]))!=NULL){
ms_queue_put(f->outputs[0],refm);
ms_queue_put(f->outputs[1],refm);
}
return;
}

But it's likely to freeze the Linphone. My question is quite simple.
- Can I put "refm" into the output queue twice?
- Or do I need to make a copy of "refm" first?
- If so, which function do I need to properly duplicate the packet and sending 2 copies of it to the different output channel?


Best regards,

-chanwit

--
Chanwit Kaewkasi
linkedin.com/in/chanwit

_______________________________________________
Linphone-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-users



_______________________________________________
Linphone-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-users



reply via email to

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