mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 20:01:56 +00:00
Create isolate pithy printer for each RTC FD
This commit is contained in:
parent
087559813f
commit
216b3bf414
4 changed files with 9 additions and 8 deletions
|
@ -444,7 +444,7 @@ srs_error_t SrsUdpMuxListener::cycle()
|
|||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
SrsPithyPrint* pprint = SrsPithyPrint::create_rtc_recv();
|
||||
SrsPithyPrint* pprint = SrsPithyPrint::create_rtc_recv(srs_netfd_fileno(lfd));
|
||||
SrsAutoFree(SrsPithyPrint, pprint);
|
||||
|
||||
uint64_t nn_msgs = 0;
|
||||
|
|
|
@ -177,14 +177,14 @@ SrsPithyPrint* SrsPithyPrint::create_rtc_play()
|
|||
return new SrsPithyPrint(SRS_CONSTS_STAGE_RTC_PLAY);
|
||||
}
|
||||
|
||||
SrsPithyPrint* SrsPithyPrint::create_rtc_send()
|
||||
SrsPithyPrint* SrsPithyPrint::create_rtc_send(int fd)
|
||||
{
|
||||
return new SrsPithyPrint(SRS_CONSTS_STAGE_RTC_SEND);
|
||||
return new SrsPithyPrint(fd<<16 | SRS_CONSTS_STAGE_RTC_SEND);
|
||||
}
|
||||
|
||||
SrsPithyPrint* SrsPithyPrint::create_rtc_recv()
|
||||
SrsPithyPrint* SrsPithyPrint::create_rtc_recv(int fd)
|
||||
{
|
||||
return new SrsPithyPrint(SRS_CONSTS_STAGE_RTC_RECV);
|
||||
return new SrsPithyPrint(fd<<16 | SRS_CONSTS_STAGE_RTC_RECV);
|
||||
}
|
||||
|
||||
SrsPithyPrint::~SrsPithyPrint()
|
||||
|
|
|
@ -88,8 +88,9 @@ public:
|
|||
static SrsPithyPrint* create_http_stream();
|
||||
static SrsPithyPrint* create_http_stream_cache();
|
||||
static SrsPithyPrint* create_rtc_play();
|
||||
static SrsPithyPrint* create_rtc_send();
|
||||
static SrsPithyPrint* create_rtc_recv();
|
||||
// For RTC sender and receiver, we create printer for each fd.
|
||||
static SrsPithyPrint* create_rtc_send(int fd);
|
||||
static SrsPithyPrint* create_rtc_recv(int fd);
|
||||
virtual ~SrsPithyPrint();
|
||||
private:
|
||||
// Enter the specified stage, return the client id.
|
||||
|
|
|
@ -1439,7 +1439,7 @@ srs_error_t SrsUdpMuxSender::cycle()
|
|||
srs_utime_t time_last = srs_get_system_time();
|
||||
SrsStatistic* stat = SrsStatistic::instance();
|
||||
|
||||
SrsPithyPrint* pprint = SrsPithyPrint::create_rtc_send();
|
||||
SrsPithyPrint* pprint = SrsPithyPrint::create_rtc_send(srs_netfd_fileno(lfd));
|
||||
SrsAutoFree(SrsPithyPrint, pprint);
|
||||
|
||||
while (true) {
|
||||
|
|
Loading…
Reference in a new issue