mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for bug #241, calc the small and sleep for merged read.
This commit is contained in:
parent
aee00877df
commit
850946bb13
9 changed files with 99 additions and 29 deletions
|
@ -140,6 +140,11 @@ private:
|
|||
SrsRtmpServer* rtmp;
|
||||
// the msgs already got.
|
||||
int64_t _nb_msgs;
|
||||
// for mr(merged read),
|
||||
// @see https://github.com/winlinvip/simple-rtmp-server/issues/241
|
||||
int mr_fd;
|
||||
int mr_small_bytes;
|
||||
int mr_sleep_ms;
|
||||
// the recv thread error code.
|
||||
int recv_error_code;
|
||||
SrsRtmpConn* _conn;
|
||||
|
@ -151,7 +156,7 @@ private:
|
|||
// @see https://github.com/winlinvip/simple-rtmp-server/issues/244
|
||||
st_cond_t error;
|
||||
public:
|
||||
SrsPublishRecvThread(SrsRtmpServer* rtmp_sdk, int timeout_ms,
|
||||
SrsPublishRecvThread(SrsRtmpServer* rtmp_sdk, int fd, int timeout_ms,
|
||||
SrsRtmpConn* conn, SrsSource* source, bool is_fmle, bool is_edge);
|
||||
virtual ~SrsPublishRecvThread();
|
||||
public:
|
||||
|
@ -173,7 +178,8 @@ public:
|
|||
virtual void on_recv_error(int ret);
|
||||
// interface IMergeReadHandler
|
||||
public:
|
||||
virtual void on_read(int nb_buffer, ssize_t nread);
|
||||
virtual void on_read(ssize_t nread);
|
||||
virtual void on_buffer_change(int nb_buffer);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue