Skip to content

create Direct3D11CaptureFramePool failed #147

@1170300710

Description

@1170300710

when I use these code:
`
def create_windows_graphics_capture(item: GraphicsCaptureItem):
# Note: Must create in the same thread (can't use a global) otherwise when ran from LiveSplit it will raise:
# OSError: The application called an interface that was marshalled for a different thread
media_capture = MediaCapture()

async def coroutine():
    async_action = media_capture.initialize_async()
    if async_action:
        await async_action
asyncio.run(coroutine())

if not media_capture.media_capture_settings:
    raise OSError("Unable to initialize a Direct3D Device.")
frame_pool = Direct3D11CaptureFramePool.create_free_threaded(
    media_capture.media_capture_settings.direct3_d11_device,
    DirectXPixelFormat.B8_G8_R8_A8_UINT_NORMALIZED,
    1,
    item.size)

`
I got an error:

OSError: [WinError -1072845856] No capture devices are available

how can I fix it?
thans a lot

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions