mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 06:30:55 +00:00
Use AVBufferRefs to keep EGLImages and DRM FDs around for the lifetime of the frame
This commit is contained in:
@@ -73,13 +73,11 @@ public:
|
||||
virtual AVPixelFormat getEGLImagePixelFormat() override;
|
||||
virtual bool initializeEGL(EGLDisplay dpy, const EGLExtensions &ext) override;
|
||||
virtual ssize_t exportEGLImages(AVFrame *frame, EGLDisplay dpy, EGLImage images[EGL_MAX_PLANES]) override;
|
||||
virtual void freeEGLImages() override;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DRM
|
||||
virtual bool canExportDrmPrime() override;
|
||||
virtual bool mapDrmPrimeFrame(AVFrame* frame, AVDRMFrameDescriptor* drmDescriptor) override;
|
||||
virtual void unmapDrmPrimeFrame(AVDRMFrameDescriptor* drmDescriptor) override;
|
||||
#endif
|
||||
|
||||
private:
|
||||
@@ -91,6 +89,10 @@ private:
|
||||
bool canExportSurfaceHandle(int layerTypeFlag, VADRMPRIMESurfaceDescriptor* descriptor);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DRM
|
||||
static void freeDrmDescriptorBuffer(void* opaque, uint8_t* data);
|
||||
#endif
|
||||
|
||||
int m_DecoderSelectionPass;
|
||||
int m_WindowSystem;
|
||||
AVBufferRef* m_HwContext;
|
||||
|
||||
Reference in New Issue
Block a user