-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
high cpu usage #3
Comments
Which encoder? |
video : h264 |
I see, probably a need for upgrading the Nvidia/AMD driver then or even the hardware. |
Great work @WindowsNT, following this issue, i'm a bit profane on dx11 but to me it seems like theres unnecessary copy of the video texture in I'd rather keep the texture always on the gpu and create the |
Hmm interesting, I 'll take a look. |
I've just tried it by copiying So the part of if ( lDesktopResource && !cap.Get2 (lDesktopResource, dp.Cursor, dp.rx.right && dp.rx.bottom ? &dp.rx : 0) )
break;
if ( !pVideoBuffer )
{
hr = MFCreateDXGISurfaceBuffer (IID_ID3D11Texture2D, cap.lGDIImage, 0, 0, &pVideoBuffer);
if ( FAILED (hr) ) break;
}
hr = pVideoBuffer->SetCurrentLength (VideoBufferSize);
if ( FAILED (hr) ) break;
CComPtr<IMFSample> pVideoSample = NULL; It seems the call to Also related to this issue i've noticed that my cpu usage is 5% without audio and 25% with it, so maybe theres some spinlock on that code path, ill try to review later. Best regards edit: Checked that silence generator thread had a spinlock, |
up to 80% cpu usages(4 cores cpu) for running it. anybody the same as me? how to resolve it?
The text was updated successfully, but these errors were encountered: