mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Remove dead code
This commit is contained in:
parent
e446cf466f
commit
431f852e05
5 changed files with 1 additions and 313 deletions
|
@ -473,7 +473,6 @@ SrsRtcFromRtmpBridger::SrsRtcFromRtmpBridger(SrsRtcSource* source)
|
|||
source_ = source;
|
||||
meta = new SrsMetaCache();
|
||||
format = new SrsRtmpFormat();
|
||||
rtc = new SrsRtc();
|
||||
codec = new SrsAudioRecode(kChannel, kSamplerate);
|
||||
discard_aac = false;
|
||||
discard_bframe = false;
|
||||
|
@ -483,7 +482,6 @@ SrsRtcFromRtmpBridger::~SrsRtcFromRtmpBridger()
|
|||
{
|
||||
srs_freep(meta);
|
||||
srs_freep(format);
|
||||
srs_freep(rtc);
|
||||
srs_freep(codec);
|
||||
}
|
||||
|
||||
|
@ -497,10 +495,6 @@ srs_error_t SrsRtcFromRtmpBridger::initialize(SrsRequest* r)
|
|||
return srs_error_wrap(err, "format initialize");
|
||||
}
|
||||
|
||||
if ((err = rtc->initialize(r)) != srs_success) {
|
||||
return srs_error_wrap(err, "rtc initialize");
|
||||
}
|
||||
|
||||
if ((err = codec->initialize()) != srs_success) {
|
||||
return srs_error_wrap(err, "init codec");
|
||||
}
|
||||
|
@ -522,10 +516,6 @@ srs_error_t SrsRtcFromRtmpBridger::on_publish()
|
|||
{
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
if ((err = rtc->on_publish()) != srs_success) {
|
||||
return srs_error_wrap(err, "rtc publish");
|
||||
}
|
||||
|
||||
// TODO: FIXME: Should sync with bridger?
|
||||
if ((err = source_->on_publish()) != srs_success) {
|
||||
return srs_error_wrap(err, "source publish");
|
||||
|
@ -543,8 +533,6 @@ void SrsRtcFromRtmpBridger::on_unpublish()
|
|||
// TODO: FIXME: Should sync with bridger?
|
||||
source_->on_unpublish();
|
||||
|
||||
rtc->on_unpublish();
|
||||
|
||||
// Reset the metadata cache, to make VLC happy when disable/enable stream.
|
||||
// @see https://github.com/ossrs/srs/issues/1630#issuecomment-597979448
|
||||
meta->update_previous_vsh();
|
||||
|
@ -667,14 +655,6 @@ srs_error_t SrsRtcFromRtmpBridger::on_video(SrsSharedPtrMessage* msg)
|
|||
return srs_error_wrap(err, "format consume video");
|
||||
}
|
||||
|
||||
// Parse RTMP message to RTP packets, in FU-A if too large.
|
||||
if ((err = rtc->on_video(msg, format)) != srs_success) {
|
||||
// TODO: We should support more strategies.
|
||||
srs_warn("rtc: ignore video error %s", srs_error_desc(err).c_str());
|
||||
srs_error_reset(err);
|
||||
rtc->on_unpublish();
|
||||
}
|
||||
|
||||
return source_->on_video_imp(msg);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue