[Top][All Lists]

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

[Discuss-gnuradio] What if noutput_itmes is too short?

From: Jeon
Subject: [Discuss-gnuradio] What if noutput_itmes is too short?
Date: Fri, 29 May 2015 11:46:51 +0000

I am trying to remove `preamble` and `start frame delimiter` from a frame and only the payload will be passed to the next block.

While in debugging, `ninput_items` is 7742, and `noutput_items` is 4096, for instance. An offset where the frame starts is 790.

Simple calculation gives me that 7742 - 790 = 6952 samples should be passed to the next block. But output space given is only 4096. Thus, I can only pass 4096 samples and 6952 - 4096 = 2856 samples will be discarded. But, I need them to be passed, too.

Even worse, a stream of samples are coming continuously from a previous block.

Will it be helpful if I have some very long buffer in a block? I don't think it works since `noutput_items` is always smaller than `ninput_items` every time the block runs `general_work()`. In this case, I think the buffer will be overflowed.

The link below is the log that shows

`i`/`ninput_itmes` and `o`/`noutput_items`,

where `i` and `o` are input and output indices. When `ninput_itmes` and `noutput_items` change, it means a new `general_work` is called.

Log (it's quite long...): https://bitbucket.org/snippets/gsongsong/By8x


reply via email to

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