mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix the export project bug. wakeup connection when dispose server.
This commit is contained in:
parent
969ed7b0ae
commit
1f1776a0d8
5 changed files with 65 additions and 17 deletions
|
@ -196,10 +196,28 @@ private:
|
|||
virtual void clear();
|
||||
};
|
||||
|
||||
/**
|
||||
* the wakable used for some object
|
||||
* which is waiting on cond.
|
||||
*/
|
||||
class ISrsWakable
|
||||
{
|
||||
public:
|
||||
ISrsWakable();
|
||||
virtual ~ISrsWakable();
|
||||
public:
|
||||
/**
|
||||
* when the consumer(for player) got msg from recv thread,
|
||||
* it must be processed for maybe it's a close msg, so the cond
|
||||
* wait must be wakeup.
|
||||
*/
|
||||
virtual void wakeup() = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* the consumer for SrsSource, that is a play client.
|
||||
*/
|
||||
class SrsConsumer
|
||||
class SrsConsumer : public ISrsWakable
|
||||
{
|
||||
private:
|
||||
SrsRtmpJitter* jitter;
|
||||
|
@ -257,17 +275,19 @@ public:
|
|||
* @param duration the messgae duration to wait.
|
||||
*/
|
||||
virtual void wait(int nb_msgs, int duration);
|
||||
/**
|
||||
* when the consumer(for player) got msg from recv thread,
|
||||
* it must be processed for maybe it's a close msg, so the cond
|
||||
* wait must be wakeup.
|
||||
*/
|
||||
virtual void wakeup();
|
||||
#endif
|
||||
/**
|
||||
* when client send the pause message.
|
||||
*/
|
||||
virtual int on_play_client_pause(bool is_pause);
|
||||
// ISrsWakable
|
||||
public:
|
||||
/**
|
||||
* when the consumer(for player) got msg from recv thread,
|
||||
* it must be processed for maybe it's a close msg, so the cond
|
||||
* wait must be wakeup.
|
||||
*/
|
||||
virtual void wakeup();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue