MythTV
master
|
#include <libmythtv/opengl/mythvideotextureopengl.h>
Public Member Functions | |
MythVideoTextureOpenGL (GLuint Texture) | |
~MythVideoTextureOpenGL ()=default | |
Public Member Functions inherited from MythGLTexture | |
MythGLTexture (QOpenGLTexture *Texture) | |
MythGLTexture (GLuint Texture) | |
~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 21 of file mythvideotextureopengl.h.
|
explicit |
Definition at line 12 of file mythvideotextureopengl.cpp.
Referenced by CreateHardwareTextures(), CreateTexture(), and CreateVideoFrameBuffer().
|
default |
|
explicitprotected |
Definition at line 7 of file mythvideotextureopengl.cpp.
|
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(), MythVTBSurfaceInterop::Acquire(), MythVAAPIInteropGLXPixmap::Acquire(), MythOpenGLVideo::AddDeinterlacer(), MythEGLDMABUF::CreateComposed(), MythEGLDMABUF::CreateSeparate(), MythEGLDMABUF::CreateSeparate2(), MythMediaCodecInterop::Initialise(), MythVDPAUInterop::InitVDPAU(), and MythOpenGLVideo::SetupFrameFormat().
|
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().
|
static |
Definition at line 17 of file mythvideotextureopengl.cpp.
Referenced by MythNVDECInterop::Acquire(), MythVAAPIInteropGLXCopy::Acquire(), MythEGLDMABUF::ClearDMATextures(), DeleteTextures(), and MythOpenGLInterop::DeleteTextures().
|
static |
Definition at line 31 of file mythvideotextureopengl.cpp.
Referenced by MythOpenGLVideo::AddDeinterlacer(), MythMediaCodecInterop::Initialise(), and MythOpenGLVideo::ResetFrameFormat().
|
static |
Definition at line 40 of file mythvideotextureopengl.cpp.
Referenced by MythOpenGLVideo::AddDeinterlacer(), CreateHardwareTextures(), and MythOpenGLVideo::RenderFrame().
|
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 MythVTBInterop::Acquire(), MythVAAPIInteropGLXCopy::Acquire(), and CreateSoftwareTextures().
|
static |
Definition at line 583 of file mythvideotextureopengl.cpp.
Referenced by MythOpenGLVideo::RenderFrame().
|
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().
|
inlinestaticprivate |
Copy YV12 frame data to 'YV12' textures.
Definition at line 485 of file mythvideotextureopengl.cpp.
Referenced by UpdateTextures().
|
inlinestaticprivate |
Copy YV12 frame data to a YUYV texture.
Definition at line 513 of file mythvideotextureopengl.cpp.
Referenced by UpdateTextures().
|
inlinestaticprivate |
Copy NV12 video frame data to 'NV12' textures.
Definition at line 540 of file mythvideotextureopengl.cpp.
Referenced by UpdateTextures().
|
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().
Definition at line 49 of file mythvideotextureopengl.h.
Referenced by NV12ToNV12(), YV12ToYUYV(), and YV12ToYV12().
QOpenGLTexture::Filter MythVideoTextureOpenGL::m_filter { QOpenGLTexture::Linear } |
Definition at line 50 of file mythvideotextureopengl.h.
VideoFrameType MythVideoTextureOpenGL::m_frameType { FMT_NONE } |
Definition at line 51 of file mythvideotextureopengl.h.
Referenced by MythVTBInterop::Acquire(), MythVAAPIInteropGLXCopy::Acquire(), CreateSoftwareTextures(), MythOpenGLTonemap::CreateTexture(), and UpdateTextures().
VideoFrameType MythVideoTextureOpenGL::m_frameFormat { FMT_NONE } |
Definition at line 52 of file mythvideotextureopengl.h.
Referenced by MythVTBInterop::Acquire(), MythVAAPIInteropGLXCopy::Acquire(), CreateSoftwareTextures(), MythOpenGLTonemap::CreateTexture(), NV12ToNV12(), and UpdateTextures().
uint MythVideoTextureOpenGL::m_plane { 0 } |
Definition at line 53 of file mythvideotextureopengl.h.
Referenced by MythVTBInterop::Acquire(), MythVAAPIInteropGLXCopy::Acquire(), CreateSoftwareTextures(), and UpdateTextures().
uint MythVideoTextureOpenGL::m_planeCount { 0 } |
Definition at line 54 of file mythvideotextureopengl.h.
Referenced by MythVTBInterop::Acquire(), MythVAAPIInteropGLXCopy::Acquire(), and CreateSoftwareTextures().
Definition at line 55 of file mythvideotextureopengl.h.
Referenced by MythVTBInterop::Acquire(), MythNVDECInterop::Acquire(), and MythVTBSurfaceInterop::Acquire().
MythAVCopy* MythVideoTextureOpenGL::m_copyContext { nullptr } |
Definition at line 59 of file mythvideotextureopengl.h.
Referenced by DeleteTexture(), and YV12ToYUYV().