mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #251, revert changes, for the cond wait and fast cache queue is no use. 2.0.59
This commit is contained in:
parent
92ecdf088b
commit
e80c8603d4
6 changed files with 24 additions and 234 deletions
|
@ -165,24 +165,6 @@ private:
|
|||
bool paused;
|
||||
// when source id changed, notice all consumers
|
||||
bool should_update_source_id;
|
||||
#ifdef SRS_PERF_QUEUE_COND_WAIT
|
||||
// the cond wait for mw.
|
||||
// @see https://github.com/winlinvip/simple-rtmp-server/issues/251
|
||||
st_cond_t mw_wait;
|
||||
bool mw_waiting;
|
||||
int mw_min_msgs;
|
||||
int mw_duration;
|
||||
#endif
|
||||
#ifdef SRS_PERF_QUEUE_FAST_CACHE
|
||||
// use fast cache for msgs
|
||||
// @see https://github.com/winlinvip/simple-rtmp-server/issues/251
|
||||
SrsMessageArray* mw_cache;
|
||||
// the count of msg in fast cache.
|
||||
int mw_count;
|
||||
// the packet time in fast cache.
|
||||
int64_t mw_first_pkt;
|
||||
int64_t mw_last_pkt;
|
||||
#endif
|
||||
public:
|
||||
SrsConsumer(SrsSource* _source);
|
||||
virtual ~SrsConsumer();
|
||||
|
@ -216,27 +198,11 @@ public:
|
|||
* @param count the count in array, output param.
|
||||
* @max_count the max count to dequeue, must be positive.
|
||||
*/
|
||||
virtual int dump_packets(SrsMessageArray* msgs, int* count);
|
||||
#ifdef SRS_PERF_QUEUE_COND_WAIT
|
||||
/**
|
||||
* wait for messages incomming, atleast nb_msgs and in duration.
|
||||
* @param nb_msgs the messages count to wait.
|
||||
* @param duration the messgae duration to wait.
|
||||
*/
|
||||
virtual void wait(int nb_msgs, int duration);
|
||||
#endif
|
||||
virtual int dump_packets(SrsMessageArray* msgs, int& count);
|
||||
/**
|
||||
* when client send the pause message.
|
||||
*/
|
||||
virtual int on_play_client_pause(bool is_pause);
|
||||
private:
|
||||
#ifdef SRS_PERF_QUEUE_FAST_CACHE
|
||||
/**
|
||||
* dumps the queue to fast cache,
|
||||
* when fast cache is clear or queue is overflow.
|
||||
*/
|
||||
virtual int dumps_queue_to_fast_cache();
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue