mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-14 03:55:58 +08:00
addTrack/inputFrame接口支持返回值;新增全局添加静音音频接口
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user