mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-16 13:05:59 +08:00
addTrack/inputFrame接口支持返回值;新增全局添加静音音频接口
This commit is contained in:
@@ -42,9 +42,9 @@ CommonRtmpEncoder::CommonRtmpEncoder(const Track::Ptr &track) : CommonRtmpDecode
|
||||
_audio_flv_flags = getAudioRtmpFlags(track);
|
||||
}
|
||||
|
||||
void CommonRtmpEncoder::inputFrame(const Frame::Ptr &frame) {
|
||||
bool CommonRtmpEncoder::inputFrame(const Frame::Ptr &frame) {
|
||||
if (!_audio_flv_flags) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
auto rtmp = RtmpPacket::create();
|
||||
//header
|
||||
@@ -57,6 +57,7 @@ void CommonRtmpEncoder::inputFrame(const Frame::Ptr &frame) {
|
||||
rtmp->time_stamp = frame->dts();
|
||||
rtmp->type_id = MSG_AUDIO;
|
||||
RtmpCodec::inputRtmp(rtmp);
|
||||
return true;
|
||||
}
|
||||
|
||||
}//namespace mediakit
|
||||
Reference in New Issue
Block a user