diff --git a/FrameGrabber.h b/FrameGrabber.h index 254f178..5144677 100644 --- a/FrameGrabber.h +++ b/FrameGrabber.h @@ -80,7 +80,7 @@ protected: */ class FrameGrabbing { - friend class Session; + friend class Mixer; // Private Constructor FrameGrabbing(); diff --git a/Mixer.cpp b/Mixer.cpp index 8b15c74..690aef4 100644 --- a/Mixer.cpp +++ b/Mixer.cpp @@ -209,6 +209,9 @@ void Mixer::update() // update session and associated sources session_->update(dt_); + // grab frames to recorders & streamers + FrameGrabbing::manager().grabFrame(session_->frame(), dt_); + // delete sources which failed update (one by one) Source *failure = session()->failedSource(); if (failure != nullptr) { diff --git a/Session.cpp b/Session.cpp index c05389c..10c9020 100644 --- a/Session.cpp +++ b/Session.cpp @@ -99,9 +99,6 @@ void Session::update(float dt) // draw render view in Frame Buffer render_.draw(); - // grab frames to recorders & streamers - FrameGrabbing::manager().grabFrame(render_.frame(), dt); - }