You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 7, 2024. It is now read-only.
Sorry my english is not good.
My python version is 3.7.3, system is windows10.
I am try to record the screen.
I have already get the item by using "pick_single_item_async", and then I want to create a frame pool by "Direct3D11CaptureFramePool.create_free_threaded", but I don't know how to get the first argument whose type is IDirect3DDevice.
I find a way to get a D3D device by MediaCapture, and I can create a frame pool:
media_capture=MediaCapture()
asyncdefcoroutine():
async_action=media_capture.initialize_async()
ifasync_action:
awaitasync_actionasyncio.run(coroutine())
ifnotmedia_capture.media_capture_settings:
raiseOSError("Unable to initialize a Direct3D Device.")
self.frame_pool=Direct3D11CaptureFramePool.create_free_threaded(
media_capture.media_capture_settings.direct3_d11_device,
DirectXPixelFormat.B8_G8_R8_A8_UINT_NORMALIZED,
1,
self.item.size
)
but I got an error in line "await async_action":
OSError: [WinError -1072845856] No capture devices are available.
what should I do to create a frame pool.
Thanks a lot!