完成AAC RTMP编解码类

This commit is contained in:
xiongziliang
2018-10-24 14:21:59 +08:00
parent 6c9d50b04b
commit f4bce611ef
10 changed files with 209 additions and 21 deletions

View File

@@ -55,7 +55,7 @@ void RtmpToRtspMediaSource::onGetH264(const H264Frame &frame) {
m_pRtpMaker_h264->makeRtp(frame.data() + 4, frame.size() - 4, frame.timeStamp);
}
}
inline void RtmpToRtspMediaSource::onGetAdts(const AACFrame &frame) {
inline void RtmpToRtspMediaSource::onGetAAC(const AACFrame &frame) {
if(m_pRecorder){
m_pRecorder->inputAAC((char *) frame.buffer, frame.aac_frame_length, frame.timeStamp);
}

View File

@@ -69,7 +69,7 @@ public:
m_pRecorder.reset(new MediaRecorder(getVhost(),getApp(),getId(),m_pParser,m_bEnableHls,m_bEnableMp4));
//todo(xzl) 修复此处
// m_pParser->setOnAudioCB(std::bind(&RtmpToRtspMediaSource::onGetAdts, this, placeholders::_1));
// m_pParser->setOnAudioCB(std::bind(&RtmpToRtspMediaSource::onGetAAC, this, placeholders::_1));
// m_pParser->setOnVideoCB(std::bind(&RtmpToRtspMediaSource::onGetH264, this, placeholders::_1));
} catch (exception &ex) {
WarnL << ex.what();
@@ -96,7 +96,7 @@ private:
bool m_bEnableHls;
bool m_bEnableMp4;
void onGetH264(const H264Frame &frame);
void onGetAdts(const AACFrame &frame);
void onGetAAC(const AACFrame &frame);
void makeSDP();
};