Commit 1c1abd7d authored by Mickaël Turnel's avatar Mickaël Turnel

Add the use of MSFrameRateController to filter fps for windows 10

parent c65322b5
......@@ -272,6 +272,7 @@ int MSWinRTCap::activate()
if (!mIsInitialized) initialize();
ms_average_fps_init(&mAvgFps, "[MSWinRTCap] fps=%f");
ms_video_init_framerate_controller(&mFpsControl, mFps);
configure();
applyVideoSize();
applyFps();
......@@ -309,6 +310,7 @@ void MSWinRTCap::stop()
int MSWinRTCap::feed(MSFilter *f)
{
if (ms_video_capture_new_frame(&mFpsControl, f->ticker->time)) {
mblk_t *im;
// Send queued samples
......@@ -316,6 +318,7 @@ int MSWinRTCap::feed(MSFilter *f)
ms_queue_put(f->outputs[0], im);
ms_average_fps_update(&mAvgFps, (uint32_t)f->ticker->time);
}
}
return 0;
}
......@@ -324,6 +327,8 @@ int MSWinRTCap::feed(MSFilter *f)
void MSWinRTCap::setFps(float fps)
{
mFps = fps;
ms_average_fps_init(&mAvgFps, "[MSWinRTCap] fps=%f");
ms_video_init_framerate_controller(&mFpsControl, fps);
applyFps();
}
......
......@@ -132,5 +132,6 @@ namespace libmswinrtvid
bool mExternal;
MSWinRTCapHelper^ mHelper;
MediaEncodingProfile^ mEncodingProfile;
MSFrameRateController mFpsControl;
};
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment