OpenGLVideo Class Reference

#include <openglvideo.h>

List of all members.


Detailed Description

Definition at line 51 of file openglvideo.h.


Public Member Functions

 OpenGLVideo ()
 ~OpenGLVideo ()
bool Init (OpenGLContext *glcontext, bool colour_control, bool onscreen, QSize video_size, QRect visible_rect, QRect video_rect, QRect frame_rect, bool viewport_control, bool osd=FALSE)
bool ReInit (OpenGLContext *gl, bool colour_control, bool onscreen, QSize video_size, QRect visible_rect, QRect video_rect, QRect frame_rect, bool viewport_control, bool osd=FALSE)
void UpdateInputFrame (const VideoFrame *frame)
void UpdateInput (const unsigned char *buf, const int *offsets, uint texture_index, int format, QSize size)
bool AddFilter (const QString &filter)
bool RemoveFilter (const QString &filter)
bool AddDeinterlacer (const QString &filter)
void SetDeinterlacing (bool deinterlacing)
QString GetDeinterlacer (void) const
void SetSoftwareDeinterlacer (const QString &filter)
void PrepareFrame (FrameScanType scan, bool softwareDeinterlacing, long long frame)
void SetMasterViewport (QSize size)
QSize GetViewPort (void) const
void SetVideoRect (const QRect &vidrect, const QRect &framerect)
QSize GetVideoSize (void) const
void SetVideoResize (const QRect &rect)
void DisableVideoResize (void)
int SetPictureAttribute (PictureAttribute attributeType, int newValue)
PictureAttributeSupported GetSupportedPictureAttributes (void) const
 OpenGLVideo ()
 ~OpenGLVideo ()
bool Init (OpenGLContext *, bool, bool, QSize, QRect, QRect, QRect, bool, bool osd=false)
bool ReInit (OpenGLContext *, bool, bool, QSize, QRect, QRect, QRect, bool, bool osd=false)
void UpdateInputFrame (const VideoFrame *)
void UpdateInput (const unsigned char *, const int *, uint, int, QSize)
bool AddFilter (const QString &)
bool RemoveFilter (const QString &)
bool AddDeinterlacer (const QString &)
void SetDeinterlacing (bool)
QString GetDeinterlacer (void) const
void SetSoftwareDeinterlacer (const QString &)
void PrepareFrame (FrameScanType, bool, long long)
void SetMasterViewport (QSize)
QSize GetViewPort (void) const
void SetVideoRect (const QRect &, const QRect &)
QSize GetVideoSize (void) const
void SetVideoResize (const QRect &)
void DisableVideoResize (void)
int SetPictureAttribute (PictureAttribute, int)
PictureAttributeSupported GetSupportedPictureAttributes (void) const

Private Member Functions

void Teardown (void)
void SetViewPort (const QSize &new_viewport_size)
void SetViewPortPrivate (const QSize &new_viewport_size)
bool AddFilter (OpenGLFilterType filter)
bool RemoveFilter (OpenGLFilterType filter)
bool OptimiseFilters (void)
OpenGLFilterType GetDeintFilter (void) const
bool AddFrameBuffer (uint &framebuffer, uint &texture, QSize size)
uint AddFragmentProgram (OpenGLFilterType name)
uint CreateVideoTexture (QSize size, QSize &tex_size)
QString GetProgramString (OpenGLFilterType filter)
void CalculateResize (float &left, float &top, float &right, float &bottom)
void ShutDownYUV2RGB (void)
void SetViewPort (bool last_stage)
void InitOpenGL (void)
QSize GetTextureSize (const QSize &size)
void SetFiltering (void)
void Rotate (vector< uint > *target)
void SetTextureFilters (vector< uint > *textures, int filt)

Static Private Member Functions

static QString FilterToString (OpenGLFilterType filter)
static OpenGLFilterType StringToFilter (const QString &filter)

Private Attributes

OpenGLContextgl_context
QSize videoSize
QSize viewportSize
QSize masterViewportSize
QRect visibleRect
QRect videoRect
QRect frameRect
QRect frameBufferRect
bool invertVideo
QString softwareDeinterlacer
bool hardwareDeinterlacing
bool useColourControl
bool viewportControl
uint frameBuffer
uint frameBufferTexture
vector< uintinputTextures
QSize inputTextureSize
glfilt_map_t filters
long long currentFrameNum
bool inputUpdated
QSize convertSize
unsigned char * convertBuf
bool videoResize
QRect videoResizeRect
float pictureAttribs [kPictureAttribute_MAX]

Constructor & Destructor Documentation

OpenGLVideo::OpenGLVideo (  ) 

Definition at line 37 of file openglvideo.cpp.

OpenGLVideo::~OpenGLVideo (  ) 

