mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-19 23:02:21 +08:00
增加adts头相关接口
This commit is contained in:
@@ -138,10 +138,12 @@ void DevChannel::inputAAC(char *pcDataWithoutAdts,int iDataLen, uint32_t uiStamp
|
||||
static uint32_t audioMtu = mINI::Instance()[Config::Rtp::kAudioMtuSize].as<uint32_t>();
|
||||
m_pRtpMaker_aac.reset(new RtpMaker_AAC(lam, ssrc, audioMtu,m_audio->iSampleRate));
|
||||
}
|
||||
if (!m_bSdp_gotAAC && m_audio) {
|
||||
makeSDP_AAC((unsigned char*) pcAdtsHeader, iDataLen);
|
||||
if (!m_bSdp_gotAAC && m_audio && pcAdtsHeader) {
|
||||
makeSDP_AAC((unsigned char*) pcAdtsHeader);
|
||||
}
|
||||
m_pRtpMaker_aac->makeRtp(pcDataWithoutAdts, iDataLen, uiStamp);
|
||||
if(pcDataWithoutAdts && iDataLen){
|
||||
m_pRtpMaker_aac->makeRtp(pcDataWithoutAdts, iDataLen, uiStamp);
|
||||
}
|
||||
}
|
||||
|
||||
inline void DevChannel::makeSDP_264(unsigned char *pcData, int iDataLen) {
|
||||
@@ -226,7 +228,7 @@ inline void DevChannel::makeSDP_264(unsigned char *pcData, int iDataLen) {
|
||||
}
|
||||
}
|
||||
|
||||
inline void DevChannel::makeSDP_AAC(unsigned char *fixedHeader, int dataLen) {
|
||||
inline void DevChannel::makeSDP_AAC(unsigned char *fixedHeader) {
|
||||
auto audioSpecificConfig = makeAdtsConfig(fixedHeader);
|
||||
if (audioSpecificConfig.size() != 2) {
|
||||
return;
|
||||
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
}
|
||||
private:
|
||||
inline void makeSDP_264(unsigned char *pucData, int iDataLen);
|
||||
inline void makeSDP_AAC(unsigned char *pucData, int iDataLen);
|
||||
inline void makeSDP_AAC(unsigned char *pucData);
|
||||
inline void makeSDP(const string& strSdp);
|
||||
#ifdef ENABLE_X264
|
||||
std::shared_ptr<H264Encoder> m_pH264Enc;
|
||||
|
||||
Reference in New Issue
Block a user