1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

For RTC publisher, request keyframe when start playing

This commit is contained in:
winlin 2020-04-30 08:24:15 +08:00
parent ed338f4c0a
commit f37ffdf740
6 changed files with 76 additions and 25 deletions

View file

@ -52,6 +52,7 @@ using namespace std;
#include <srs_protocol_format.hpp>
#ifdef SRS_RTC
#include <srs_app_rtc.hpp>
#include <srs_app_rtc_conn.hpp>
#endif
#define CONST_MAX_JITTER_MS 250
@ -1966,6 +1967,10 @@ SrsSource::SrsSource()
_srs_config->subscribe(this);
atc = false;
#ifdef SRS_RTC
rtc_publisher = NULL;
#endif
}
SrsSource::~SrsSource()
@ -2749,4 +2754,11 @@ SrsMetaCache* SrsSource::cached_meta()
{
return meta;
}
void SrsSource::request_keyframe()
{
if (rtc_publisher) {
rtc_publisher->request_keyframe();
}
}
#endif