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

Refine consumer dumps, extract dumps API

This commit is contained in:
winlin 2020-05-03 07:43:05 +08:00
parent 9906d2e859
commit 20b4984af4
6 changed files with 42 additions and 20 deletions

View file

@ -721,7 +721,6 @@ srs_error_t SrsRtcSenderThread::cycle()
SrsConsumer* consumer = NULL;
SrsAutoFree(SrsConsumer, consumer);
// TODO: FIXME: Dumps the SPS/PPS from gop cache, without other frames.
if ((err = source->create_consumer(NULL, consumer)) != srs_success) {
return srs_error_wrap(err, "rtc create consumer, source url=%s", req->get_stream_url().c_str());
}
@ -733,6 +732,11 @@ srs_error_t SrsRtcSenderThread::cycle()
// messages and drop them if the shared sender queue is full.
consumer->enable_pass_timestamp();
// TODO: FIXME: Dumps the SPS/PPS from gop cache, without other frames.
if ((err = source->consumer_dumps(consumer)) != srs_success) {
return srs_error_wrap(err, "dumps consumer, source url=%s", req->get_stream_url().c_str());
}
realtime = _srs_config->get_realtime_enabled(req->vhost, true);
mw_sleep = _srs_config->get_mw_sleep(req->vhost, true);
mw_msgs = _srs_config->get_mw_msgs(req->vhost, realtime, true);