Definition at line 56 of file openglvideo.cpp.

OpenGLVideo::OpenGLVideo (  )  [inline]

Definition at line 155 of file openglvideo.h.

OpenGLVideo::~OpenGLVideo (  )  [inline]

Definition at line 156 of file openglvideo.h.


Member Function Documentation

bool OpenGLVideo::Init ( OpenGLContext glcontext,
bool  colour_control,
bool  onscreen,
QSize  video_size,
QRect  visible_rect,
QRect  video_rect,
QRect  frame_rect,
bool  viewport_control,
bool  osd = FALSE 
)

bool OpenGLVideo::ReInit ( OpenGLContext gl,
bool  colour_control,
bool  onscreen,
QSize  video_size,
QRect  visible_rect,
QRect  video_rect,
QRect  frame_rect,
bool  viewport_control,
bool  osd = FALSE 
)

Definition at line 355 of file openglvideo.cpp.

Referenced by VideoOutputXv::ShowPip().

void OpenGLVideo::UpdateInputFrame ( const VideoFrame frame  ) 

Definition at line 631 of file openglvideo.cpp.

Referenced by VideoOutputXv::ProcessFrameOpenGL(), and VideoOutputXv::ShowPip().

void OpenGLVideo::UpdateInput ( const unsigned char *  buf,
const int *  offsets,
uint  texture_index,
int  format,
QSize  size 
)

Definition at line 678 of file openglvideo.cpp.

Referenced by VideoOutputXv::DisplayOSD(), and UpdateInputFrame().

bool OpenGLVideo::AddFilter ( const QString &  filter  )  [inline]

Definition at line 70 of file openglvideo.h.

Referenced by AddDeinterlacer(), Init(), and OptimiseFilters().

bool OpenGLVideo::RemoveFilter ( const QString &  filter  )  [inline]

Definition at line 72 of file openglvideo.h.

Referenced by AddDeinterlacer(), and AddFilter().

bool OpenGLVideo::AddDeinterlacer ( const QString &  filter  ) 

void OpenGLVideo::SetDeinterlacing ( bool  deinterlacing  ) 

QString OpenGLVideo::GetDeinterlacer ( void   )  const [inline]

void OpenGLVideo::SetSoftwareDeinterlacer ( const QString &  filter  )  [inline]

void OpenGLVideo::PrepareFrame ( FrameScanType  scan,
bool  softwareDeinterlacing,
long long  frame 
)

Definition at line 810 of file openglvideo.cpp.

Referenced by VideoOutputXv::PrepareFrameOpenGL().

void OpenGLVideo::SetMasterViewport ( QSize  size  )  [inline]

Definition at line 85 of file openglvideo.h.

Referenced by VideoOutputXv::InitOSD(), and VideoOutputXv::ShowPip().

QSize OpenGLVideo::GetViewPort ( void   )  const [inline]

Definition at line 86 of file openglvideo.h.

Referenced by VideoOutputXv::InitOSD(), and VideoOutputXv::ShowPip().

void OpenGLVideo::SetVideoRect ( const QRect &  vidrect,
const QRect &  framerect 
) [inline]

Definition at line 87 of file openglvideo.h.

Referenced by VideoOutputXv::MoveResize(), and VideoOutputXv::ShowPip().

QSize OpenGLVideo::GetVideoSize ( void   )  const [inline]

Definition at line 89 of file openglvideo.h.

Referenced by VideoOutputXv::CreateBuffers(), and VideoOutputXv::ShowPip().

void OpenGLVideo::SetVideoResize ( const QRect &  rect  ) 

Definition at line 719 of file openglvideo.cpp.

Referenced by VideoOutputXv::DisplayOSD(), and ReInit().

void OpenGLVideo::DisableVideoResize ( void   ) 

Definition at line 741 of file openglvideo.cpp.

Referenced by SetVideoResize(), and VideoOutputXv::ShutdownVideoResize().

int OpenGLVideo::SetPictureAttribute ( PictureAttribute  attributeType,
int  newValue 
)

Definition at line 1120 of file openglvideo.cpp.

Referenced by VideoOutputXv::SetPictureAttribute().

PictureAttributeSupported OpenGLVideo::GetSupportedPictureAttributes ( void   )  const

Definition at line 1148 of file openglvideo.cpp.

Referenced by VideoOutputXv::InitPictureAttributes().

void OpenGLVideo::Teardown ( void   )  [private]

Definition at line 62 of file openglvideo.cpp.

Referenced by Init(), ReInit(), and ~OpenGLVideo().

void OpenGLVideo::SetViewPort ( const QSize &  new_viewport_size  )  [private]

Definition at line 537 of file openglvideo.cpp.

Referenced by Init().

void OpenGLVideo::SetViewPortPrivate ( const QSize &  new_viewport_size  )  [private]

