Feedback Send questions

Asked by Mohammad Abyan Abdullah

Hi!!
     I'm trying to use the new library as u told. About feedback issue I'm facing tough time to get all the feedback and send to remote channel properly. Like at old library we could use piggyback and feedback flush to send the feedback to remote. Now at this new library whenever decompressor generates a feedback we must send it to remote at that time or next feedback won't generate giving error Given Feedback Buffer is Not Empty. So at the moment when decompressor is fully active and compressor is less active its hard to get all the feedback and send to remote. Plzz suggest me a way how I can get all the feedback and hold them a buffer and send from the compressor.

Thanks & Regards
Abyan

Question information

Language:
English Edit question
Status:
Solved
For:
rohc Edit question
Assignee:
No assignee Edit question
Solved by:
Mohammad Abyan Abdullah
Solved:
Last query:
Last reply:
Revision history for this message
Didier Barvaux (didier-barvaux) said :
#1

Hello,

The new library API does not handle the feedback internally. This gives more power to the developer. However, it also gives the developer more work. Sorry about that :-/

If I understand correctly, you want to be able to decompress several ROHC packets, collecting some feedback data for the remote compressor at the same time, BUT send all feedback data at once only one of N packets (or maybe when a packet is sent in the reverse direction using piggybacking). Am I right?

I yes, I suggest you to "pull" the rohc_buf that contains the feedback data between 2 decompressions.

1. empty feedback_send
2. prepare packet #1
3. compression of packet #1, receive n1 bytes in feedback_send
4. pull the feedback_send buffer of n1 bytes: rohc_buf_pull(&feedback_send, n1)
5. prepare packet #2
6. compression of packet #2, receive n2 additional bytes in feedback_send
7. pull the feedback_send buffer of n2 bytes: rohc_buf_pull(&feedback_send, n2)
8. prepare packet #3
9. compression of packet #3, receive n3 additional bytes in feedback_send
10. pull the feedback_send buffer of n3 bytes: rohc_buf_pull(&feedback_send, n3)

Now, send the feedback data stored in feedback_send. There are two ways to do it:

a/ Send a dedicated packet on the network:
11. push the feedback_send buffer of n=n1+n2+n3 bytes: rohc_buf_push(&feedback_send, n)
12. send feedback_send over the network directly

b/ Send along with a ROHC packet going in the reverse direction (ie. piggybacking):
11. compress a packet going in the reverse direction and provide the feedback_send
       buffer as the 3rd argument (rohc_packet) of the rohc_compress4() function.
12. once compression is done, the feedback_send buffer points on the beginning of
       the ROHC packet and just after the feedback data, pushing the start offset will
       unhide the feedback data. so, push the feedback_send buffer of n=n1+n2+n3
       bytes: rohc_buf_push(&feedback_send, n)
13. send the feedback_send buffer (with feedback data and ROHC packet aggregated
       together) over the network.

Let me know if I'm unclear. And what is missing in the documentation/tutorials/examples for developers to better understand how the API works.

Regards,
Didier

Revision history for this message
Mohammad Abyan Abdullah (c-admin-v) said :
#2

Hi!!
    It seems to be complex to me.

If I understand correctly, you want to be able to decompress several ROHC packets, collecting some feedback data for the remote compressor at the same time, BUT send all feedback data at once only one of N packets (or maybe when a packet is sent in the reverse direction using piggybacking). Am I right?

Yes, You are rite.

I found a solution that is declare another feedback buffer then rohc_buf_append_buf ()

and then rohc_buf_pull() the new buffer to &rohc_packet at compress4() and send it to remote. I can see its working that way.
Do you think its ok ?

If I want to take each feedback_send buffer to same buffer for next decompress() I see a error "given feedback_send is not empty" So thats why I did used another buffer to collect all next feedbacks.

Regards
Abyan

Revision history for this message
Didier Barvaux (didier-barvaux) said :
#3

Hello Abyan,

> I found a solution that is declare another feedback buffer then rohc_buf_append_buf ()
> and then rohc_buf_pull() the new buffer to &rohc_packet at compress4() and send it to
> remote. I can see its working that way.
> Do you think its ok ?

It is ok only if you rohc_buf_push() the buffer by the length of the feedback data after the call to rohc_compress4() succeeded.

> If I want to take each feedback_send buffer to same buffer for next decompress()
> I see a error "given feedback_send is not empty" So thats why I did used another
> buffer to collect all next feedbacks.

If you get that error, then you probably forgot to "pull" the buffer by the length of the feedback data at steps 4, 7 and 10.

The solution you found works, however it might be a little less performant than the one I propose. Yours performs extra copies of feedback data. Note that it might well change nothing if that data is small and you don't have that much feedback.

Regards,
Didier