mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Revert "for bug #241, merge big chunks for publish, no use."
This reverts commit 6b57597718
.
This commit is contained in:
parent
6b57597718
commit
565f29ed6c
10 changed files with 21 additions and 90 deletions
|
@ -42,16 +42,7 @@ public:
|
|||
virtual ~ISrsBufferReader();
|
||||
// for protocol/amf0/msg-codec
|
||||
public:
|
||||
/**
|
||||
* read some bytes of data.
|
||||
* @param nread, the actually read size, NULL to ignore.
|
||||
*/
|
||||
virtual int read(void* buf, size_t size, ssize_t* nread) = 0;
|
||||
/**
|
||||
* read specified size bytes of data
|
||||
* @param nread, the actually read size, NULL to ignore.
|
||||
*/
|
||||
virtual int read_fully(void* buf, size_t size, ssize_t* nread) = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -62,15 +53,6 @@ class SrsBuffer
|
|||
{
|
||||
private:
|
||||
std::vector<char> data;
|
||||
/**
|
||||
* notice the protocol stack to merge chunks to big buffer.
|
||||
* for example, the buffer is 64KB=512kb, it's 1s buffer for 500kbps video stream.
|
||||
* so we can use read_fullly(64KB) to merge all chunks in 1s.
|
||||
* @see https://github.com/winlinvip/simple-rtmp-server/issues/241
|
||||
*/
|
||||
bool merge_chunks_in_big_buffer;
|
||||
// the socket recv buffer.
|
||||
char* buffer;
|
||||
public:
|
||||
SrsBuffer();
|
||||
virtual ~SrsBuffer();
|
||||
|
@ -107,14 +89,6 @@ public:
|
|||
* @remark, we actually maybe read more than required_size, maybe 4k for example.
|
||||
*/
|
||||
virtual int grow(ISrsBufferReader* reader, int required_size);
|
||||
public:
|
||||
/**
|
||||
* notice the protocol stack to merge chunks to big buffer.
|
||||
* for example, the buffer is 64KB=512kb, it's 1s buffer for 500kbps video stream.
|
||||
* so we can use read_fullly(64KB) to merge all chunks in 1s.
|
||||
* @see https://github.com/winlinvip/simple-rtmp-server/issues/241
|
||||
*/
|
||||
virtual void set_merge_chunks(bool v);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue