addTrack/inputFrame接口支持返回值;新增全局添加静音音频接口

This commit is contained in:
ziyue
2021-09-27 13:12:53 +08:00
parent 1f99708548
commit e9008afca0
63 changed files with 447 additions and 357 deletions

View File

@@ -254,7 +254,7 @@ H265RtpEncoder::H265RtpEncoder(uint32_t ui32Ssrc,
ui8Interleaved) {
}
void H265RtpEncoder::inputFrame(const Frame::Ptr &frame) {
bool H265RtpEncoder::inputFrame(const Frame::Ptr &frame) {
auto ptr = (uint8_t *) frame->data() + frame->prefixSize();
auto len = frame->size() - frame->prefixSize();
auto pts = frame->pts();
@@ -305,6 +305,7 @@ void H265RtpEncoder::inputFrame(const Frame::Ptr &frame) {
} else {
RtpCodec::inputRtp(makeRtp(getTrackType(), ptr, len, false, pts), frame->keyFrame());
}
return len > 0;
}
}//namespace mediakit