整理webrtc相关代码命名空间

This commit is contained in:
ziyue
2022-09-18 21:03:05 +08:00
parent 15affeff1d
commit 0b355759de
22 changed files with 164 additions and 111 deletions

View File

@@ -11,13 +11,14 @@
#include "WebRtcPusher.h"
using namespace std;
using namespace mediakit;
namespace mediakit {
WebRtcPusher::Ptr WebRtcPusher::create(const EventPoller::Ptr &poller,
const RtspMediaSourceImp::Ptr &src,
const std::shared_ptr<void> &ownership,
const MediaInfo &info,
const mediakit::ProtocolOption &option) {
const ProtocolOption &option) {
WebRtcPusher::Ptr ret(new WebRtcPusher(poller, src, ownership, info, option), [](WebRtcPusher *ptr) {
ptr->onDestory();
delete ptr;
@@ -30,7 +31,7 @@ WebRtcPusher::WebRtcPusher(const EventPoller::Ptr &poller,
const RtspMediaSourceImp::Ptr &src,
const std::shared_ptr<void> &ownership,
const MediaInfo &info,
const mediakit::ProtocolOption &option) : WebRtcTransportImp(poller) {
const ProtocolOption &option) : WebRtcTransportImp(poller) {
_media_info = info;
_push_src = src;
_push_src_ownership = ownership;
@@ -142,7 +143,7 @@ void WebRtcPusher::onRtcConfigure(RtcConfigure &configure) const {
configure.audio.direction = configure.video.direction = RtpDirection::recvonly;
}
float WebRtcPusher::getLossRate(MediaSource &sender,mediakit::TrackType type){
float WebRtcPusher::getLossRate(MediaSource &sender,TrackType type){
return WebRtcTransportImp::getLossRate(type);
}
@@ -155,4 +156,6 @@ void WebRtcPusher::OnDtlsTransportClosed(const RTC::DtlsTransport *dtlsTransport
void WebRtcPusher::onRtcpBye(){
_push_src = nullptr;
WebRtcTransportImp::onRtcpBye();
}
}
}// namespace mediakit