1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Improve test coverage for kernel fast stream.

This commit is contained in:
winlin 2019-12-20 18:56:53 +08:00
parent da7e76c96a
commit ae785eda8d
3 changed files with 78 additions and 20 deletions

View file

@ -84,7 +84,8 @@ private:
// the size of buffer.
int nb_buffer;
public:
SrsFastStream();
// If buffer is 0, use default size.
SrsFastStream(int size=0);
virtual ~SrsFastStream();
public:
/**
@ -128,7 +129,7 @@ public:
virtual void skip(int size);
public:
/**
* grow buffer to the required size, loop to read from skt to fill.
* grow buffer to atleast required size, loop to read from skt to fill.
* @param reader, read more bytes from reader to fill the buffer to required size.
* @param required_size, loop to fill to ensure buffer size to required.
* @return an int error code, error if required_size negative.