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:
parent
ed338f4c0a
commit
f37ffdf740
6 changed files with 76 additions and 25 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue