完善MediaRecord 类

This commit is contained in:
xiongziliang
2018-10-28 00:21:55 +08:00
parent 6364b14762
commit b2ebd84848
4 changed files with 31 additions and 23 deletions

View File

@@ -90,7 +90,8 @@ void RtspToRtmpMediaSource::makeVideoConfigPkt() {
}
void RtspToRtmpMediaSource::onGetH264(const H264Frame& frame) {
if(_pRecorder){
_pRecorder->inputH264((char *) frame.data(), frame.size(), frame.timeStamp, frame.type);
//todo(xzl) 修复此处
// _pRecorder->inputH264((char *) frame.data(), frame.size(), frame.timeStamp, frame.type);
}
uint8_t nal_type = frame.data()[4] & 0x1F;
int8_t flags = 7; //h.264
@@ -124,7 +125,8 @@ void RtspToRtmpMediaSource::onGetH264(const H264Frame& frame) {
}
void RtspToRtmpMediaSource::onGetAAC(const AACFrame& frame) {
if(_pRecorder){
_pRecorder->inputAAC((char *) frame.buffer, frame.aac_frame_length, frame.timeStamp);
//todo(xzl) 修复此处
// _pRecorder->inputAAC((char *) frame.buffer, frame.aac_frame_length, frame.timeStamp);
}
RtmpPacket::Ptr rtmpPkt(new RtmpPacket);