[Top][All Lists]

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

Re: [Discuss-gnuradio] Switching flow between two paths.

From: Kevin Reid
Subject: Re: [Discuss-gnuradio] Switching flow between two paths.
Date: Thu, 26 Mar 2015 07:17:35 -0700

On Mar 25, 2015, at 2:15, Marcus Müller <address@hidden> wrote:

> source -+--> custom_block0 ---> encoder0 ---> add -->
>         +--> custom_block1 ---> encoder1 ------^
> you'd need to implement custom_block in python or C++, that would either
> pass through items, just like the block does that comes out of
> gr_modtool add -l python -t sync
> or set the output items to 0. You'd toggle that behavior exactly at the
> sample that you get a tag.

Note that if you don't actually need the switch to happen at a specific point 
in the stream, but you still want the switch to be atomic (guaranteed not to 
drop or repeat any items), the existing multiply_matrix block can do the 
switching in this flowgraph: it would be configured with one input and two 
outputs, and setting the matrix to either [[0, 1]] or [[1, 0]].

(Of course, the disadvantage of either of these strategies is that you're 
paying the CPU cost of both encoders all of the time.)

Kevin Reid                                  <http://switchb.org/kpreid/>

reply via email to

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