From 4d6d5b216f86e976322fb4fed800c756fdef4315 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 18 Sep 2012 15:49:07 -0700 Subject: created hooks for input buffer allocator --- include/gnuradio/block.hpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/gnuradio/block.hpp b/include/gnuradio/block.hpp index ae09149..25cf77c 100644 --- a/include/gnuradio/block.hpp +++ b/include/gnuradio/block.hpp @@ -243,7 +243,24 @@ struct GRAS_API Block : Element const size_t recommend_length ); - //TODO overload for allocate output buffer(index) + /*! + * The input buffer allocator method. + * This method is special and very different from allocate output buffers. + * Typically, blocks do not have control of their input buffers. + * When overloaded, an upstream block will ask this block + * to allocate its output buffers. This way, this block will get + * input buffers which were actually allocated by this method. + * + * \param which_input the input port index number + * \param token the token for the buffer's returner + * \param recommend_length the schedulers recommended length in bytes + * \return the token used for the buffer allocation (may be the same) + */ + virtual SBufferToken input_buffer_allocator( + const size_t which_input, + const SBufferToken &token, + const size_t recommend_length + ); }; -- cgit