← Back to team overview

rohc team mailing list archive

Re: [Question #273309]: Feedback Send questions

 

Question #273309 on rohc changed:
https://answers.launchpad.net/rohc/+question/273309

    Status: Open => Answered

Didier Barvaux proposed the following answer:
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

-- 
You received this question notification because your team ROHC Team is
an answer contact for rohc.