mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-19 14:52:20 +08:00
实现音频转码功能:
- 启用rtc:// schecma - 增加音频转码码率配置 - aac转码使用原通道数
This commit is contained in:
@@ -1176,10 +1176,10 @@ void push_plugin(Session &sender, const WebRtcArgs &args, const WebRtcPluginMana
|
||||
cb(WebRtcException(SockException(Err_other, err)));
|
||||
return;
|
||||
}
|
||||
|
||||
std::string schema = RTC_SCHEMA;
|
||||
RtspMediaSourceImp::Ptr push_src;
|
||||
std::shared_ptr<void> push_src_ownership;
|
||||
auto src = MediaSource::find(RTSP_SCHEMA, info.vhost, info.app, info.stream);
|
||||
auto src = MediaSource::find(schema, info.vhost, info.app, info.stream);
|
||||
auto push_failed = (bool)src;
|
||||
|
||||
while (src) {
|
||||
@@ -1206,7 +1206,7 @@ void push_plugin(Session &sender, const WebRtcArgs &args, const WebRtcPluginMana
|
||||
}
|
||||
|
||||
if (!push_src) {
|
||||
push_src = std::make_shared<RtspMediaSourceImp>(info);
|
||||
push_src = std::make_shared<RtspMediaSourceImp>(info, schema);
|
||||
push_src_ownership = push_src->getOwnership();
|
||||
push_src->setProtocolOption(option);
|
||||
}
|
||||
@@ -1233,9 +1233,8 @@ void play_plugin(Session &sender, const WebRtcArgs &args, const WebRtcPluginMana
|
||||
cb(WebRtcException(SockException(Err_other, err)));
|
||||
return;
|
||||
}
|
||||
|
||||
// webrtc播放的是rtsp的源
|
||||
info.schema = RTSP_SCHEMA;
|
||||
info.schema = RTC_SCHEMA;
|
||||
MediaSource::findAsync(info, session_ptr, [=](const MediaSource::Ptr &src_in) mutable {
|
||||
auto src = dynamic_pointer_cast<RtspMediaSource>(src_in);
|
||||
if (!src) {
|
||||
|
||||
Reference in New Issue
Block a user