|
MythTV master
|
#include <libmythtv/opengl/mythvideotextureopengl.h>
Public Member Functions | |
| MythVideoTextureOpenGL (GLuint Texture) | |
| ~MythVideoTextureOpenGL () override=default | |
Public Member Functions inherited from MythGLTexture | |
| MythGLTexture (QOpenGLTexture *Texture) | |
| MythGLTexture (GLuint Texture) | |
| virtual | ~MythGLTexture ()=default |
Static Public Member Functions | |
| static std::vector< MythVideoTextureOpenGL * > | CreateTextures (MythRenderOpenGL *Context, VideoFrameType Type, VideoFrameType Format, std::vector< QSize > Sizes, GLenum Target=QOpenGLTexture::Target2D) |
| Create a set of textures suitable for the given Type and Format. More... | |
| static void | UpdateTextures (MythRenderOpenGL *Context, const MythVideoFrame *Frame, const std::vector< MythVideoTextureOpenGL * > &Textures) |
| Update the contents of the given Textures for data held in Frame. More... | |
| static void | DeleteTexture (MythRenderOpenGL *Context, MythVideoTextureOpenGL *Texture) |
| static void | DeleteTextures (MythRenderOpenGL *Context, std::vector< MythVideoTextureOpenGL * > &Textures) |
| static void | SetTextureFilters (MythRenderOpenGL *Context, const std::vector< MythVideoTextureOpenGL * > &Textures, QOpenGLTexture::Filter Filter, QOpenGLTexture::WrapMode Wrap=QOpenGLTexture::ClampToEdge) |
| static MythVideoTextureOpenGL * | CreateTexture (MythRenderOpenGL *Context, QSize Size, GLenum Target=QOpenGLTexture::Target2D, QOpenGLTexture::PixelType PixelType=QOpenGLTexture::UInt8, QOpenGLTexture::PixelFormat PixelFormat=QOpenGLTexture::RGBA, QOpenGLTexture::TextureFormat Format=QOpenGLTexture::NoFormat, QOpenGLTexture::Filter Filter=QOpenGLTexture::Linear, QOpenGLTexture::WrapMode Wrap=QOpenGLTexture::ClampToEdge) |
| Create and initialise a MythVideoTexture that is backed by a QOpenGLTexture. More... | |
| static VideoFramebuffer | CreateVideoFrameBuffer (MythRenderOpenGL *Context, VideoFrameType OutputType, QSize Size, bool HighPrecision=true) |
Public Attributes | |
| bool | m_valid { false } |
| QOpenGLTexture::Filter | m_filter { QOpenGLTexture::Linear } |
| VideoFrameType | m_frameType { FMT_NONE } |
| VideoFrameType | m_frameFormat { FMT_NONE } |
| uint | m_plane { 0 } |
| uint | m_planeCount { 0 } |
| bool | m_allowGLSLDeint { false } |
| MythAVCopy * | m_copyContext { nullptr } |
Public Attributes inherited from MythGLTexture | |
| unsigned char * | m_data { nullptr } |
| int | m_bufferSize { 0 } |
| GLuint | m_textureId { 0 } |
| QOpenGLTexture * | m_texture { nullptr } |
| QOpenGLTexture::PixelFormat | m_pixelFormat { QOpenGLTexture::RGBA } |
| QOpenGLTexture::PixelType | m_pixelType { QOpenGLTexture::UInt8 } |
| QOpenGLBuffer * | m_vbo { nullptr } |
| QSize | m_size { QSize() } |
| QSize | m_totalSize { QSize() } |
| bool | m_flip { true } |
| bool | m_crop { false } |
| QRect | m_source { QRect() } |
| QRect | m_destination { QRect() } |
| std::array< GLfloat, 16 > | m_vertexData { 0.0F } |
| GLenum | m_target { QOpenGLTexture::Target2D } |
| int | m_rotation { 0 } |
Protected Member Functions | |
| MythVideoTextureOpenGL (QOpenGLTexture *Texture) | |
Static Private Member Functions | |
| static std::vector< MythVideoTextureOpenGL * > | CreateHardwareTextures (MythRenderOpenGL *Context, VideoFrameType Type, VideoFrameType Format, std::vector< QSize > Sizes, GLenum Target) |
| Create a set of hardware textures suitable for the given format. More... | |
| static std::vector< MythVideoTextureOpenGL * > | CreateSoftwareTextures (MythRenderOpenGL *Context, VideoFrameType Type, VideoFrameType Format, std::vector< QSize > Sizes, GLenum Target) |
| Create a set of OpenGL textures to represent the given Format. More... | |
| static void | YV12ToYV12 (MythRenderOpenGL *Context, const MythVideoFrame *Frame, MythVideoTextureOpenGL *Texture, uint Plane) |
| Copy YV12 frame data to 'YV12' textures. More... | |
| static void | YV12ToYUYV (const MythVideoFrame *Frame, MythVideoTextureOpenGL *Texture) |
| Copy YV12 frame data to a YUYV texture. More... | |
| static void | NV12ToNV12 (MythRenderOpenGL *Context, const MythVideoFrame *Frame, MythVideoTextureOpenGL *Texture, uint Plane) |
| Copy NV12 video frame data to 'NV12' textures. More... | |
| static bool | CreateBuffer (MythVideoTextureOpenGL *Texture, int Size) |
| Create a data buffer for holding CPU side texture data. More... | |
Definition at line 22 of file mythvideotextureopengl.h.
|
explicit |
Definition at line 12 of file mythvideotextureopengl.cpp.
Referenced by CreateHardwareTextures(), CreateTexture(), and CreateVideoFrameBuffer().
|
overridedefault |
|
explicitprotected |
Definition at line 7 of file mythvideotextureopengl.cpp.
|
inlinestaticprivate |
Create a data buffer for holding CPU side texture data.
Definition at line 566 of file mythvideotextureopengl.cpp.
Referenced by NV12ToNV12(), YV12ToYUYV(), and YV12ToYV12().
|
staticprivate |
Create a set of hardware textures suitable for the given format.
Definition at line 85 of file mythvideotextureopengl.cpp.
Referenced by CreateTextures().
|
staticprivate |
Create a set of OpenGL textures to represent the given Format.
Definition at line 133 of file mythvideotextureopengl.cpp.
Referenced by CreateTextures().
|
static |
Create and initialise a MythVideoTexture that is backed by a QOpenGLTexture.
QOpenGLTexture abstracts much of the detail of handling textures but is not compatible with a number of hardware decoder requirements.
Definition at line 432 of file mythvideotextureopengl.cpp.
Referenced by MythVAAPIInteropGLXCopy::Acquire(), MythVTBInterop::Acquire(), and CreateSoftwareTextures().
|
static |
Create a set of textures suitable for the given Type and Format.
| Type | Source video frame type. |
| Format | Output frame type. |
Definition at line 57 of file mythvideotextureopengl.cpp.
Referenced by MythMMALInterop::Acquire(), MythNVDECInterop::Acquire(), MythVAAPIInteropGLXPixmap::Acquire(), MythVTBSurfaceInterop::Acquire(), MythOpenGLVideo::AddDeinterlacer(), MythEGLDMABUF::CreateComposed(), MythEGLDMABUF::CreateSeparate(), MythEGLDMABUF::CreateSeparate2(), MythMediaCodecInterop::Initialise(), MythVDPAUInterop::InitVDPAU(), and MythOpenGLVideo::SetupFrameFormat().
|
static |
Definition at line 583 of file mythvideotextureopengl.cpp.
Referenced by MythOpenGLVideo::RenderFrame().
|
static |
Definition at line 17 of file mythvideotextureopengl.cpp.
Referenced by MythNVDECInterop::Acquire(), MythVAAPIInteropGLXCopy::Acquire(), MythEGLDMABUF::ClearDMATextures(), MythOpenGLInterop::DeleteTextures(), and DeleteTextures().
|
static |
Definition at line 31 of file mythvideotextureopengl.cpp.
Referenced by MythOpenGLVideo::AddDeinterlacer(), MythMediaCodecInterop::Initialise(), and MythOpenGLVideo::ResetFrameFormat().
|
inlinestaticprivate |
Copy NV12 video frame data to 'NV12' textures.
Definition at line 540 of file mythvideotextureopengl.cpp.
Referenced by UpdateTextures().
|
static |
Definition at line 40 of file mythvideotextureopengl.cpp.
Referenced by MythOpenGLVideo::AddDeinterlacer(), CreateHardwareTextures(), and MythOpenGLVideo::RenderFrame().
|
static |
Update the contents of the given Textures for data held in Frame.
Definition at line 281 of file mythvideotextureopengl.cpp.
Referenced by MythOpenGLVideo::PrepareFrame().
|
inlinestaticprivate |
Copy YV12 frame data to a YUYV texture.
Definition at line 513 of file mythvideotextureopengl.cpp.
Referenced by UpdateTextures().
|
inlinestaticprivate |
Copy YV12 frame data to 'YV12' textures.
Definition at line 485 of file mythvideotextureopengl.cpp.
Referenced by UpdateTextures().
Definition at line 56 of file mythvideotextureopengl.h.
Referenced by MythNVDECInterop::Acquire(), MythVTBInterop::Acquire(), and MythVTBSurfaceInterop::Acquire().
| MythAVCopy* MythVideoTextureOpenGL::m_copyContext { nullptr } |
Definition at line 60 of file mythvideotextureopengl.h.
Referenced by DeleteTexture(), and YV12ToYUYV().
| QOpenGLTexture::Filter MythVideoTextureOpenGL::m_filter { QOpenGLTexture::Linear } |
Definition at line 51 of file mythvideotextureopengl.h.
| VideoFrameType MythVideoTextureOpenGL::m_frameFormat { FMT_NONE } |
Definition at line 53 of file mythvideotextureopengl.h.
Referenced by MythVAAPIInteropGLXCopy::Acquire(), MythVTBInterop::Acquire(), CreateSoftwareTextures(), MythOpenGLTonemap::CreateTexture(), NV12ToNV12(), and UpdateTextures().
| VideoFrameType MythVideoTextureOpenGL::m_frameType { FMT_NONE } |
Definition at line 52 of file mythvideotextureopengl.h.
Referenced by MythVAAPIInteropGLXCopy::Acquire(), MythVTBInterop::Acquire(), CreateSoftwareTextures(), MythOpenGLTonemap::CreateTexture(), and UpdateTextures().
| uint MythVideoTextureOpenGL::m_plane { 0 } |
Definition at line 54 of file mythvideotextureopengl.h.
Referenced by MythVAAPIInteropGLXCopy::Acquire(), MythVTBInterop::Acquire(), CreateSoftwareTextures(), and UpdateTextures().
| uint MythVideoTextureOpenGL::m_planeCount { 0 } |
Definition at line 55 of file mythvideotextureopengl.h.
Referenced by MythVAAPIInteropGLXCopy::Acquire(), MythVTBInterop::Acquire(), and CreateSoftwareTextures().
Definition at line 50 of file mythvideotextureopengl.h.
Referenced by NV12ToNV12(), YV12ToYUYV(), and YV12ToYV12().