Definition at line 553 of file openglvideo.cpp.

Referenced by PrepareFrame(), and SetViewPort().

bool OpenGLVideo::AddFilter ( OpenGLFilterType  filter  )  [private]

Definition at line 389 of file openglvideo.cpp.

bool OpenGLVideo::RemoveFilter ( OpenGLFilterType  filter  )  [private]

Definition at line 447 of file openglvideo.cpp.

bool OpenGLVideo::OptimiseFilters ( void   )  [private]

Definition at line 226 of file openglvideo.cpp.

Referenced by AddFilter().

OpenGLFilterType OpenGLVideo::GetDeintFilter ( void   )  const [private]

Definition at line 204 of file openglvideo.cpp.

Referenced by GetDeinterlacer().

bool OpenGLVideo::AddFrameBuffer ( uint framebuffer,
uint texture,
QSize  size 
) [private]

Definition at line 517 of file openglvideo.cpp.

Referenced by Init(), and OptimiseFilters().

uint OpenGLVideo::AddFragmentProgram ( OpenGLFilterType  name  )  [private]

Definition at line 492 of file openglvideo.cpp.

Referenced by AddFilter().

uint OpenGLVideo::CreateVideoTexture ( QSize  size,
QSize &  tex_size 
) [private]

Definition at line 585 of file openglvideo.cpp.

Referenced by Init().

QString OpenGLVideo::GetProgramString ( OpenGLFilterType  filter  )  [private]

Definition at line 1269 of file openglvideo.cpp.

Referenced by AddFragmentProgram().

void OpenGLVideo::CalculateResize ( float &  left,
float &  top,
float &  right,
float &  bottom 
) [private]

Definition at line 747 of file openglvideo.cpp.

Referenced by PrepareFrame().

QString OpenGLVideo::FilterToString ( OpenGLFilterType  filter  )  [static, private]

Definition at line 1200 of file openglvideo.cpp.

Referenced by AddFilter(), AddFragmentProgram(), GetDeinterlacer(), and RemoveFilter().

OpenGLFilterType OpenGLVideo::StringToFilter ( const QString &  filter  )  [static, private]

Definition at line 1169 of file openglvideo.cpp.

Referenced by AddFilter(), and RemoveFilter().

void OpenGLVideo::ShutDownYUV2RGB ( void   )  [private]

Definition at line 707 of file openglvideo.cpp.

Referenced by Teardown(), and UpdateInputFrame().

void OpenGLVideo::SetViewPort ( bool  last_stage  )  [private]

void OpenGLVideo::InitOpenGL ( void   )  [private]

Definition at line 565 of file openglvideo.cpp.

Referenced by Init().

QSize OpenGLVideo::GetTextureSize ( const QSize &  size  )  [private]

Definition at line 609 of file openglvideo.cpp.

Referenced by CreateVideoTexture(), Init(), and OptimiseFilters().

void OpenGLVideo::SetFiltering ( void   )  [private]

Definition at line 313 of file openglvideo.cpp.

Referenced by SetDeinterlacing().

void OpenGLVideo::Rotate ( vector< uint > *  target  )  [private]

Referenced by PrepareFrame().

void OpenGLVideo::SetTextureFilters ( vector< uint > *  textures,
int  filt 
) [private]

Referenced by SetFiltering().

bool OpenGLVideo::Init ( OpenGLContext ,
bool  ,
bool  ,
QSize  ,
QRect  ,
QRect  ,
QRect  ,
bool  ,
bool  osd = false 
) [inline]

Definition at line 158 of file openglvideo.h.

bool OpenGLVideo::ReInit ( OpenGLContext ,
bool  ,
bool  ,
QSize  ,
QRect  ,
QRect  ,
QRect  ,
bool  ,
bool  osd = false 
) [inline]

Definition at line 162 of file openglvideo.h.

void OpenGLVideo::UpdateInputFrame ( const VideoFrame  )  [inline]

Definition at line 166 of file openglvideo.h.

void OpenGLVideo::UpdateInput ( const unsigned char *  ,
const int *  ,
uint  ,
int  ,
QSize   
) [inline]

Definition at line 167 of file openglvideo.h.

bool OpenGLVideo::AddFilter ( const QString &   )  [inline]

Definition at line 169 of file openglvideo.h.

bool OpenGLVideo::RemoveFilter ( const QString &   )  [inline]

Definition at line 170 of file openglvideo.h.

bool OpenGLVideo::AddDeinterlacer ( const QString &   )  [inline]

Definition at line 172 of file openglvideo.h.

void OpenGLVideo::SetDeinterlacing ( bool   )  [inline]

Definition at line 173 of file openglvideo.h.

QString OpenGLVideo::GetDeinterlacer ( void   )  const [inline]

