[Top][All Lists]

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

Re: [Linphone-developers] Using Mediastreamer2 filters in closed loop

From: Felix TOTIR
Subject: Re: [Linphone-developers] Using Mediastreamer2 filters in closed loop
Date: Fri, 10 Jun 2011 19:34:30 +0200

Hello again,

 For the time being, I used a workaround.

 Actually, I encountered this as part of the following problem:

 - encapsulate a stream of Mediastreamer2 filters into a structure exposing the same interface as a regular Mediastreamer2 filter.

 The above will allow building hierarchical architectures (starting with elementary blocks, then encapsulating them into more complex structure).

 For the time being, I was not successful in that attempt. The workaround that I developed is to encapsulate such a stream into a structure (MSCapsule) exposing *two* filters: one for the inputs (of the stream), the other one for the outputs (of the stream).

 Then, methods of MSCapsule will subsequently call methods associated to filters in the stream.

 The closed loop need arose as an attempt to combine both MSCapsule.inputs (c_inputs=3) and MSCapsule.outputs (c_outputs=1) filters into one:

 1. a new filter, let's say FILTER (of MSFilter type) is created, with c_inputs+c_outputs inputs and with same number of outputs.
 2. first c_inputs of FILTER are directly transferred (pass-through) to the c_inputs of the MSCapsule.inputs
 3. the c_outputs of the MSCapsule.inputs will be linked to the the last c_outputs inputs of FILTER
 4. last c_outputs of FILTER will be directly transferred (pass-through) to its outputs

 In theory, this should allow exposing only the FILTER filter to access the stream behind. It will transfer the inputs and the outputs. However, in practice, this seem to break when step 4 above is performed. For me, this results in that only the *first* input of FILTER is no NULL, although I previously linked them (and I cannot explain that behavior).

 I am not very fond of that workaround. However, it is the best solution that I (was trying to) found to this date. It is a better way to encapsulate Mediastreamer2 streams into another filter?



On Fri, Jun 10, 2011 at 5:59 PM, Simon Morlat <address@hidden> wrote:

Normaly loops are supported.
However for the first tick the filter that has the two inputs will get nothing on the loooped one.
Then when further filters are executed, this input should be filled.
So during next ticks the filter that has the two inputs will get something to read on both inputs.

You can send a log so that we can investigate.


reply via email to

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