mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
添加兼容性适配代码
This commit is contained in:
parent
f68dddfa9c
commit
46d1d80954
@ -51,8 +51,10 @@ private:
|
||||
}
|
||||
}
|
||||
void onMediaData(RtmpPacket &chunkData) override {
|
||||
if(m_parser){
|
||||
m_parser->inputRtmp(chunkData);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
@ -182,6 +182,9 @@ inline void RtpParser::onGetAudioTrack(const RtspTrack& audio) {
|
||||
m_strAudioCfg.push_back(cfg2);
|
||||
makeAdtsHeader(m_strAudioCfg,m_adts);
|
||||
getAACInfo(m_adts, m_iSampleRate, m_iChannel);
|
||||
if(m_adts.profile >= 3){
|
||||
throw std::runtime_error("不支持该profile的AAC");
|
||||
}
|
||||
}
|
||||
|
||||
inline void RtpParser::onGetVideoTrack(const RtspTrack& video) {
|
||||
|
@ -31,9 +31,15 @@ string FindField(const char* buf, const char* start, const char *end ,int bufSiz
|
||||
return string(msg_start, msg_end);
|
||||
}
|
||||
int parserSDP(const string& sdp, RtspTrack Track[2]) {
|
||||
string track_str = "track";
|
||||
string track_str;
|
||||
if (sdp.find("trackID=") != string::npos) {
|
||||
track_str = "trackID=";
|
||||
}else if (sdp.find("track") != string::npos) {
|
||||
track_str = "track";
|
||||
}else if (sdp.find("streamid=") != string::npos) {
|
||||
track_str = "streamid=";
|
||||
}else if (sdp.find("stream") != string::npos) {
|
||||
track_str = "stream";
|
||||
}
|
||||
int track_cnt = 0;
|
||||
string::size_type pos_head = sdp.find("m=");
|
||||
|
Loading…
Reference in New Issue
Block a user