Comments (2)
I need your full Moonlight log file to investigate.
from moonlight-qt.
I used the dxva2.cpp file alone as part of my renderer, and the error disappeared after I added the following code to the end of the initialize function:
{
m_HwDeviceContext = av_hwdevice_ctx_alloc(AV_HWDEVICE_TYPE_DXVA2);
if (!m_HwDeviceContext) {
ALOGE("Failed to allocate D3D11VA device context");
return false;
}
AVHWDeviceContext* deviceContext = (AVHWDeviceContext*)m_HwDeviceContext->data;
AVDXVA2DeviceContext* dxva2DevCtx = (AVDXVA2DeviceContext*)deviceContext->hwctx;
// AVHWDeviceContext takes ownership of these objects
UINT reset_token = 0;
HRESULT hr = DXVA2CreateDirect3DDeviceManager9(&reset_token, &dxva2DevCtx->devmgr);
if (FAILED(hr))
return false;
hr = dxva2DevCtx->devmgr->ResetDevice(m_Device, reset_token);
if (FAILED(hr))
return false;
int err = av_hwdevice_ctx_init(m_HwDeviceContext);
if (err < 0) {
ALOGE("Failed to initialize D3D11VA device context: %d",
err);
return false;
}
}
{
m_HwFramesContext = av_hwframe_ctx_alloc(m_HwDeviceContext);
if (!m_HwFramesContext) {
ALOGE("Failed to allocate D3D11VA frame context");
return false;
}
AVHWFramesContext* framesContext = (AVHWFramesContext*)m_HwFramesContext->data;
// We require NV12 or P010 textures for our shader
framesContext->format = AV_PIX_FMT_DXVA2_VLD;
framesContext->sw_format = AV_PIX_FMT_NV12;
framesContext->width = FFALIGN(params->width, 128);
framesContext->height = FFALIGN(params->height, 128);
/* 1 base work surface */
int num_surfaces = 20;
/* add surfaces based on number of possible refs */
framesContext->initial_pool_size = num_surfaces;
int err = av_hwframe_ctx_init(m_HwFramesContext);
if (err < 0) {
ALOGE("Failed to initialize D3D11VA frame context: %d", err);
return false;
}
}
from moonlight-qt.
Related Issues (20)
- Send WOL packet on the Broadcast IP (255.255.255.255) as well HOT 5
- [Ubuntu] Hardware Decoding Crashes "after a while"
- Bind to a specific network interface
- Setting to always only show client's cursor in remote desktop mode
- Reconnect button in the error dialog
- StandardOutput handling issues (Moonlight-Qt CLI)
- [Feature Request] In video codec options, add a "not encoded" option like rawvideo in FFmpeg HOT 1
- moonlight-qt unable to launch on Raspberry Pi 5 HOT 1
- [Feature Request] Hide server mouse cursor, and show client mouse cursor instead HOT 2
- Unable to play epic games streaming my PC to my ROG Ally. HOT 1
- Incoming frame rate suddenly drop to <1 fps HOT 2
- Weird not pixel perfect decoding with Moonlight Windows HOT 6
- Update Windows build instruction, Wix 4.0.4 how to? Undefined symbol D3D11_DECODER_PROFILE_AV1_VLD_PROFILE0. HOT 3
- Cant close connection sometimes, error 503 HOT 1
- Audio disappears HOT 1
- New app icon for Android TV HOT 2
- Moonlight closing a few second after launching HOT 1
- Slow Connection As Soon As I Open a Game on Lenovo Legion
- HDR in games without required Windows setting washed out (unlike Cyberpunk i.e.) HOT 1
- Connect/Disconnect logic not properly working always
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moonlight-qt.