mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 10:40:05 +08:00
Merge branch 'master' of github.com:ZLMediaKit/ZLMediaKit
This commit is contained in:
commit
8b3a5dda1c
@ -1737,16 +1737,21 @@ RETRY:
|
|||||||
|
|
||||||
void RtcConfigure::setPlayRtspInfo(const string &sdp){
|
void RtcConfigure::setPlayRtspInfo(const string &sdp){
|
||||||
RtcSession session;
|
RtcSession session;
|
||||||
|
video.direction = RtpDirection::inactive;
|
||||||
|
audio.direction = RtpDirection::inactive;
|
||||||
|
|
||||||
session.loadFrom(sdp);
|
session.loadFrom(sdp);
|
||||||
for (auto &m : session.media) {
|
for (auto &m : session.media) {
|
||||||
switch (m.type) {
|
switch (m.type) {
|
||||||
case TrackVideo : {
|
case TrackVideo : {
|
||||||
|
video.direction = RtpDirection::sendonly;
|
||||||
_rtsp_video_plan = std::make_shared<RtcCodecPlan>(m.plan[0]);
|
_rtsp_video_plan = std::make_shared<RtcCodecPlan>(m.plan[0]);
|
||||||
video.preferred_codec.clear();
|
video.preferred_codec.clear();
|
||||||
video.preferred_codec.emplace_back(getCodecId(_rtsp_video_plan->codec));
|
video.preferred_codec.emplace_back(getCodecId(_rtsp_video_plan->codec));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TrackAudio : {
|
case TrackAudio : {
|
||||||
|
audio.direction = RtpDirection::sendonly;
|
||||||
_rtsp_audio_plan = std::make_shared<RtcCodecPlan>(m.plan[0]);
|
_rtsp_audio_plan = std::make_shared<RtcCodecPlan>(m.plan[0]);
|
||||||
audio.preferred_codec.clear();
|
audio.preferred_codec.clear();
|
||||||
audio.preferred_codec.emplace_back(getCodecId(_rtsp_audio_plan->codec));
|
audio.preferred_codec.emplace_back(getCodecId(_rtsp_audio_plan->codec));
|
||||||
|
Loading…
Reference in New Issue
Block a user