mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
Bridger: Fix build fail if disable rtc and ffmpeg-fit
This commit is contained in:
parent
3d225973ef
commit
8a30cc86d9
3 changed files with 4 additions and 2 deletions
|
@ -197,7 +197,7 @@ srs_error_t SrsAudioTranscoder::init_enc(SrsAudioCodecId dst_codec, int dst_chan
|
||||||
enc_->channel_layout = av_get_default_channel_layout(dst_channels);
|
enc_->channel_layout = av_get_default_channel_layout(dst_channels);
|
||||||
enc_->bit_rate = dst_bit_rate;
|
enc_->bit_rate = dst_bit_rate;
|
||||||
enc_->sample_fmt = codec->sample_fmts[0];
|
enc_->sample_fmt = codec->sample_fmts[0];
|
||||||
enc_->time_base = {1, 1000};
|
enc_->time_base.num = 1; enc_->time_base.den = 1000; // {1, 1000}
|
||||||
if (dst_codec == SrsAudioCodecIdOpus) {
|
if (dst_codec == SrsAudioCodecIdOpus) {
|
||||||
//TODO: for more level setting
|
//TODO: for more level setting
|
||||||
enc_->compression_level = 1;
|
enc_->compression_level = 1;
|
||||||
|
|
|
@ -999,6 +999,7 @@ srs_error_t SrsRtcPublishStream::initialize(SrsRequest* r, SrsRtcStreamDescripti
|
||||||
source->set_publish_stream(this);
|
source->set_publish_stream(this);
|
||||||
|
|
||||||
// Bridge to rtmp
|
// Bridge to rtmp
|
||||||
|
#if defined(SRS_RTC) && defined(SRS_FFMPEG_FIT)
|
||||||
bool rtc_to_rtmp = _srs_config->get_rtc_to_rtmp(req->vhost);
|
bool rtc_to_rtmp = _srs_config->get_rtc_to_rtmp(req->vhost);
|
||||||
if (rtc_to_rtmp) {
|
if (rtc_to_rtmp) {
|
||||||
SrsSource *rtmp = NULL;
|
SrsSource *rtmp = NULL;
|
||||||
|
@ -1019,6 +1020,7 @@ srs_error_t SrsRtcPublishStream::initialize(SrsRequest* r, SrsRtcStreamDescripti
|
||||||
|
|
||||||
source->set_bridger(bridger);
|
source->set_bridger(bridger);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -983,7 +983,7 @@ srs_error_t SrsRtmpConn::acquire_publish(SrsSource* source)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bridge to RTC streaming.
|
// Bridge to RTC streaming.
|
||||||
#ifdef SRS_RTC
|
#if defined(SRS_RTC) && defined(SRS_FFMPEG_FIT)
|
||||||
if (rtc) {
|
if (rtc) {
|
||||||
SrsRtcFromRtmpBridger *bridger = new SrsRtcFromRtmpBridger(rtc);
|
SrsRtcFromRtmpBridger *bridger = new SrsRtcFromRtmpBridger(rtc);
|
||||||
if ((err = bridger->initialize(req)) != srs_success) {
|
if ((err = bridger->initialize(req)) != srs_success) {
|
||||||
|
|
Loading…
Reference in a new issue