I would like to ask about how to modify data inside a block that work with blobs. I've finished a block (let name as "BLOCK_1"), which post message downstream. In particular, it posts 2 blobs with metadata and data. The idea is the following:
blob_1: Metadata that I don't want to modify blob_2: Data I want to modify
I'm following the examples blob_to_stream, stream_to_blob and socket_to_blob. However, I am not sure how can I manipulate the data (ie. blob_2) in my BLOCK_2.
For example, I thought something like this in BLOCK_2:
int work( const InputItems &input_items, const OutputItems &output_items )
{ //Loop until a blob is received
while (_offset==0){ //start of while until a blob is received _msg=this->pop_msg_queue(); //Read the blob
//How to manipulate data here from _msg? //Or can I use just input_items in the work function?