mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
Refine: 优化webrtc sdp处理代码
This commit is contained in:
parent
daa06ffd4f
commit
fb97c2139a
@ -1447,16 +1447,14 @@ void RtcConfigure::RtcTrackConfigure::setDefaultSetting(TrackType type){
|
||||
}
|
||||
}
|
||||
|
||||
void RtcConfigure::setDefaultSetting(string ice_ufrag,
|
||||
string ice_pwd,
|
||||
RtpDirection direction,
|
||||
void RtcConfigure::setDefaultSetting(string ice_ufrag, string ice_pwd, RtpDirection direction,
|
||||
const SdpAttrFingerprint &fingerprint) {
|
||||
video.setDefaultSetting(TrackVideo);
|
||||
audio.setDefaultSetting(TrackAudio);
|
||||
application.setDefaultSetting(TrackApplication);
|
||||
|
||||
video.ice_ufrag = audio.ice_ufrag = application.ice_ufrag = ice_ufrag;
|
||||
video.ice_pwd = audio.ice_pwd = application.ice_pwd = ice_pwd;
|
||||
video.ice_ufrag = audio.ice_ufrag = application.ice_ufrag = std::move(ice_ufrag);
|
||||
video.ice_pwd = audio.ice_pwd = application.ice_pwd = std::move(ice_pwd);
|
||||
video.direction = audio.direction = application.direction = direction;
|
||||
video.fingerprint = audio.fingerprint = application.fingerprint = fingerprint;
|
||||
}
|
||||
@ -1579,7 +1577,7 @@ static RtpDirection matchDirection(RtpDirection offer_direction, RtpDirection su
|
||||
}
|
||||
}
|
||||
|
||||
void RtcConfigure::matchMedia(shared_ptr<RtcSession> &ret, TrackType type, const vector<RtcMedia> &medias, const RtcTrackConfigure &configure){
|
||||
void RtcConfigure::matchMedia(const shared_ptr<RtcSession> &ret, TrackType type, const vector<RtcMedia> &medias, const RtcTrackConfigure &configure){
|
||||
bool check_profile = true;
|
||||
bool check_codec = true;
|
||||
|
||||
|
@ -710,10 +710,7 @@ public:
|
||||
RtcTrackConfigure audio;
|
||||
RtcTrackConfigure application;
|
||||
|
||||
void setDefaultSetting(string ice_ufrag,
|
||||
string ice_pwd,
|
||||
RtpDirection direction,
|
||||
const SdpAttrFingerprint &fingerprint);
|
||||
void setDefaultSetting(string ice_ufrag, string ice_pwd, RtpDirection direction, const SdpAttrFingerprint &fingerprint);
|
||||
void addCandidate(const SdpAttrCandidate &candidate, TrackType type = TrackInvalid);
|
||||
|
||||
shared_ptr<RtcSession> createAnswer(const RtcSession &offer);
|
||||
@ -724,7 +721,7 @@ public:
|
||||
void enableREMB(bool enable = true, TrackType type = TrackInvalid);
|
||||
|
||||
private:
|
||||
void matchMedia(shared_ptr<RtcSession> &ret, TrackType type, const vector<RtcMedia> &medias, const RtcTrackConfigure &configure);
|
||||
void matchMedia(const shared_ptr<RtcSession> &ret, TrackType type, const vector<RtcMedia> &medias, const RtcTrackConfigure &configure);
|
||||
bool onCheckCodecProfile(const RtcCodecPlan &plan, CodecId codec);
|
||||
void onSelectPlan(RtcCodecPlan &plan, CodecId codec);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user