Memfile example buffering improvement

zhaozj2021-02-11  225

In use, many people correspond to the default read data size 32768 is very unsatisfactory. It seems that most people are played in the system playing. In fact, this value can be modified .2 N-movies, still It cannot be changed to any size.

In his base class CasyncoutputPin :: Requestallocator function. Parameter IMEMALLOCATOR * PPREFERRED pointed out the size of the buffer 32768 * 6. You can track your value and you know. And the parameter IMEMALLOCATOR ** PPACTUAL is the actual value returned, he defaults It is PPREFERRED. Document is also said that it is best not to modify these things. Of course, you have no problem. You can set it by IMEMALLOCATOR HRESULT SETPROPERTIES. You can see: typedef struct _allocatorproperties {long; long; Long cbprefix;} allocator_properties;

Among them, CBuffers pointed out how many buffer blocks, CBBuffer pointed out the size of the buffer block. Because of some restrictions, the total number of buffers is only the size of 32768 * 6 ... put the cbuffer to the value you want, Modify the corresponding CBuffers. This is done. Ok, your current amount of data should be set by yourself ... Track and see it.

转载请注明原文地址:https://www.9cbs.com/read-4300.html

New Post(0)