mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-14 12:05:58 +08:00
addTrack/inputFrame接口支持返回值;新增全局添加静音音频接口
This commit is contained in:
@@ -84,7 +84,7 @@ int main(int argc, char *argv[]) {
|
||||
});
|
||||
});
|
||||
auto delegate = std::make_shared<FrameWriterInterfaceHelper>([decoder](const Frame::Ptr &frame) {
|
||||
decoder->inputFrame(frame);
|
||||
return decoder->inputFrame(frame);
|
||||
});
|
||||
videoTrack->addDelegate(delegate);
|
||||
}
|
||||
@@ -106,7 +106,7 @@ int main(int argc, char *argv[]) {
|
||||
audio_player->playPCM((const char *) (pcm->get()->data[0]), len);
|
||||
});
|
||||
auto audio_delegate = std::make_shared<FrameWriterInterfaceHelper>( [decoder](const Frame::Ptr &frame) {
|
||||
decoder->inputFrame(frame);
|
||||
return decoder->inputFrame(frame);
|
||||
});
|
||||
audioTrack->addDelegate(audio_delegate);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user