cid_type

Asked by regulararmy on 2013-06-06

Hello Didier,
          As for the codes of rohc-1.5.1, in the function rohc_alloc_compressor(...), you make the comp->medium.cid_type = ROHC_SMALL_CID, the max_cid = 15. however, if the max_cid > 15, can I make the comp->medium.cid_type = ROHC_LARGE_CID, does the function rohc_alloc_compressor(...) support the changing? Thanks.

Regards
chenxisheng

Question information

Language:
English Edit question
Status:
Solved
For:
rohc Edit question
Assignee:
No assignee Edit question
Solved by:
Didier Barvaux
Solved:
2013-06-26
Last query:
2013-06-26
Last reply:
2013-06-25

This question was reopened

Hello,

Please don't mess with the library code. There are dedicated functions in the library API to perform such actions:
 - rohc_c_set_large_cid() [1]
 - rohc_c_set_max_cid() [2]

The library API is quite small and well documented. Please _read_ the API documentation:
 - common parts [3],
 - compression part [4],
 - decompression part [5].

Regards,
Didier

[1] http://rohc-lib.org/doc/rohc-doc-1.5.1/group__rohc__comp.html#gac1eac04c7b875b34be20bc0aaeb627e5
[2] http://rohc-lib.org/doc/rohc-doc-1.5.1/group__rohc__comp.html#ga8e2d03b4076c9b9bfdd8ba859e560047
[3] http://rohc-lib.org/doc/rohc-doc-1.5.1/group__rohc__common.html
[4] http://rohc-lib.org/doc/rohc-doc-1.5.1/group__rohc__comp.html
[5] http://rohc-lib.org/doc/rohc-doc-1.5.1/group__rohc__decomp.html

regulararmy (regulararmy) said : #2

Thanks Didier Barvaux, that solved my question.

regulararmy (regulararmy) said : #3

As for what we said above, in the function rohc_alloc_compressor(...), the comp->medium.cid_type = ROHC_SMALL_CID , it is set to the constant value. so, if I want to creat a compressor for ROHC_LARGE_CID , how can I do, I should call the rohc_alloc_compressor(...) firstly,then call the rohc_c_set_large_cid() and rohc_c_set_max_cid() ? PS: in my production, the compressor entity medium cid_type is decided by the higher layer.

Thanks

Yes, you correctly understood how the API works.

Regards,
Didier

regulararmy (regulararmy) said : #5

If a compressor use one kind of cid type and max cid value, the associated decompressor in the same side should use the same cid type and max cid ?

No, they can be different.

Regards,
Didier

regulararmy (regulararmy) said : #7

In the initialization of system, when creating a decompressor,How can I decide the cid-type and max cid the decompressor should use?

Hello,

> In the initialization of system, when creating a decompressor,How can I
> decide the cid-type and max cid the decompressor should use?

As stated previously, read the API documentation please. The decompressor API contains functions for that.

Regards,
Didier

regulararmy (regulararmy) said : #9

Thanks Didier Barvaux, that solved my question.