Definition at line 174 of file openglvideo.h.

void OpenGLVideo::SetSoftwareDeinterlacer ( const QString &   )  [inline]

Definition at line 175 of file openglvideo.h.

void OpenGLVideo::PrepareFrame ( FrameScanType  ,
bool  ,
long  long 
) [inline]

Definition at line 177 of file openglvideo.h.

void OpenGLVideo::SetMasterViewport ( QSize   )  [inline]

Definition at line 179 of file openglvideo.h.

QSize OpenGLVideo::GetViewPort ( void   )  const [inline]

Definition at line 180 of file openglvideo.h.

void OpenGLVideo::SetVideoRect ( const QRect &  ,
const QRect &   
) [inline]

Definition at line 181 of file openglvideo.h.

QSize OpenGLVideo::GetVideoSize ( void   )  const [inline]

Definition at line 182 of file openglvideo.h.

void OpenGLVideo::SetVideoResize ( const QRect &   )  [inline]

Definition at line 183 of file openglvideo.h.

void OpenGLVideo::DisableVideoResize ( void   )  [inline]

Definition at line 184 of file openglvideo.h.

int OpenGLVideo::SetPictureAttribute ( PictureAttribute  ,
int   
) [inline]

Definition at line 185 of file openglvideo.h.

PictureAttributeSupported OpenGLVideo::GetSupportedPictureAttributes ( void   )  const [inline]

Definition at line 186 of file openglvideo.h.


Member Data Documentation

QSize OpenGLVideo::videoSize [private]

QSize OpenGLVideo::viewportSize [private]

Definition at line 122 of file openglvideo.h.

Referenced by GetViewPort(), and SetViewPort().

Definition at line 123 of file openglvideo.h.

Referenced by Init(), PrepareFrame(), and SetMasterViewport().

QRect OpenGLVideo::visibleRect [private]

Definition at line 124 of file openglvideo.h.

Referenced by CalculateResize(), Init(), and PrepareFrame().

QRect OpenGLVideo::videoRect [private]

Definition at line 125 of file openglvideo.h.

Referenced by Init(), OptimiseFilters(), PrepareFrame(), and SetVideoRect().

QRect OpenGLVideo::frameRect [private]

Definition at line 126 of file openglvideo.h.

Referenced by Init(), PrepareFrame(), and SetVideoRect().

Definition at line 127 of file openglvideo.h.

Referenced by Init(), and PrepareFrame().

Definition at line 128 of file openglvideo.h.

Referenced by Init(), and PrepareFrame().

Definition at line 129 of file openglvideo.h.

Referenced by Init(), PrepareFrame(), ReInit(), and SetSoftwareDeinterlacer().

Definition at line 130 of file openglvideo.h.

Referenced by Init(), OptimiseFilters(), ReInit(), and SetDeinterlacing().

Definition at line 132 of file openglvideo.h.

Referenced by Init(), PrepareFrame(), and SetViewPort().

Definition at line 133 of file openglvideo.h.

Referenced by GetProgramString(), Init(), PrepareFrame(), and Teardown().

Definition at line 134 of file openglvideo.h.

Referenced by Init(), and Teardown().

vector<uint> OpenGLVideo::inputTextures [private]

Definition at line 135 of file openglvideo.h.

Referenced by Init(), PrepareFrame(), SetFiltering(), Teardown(), and UpdateInput().

Definition at line 136 of file openglvideo.h.

Referenced by Init(), and PrepareFrame().

long long OpenGLVideo::currentFrameNum [private]

Definition at line 138 of file openglvideo.h.

Referenced by Init(), and PrepareFrame().

Definition at line 139 of file openglvideo.h.

Referenced by Init(), PrepareFrame(), and UpdateInput().

QSize OpenGLVideo::convertSize [private]

Definition at line 141 of file openglvideo.h.

Referenced by Init(), ShutDownYUV2RGB(), and UpdateInputFrame().

unsigned char* OpenGLVideo::convertBuf [private]

Definition at line 142 of file openglvideo.h.

Referenced by ShutDownYUV2RGB(), and UpdateInputFrame().

Definition at line 144 of file openglvideo.h.

Referenced by DisableVideoResize(), Init(), PrepareFrame(), ReInit(), and SetVideoResize().

Definition at line 145 of file openglvideo.h.

Referenced by CalculateResize(), DisableVideoResize(), Init(), ReInit(), and SetVideoResize().

float OpenGLVideo::pictureAttribs[kPictureAttribute_MAX] [private]

Definition at line 147 of file openglvideo.h.

Referenced by PrepareFrame(), and SetPictureAttribute().


The documentation for this class was generated from the following files:

Generated on Sat Dec 18 05:16:08 2010 for MythTV by  doxygen 1.5.5