mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 04:31:37 +08:00
AAC sdp添加通道数
This commit is contained in:
parent
3ad1fe4924
commit
920f06a996
@ -103,7 +103,7 @@ Sdp::Ptr AACTrack::getSdp() {
|
||||
WarnL << getCodecName() << " Track未准备好";
|
||||
return nullptr;
|
||||
}
|
||||
return std::make_shared<AACSdp>(getAacCfg(),getAudioSampleRate());
|
||||
return std::make_shared<AACSdp>(getAacCfg(),getAudioSampleRate(), getAudioChannel());
|
||||
}
|
||||
|
||||
}//namespace mediakit
|
||||
|
@ -276,11 +276,12 @@ public:
|
||||
*/
|
||||
AACSdp(const string &aac_cfg,
|
||||
int sample_rate,
|
||||
int channels,
|
||||
int playload_type = 98,
|
||||
int bitrate = 128) : Sdp(sample_rate,playload_type){
|
||||
_printer << "m=audio 0 RTP/AVP " << playload_type << "\r\n";
|
||||
_printer << "b=AS:" << bitrate << "\r\n";
|
||||
_printer << "a=rtpmap:" << playload_type << " MPEG4-GENERIC/" << sample_rate << "\r\n";
|
||||
_printer << "a=rtpmap:" << playload_type << " MPEG4-GENERIC/" << sample_rate << "/" << channels << "\r\n";
|
||||
|
||||
char configStr[32] = {0};
|
||||
snprintf(configStr, sizeof(configStr), "%02X%02X", (uint8_t)aac_cfg[0], (uint8_t)aac_cfg[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user