rtc播放时,比对采样率等信息

This commit is contained in:
xiongziliang
2021-04-04 23:58:59 +08:00
parent fe02f2cf1c
commit 6070654860
3 changed files with 54 additions and 9 deletions

View File

@@ -574,6 +574,7 @@ public:
//rtc传输编码方案
class RtcCodecPlan{
public:
using Ptr = shared_ptr<RtcCodecPlan>;
uint8_t pt;
string codec;
uint32_t sample_rate;
@@ -702,9 +703,15 @@ public:
shared_ptr<RtcSession> createAnswer(const RtcSession &offer);
void setPlayRtspInfo(const string &sdp);
private:
void matchMedia(shared_ptr<RtcSession> &ret, TrackType type, const vector<RtcMedia> &medias, const RtcTrackConfigure &configure);
bool onMatchCodecPlan(const RtcCodecPlan &plan, CodecId codec) { return true; }
bool onMatchCodecPlan(const RtcCodecPlan &plan, CodecId codec);
private:
RtcCodecPlan::Ptr _rtsp_video_plan;
RtcCodecPlan::Ptr _rtsp_audio_plan;
};