cid_type

Asked by regulararmy

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:
Last query:
Last reply:

This question was reopened

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

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

Revision history for this message
regulararmy (regulararmy) said :
#2

Thanks Didier Barvaux, that solved my question.

Revision history for this message
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

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

Yes, you correctly understood how the API works.

Regards,
Didier

Revision history for this message
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 ?

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

No, they can be different.

Regards,
Didier

Revision history for this message
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?

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

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

Revision history for this message
regulararmy (regulararmy) said :
#9

Thanks Didier Barvaux, that solved my question.