mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for bug #194, use play fd poll, create the singleton poll
This commit is contained in:
parent
efc85ed6df
commit
133cc62b51
6 changed files with 182 additions and 1 deletions
|
@ -48,6 +48,7 @@ using namespace std;
|
|||
#include <srs_app_utility.hpp>
|
||||
#include <srs_protocol_msg_array.hpp>
|
||||
#include <srs_protocol_amf0.hpp>
|
||||
#include <srs_app_poll.hpp>
|
||||
|
||||
// when stream is busy, for example, streaming is already
|
||||
// publishing, when a new client to request to publish,
|
||||
|
@ -525,6 +526,11 @@ int SrsRtmpConn::playing(SrsSource* source)
|
|||
bool user_specified_duration_to_stop = (req->duration > 0);
|
||||
int64_t starttime = -1;
|
||||
|
||||
SrsPollFD poll;
|
||||
if ((ret = poll.initialize(stfd)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
// collect elapse for pithy print.
|
||||
pithy_print.elapse();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue