VideoOutputXv Class Reference

#include <videoout_xv.h>

Inheritance diagram for VideoOutputXv:

VideoOutput

List of all members.


Detailed Description

Supports common video output methods used with X11 Servers.

This class suppurts XVideo with VLD acceleration (XvMC-VLD), XVideo with inverse discrete cosine transform (XvMC-IDCT) acceleration, XVideo with motion vector (XvMC) acceleration, and normal XVideo with color transform and scaling acceleration only. When none of these will work, we also try to use X Shared memory, and if that fails we try standard Xlib output.

See also:
VideoOutput, VideoBuffers

Definition at line 53 of file videoout_xv.h.


Public Member Functions

 VideoOutputXv (MythCodecID av_codec_id)
 ~VideoOutputXv ()
bool Init (int width, int height, float aspect, WId winid, int winx, int winy, int winw, int winh, WId embedid=0)
 Initializes class for video output.
bool SetDeinterlacingEnabled (bool)
 Attempts to enable/disable deinterlacing using existing deinterlace method when enabling.
bool SetupDeinterlace (bool interlaced, const QString &ovrf="")
 Attempts to enable or disable deinterlacing.
bool ApproveDeintFilter (const QString &filtername) const
 Approves all deinterlace filters, except ones which must be supported by a specific video output class.
void ProcessFrame (VideoFrame *frame, OSD *osd, FilterChain *filterList, NuppelVideoPlayer *pipPlayer)
void PrepareFrame (VideoFrame *, FrameScanType)
void DrawSlice (VideoFrame *, int x, int y, int w, int h)
 Informs video output of new data for frame, used for XvMC acceleration.
void Show (FrameScanType)
void ClearAfterSeek (void)
 Tells video output to toss decoded buffers due to a seek.
void MoveResize (void)
 performs all the calculations for video framing and any resizing.
bool InputChanged (const QSize &input_size, float aspect, MythCodecID av_codec_id, void *codec_private)
 Tells video output to discard decoded frames and wait for new ones.
void Zoom (ZoomDirection direction)
 Sets up zooming into to different parts of the video, the zoom is actually applied in MoveResize().
void VideoAspectRatioChanged (float aspect)
 Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes.
void EmbedInWidget (WId wid, int x, int y, int w, int h)
 Tells video output to embed video in an existing window.
void StopEmbedding (void)
 Tells video output to stop embedding video in an existing window.
void ResizeForGui (void)
void ResizeForVideo (void)
void DrawUnusedRects (bool sync=true)
 Draws non-video portions of the screen.
void UpdatePauseFrame (void)
 Updates frame displayed when video is paused.
int SetPictureAttribute (PictureAttribute attribute, int newValue)
 Sets a specified picture attribute.
void InitPictureAttributes (void)
int GetRefreshRate (void)
 Monitor refresh time in microseconds.
virtual bool hasMCAcceleration (void) const
 Returns true iff Motion Compensation acceleration is available.
virtual bool hasIDCTAcceleration (void) const
 Returns true iff Inverse Discrete Cosine Transform acceleration is available.
virtual bool hasVLDAcceleration (void) const
 Returns true iff VLD acceleration is available.
void CheckFrameStates (void)
QRect GetPIPRect (int location, NuppelVideoPlayer *pipplayer=NULL)
 returns QRect of PIP based on PIPLocation
virtual void ShutdownVideoResize (void)

Static Public Member Functions

static MythCodecID GetBestSupportedCodec (uint width, uint height, uint osd_width, uint osd_height, uint stream_type, int xvmc_chroma, bool test_surface, bool force_xv)
static int GrabSuitableXvPort (Display *disp, Window root, MythCodecID type, uint width, uint height, int xvmc_chroma=0, XvMCSurfaceInfo *si=NULL, QString *adaptor_name=NULL)
 Internal function used to grab a XVideo port with the desired properties.
static XvMCContext * CreateXvMCContext (Display *disp, int port, int surf_type, int width, int height)
static void DeleteXvMCContext (Display *disp, XvMCContext *&ctx)
static QStringList GetAllowedRenderers (MythCodecID myth_codec_id, const QSize &video_dim)

Private Member Functions

VOSType VideoOutputSubType () const
virtual QRect GetVisibleOSDBounds (float &, float &, float) const
virtual QRect GetTotalOSDBounds (void) const
 Returns total OSD bounds.
VideoFrameGetNextFreeFrame (bool allow_unsafe)
void DiscardFrame (VideoFrame *)
 Frame is ready to be reused by decoder added to the done or available list.
void DiscardFrames (bool next_frame_keyframe)
 Releases all frames not being actively displayed from any queue onto the queue of frames ready for decoding onto.
void DoneDisplayingFrame (void)
 This is used to tell this class that the NPV will not call Show() on this frame again.
void ProcessFrameXvMC (VideoFrame *frame, OSD *osd)
void ProcessFrameOpenGL (VideoFrame *frame, OSD *osd, FilterChain *filterList, NuppelVideoPlayer *pipPlayer)
void ProcessFrameMem (VideoFrame *frame, OSD *osd, FilterChain *filterList, NuppelVideoPlayer *pipPlayer)
void PrepareFrameXvMC (VideoFrame *, FrameScanType)
void PrepareFrameXv (VideoFrame *)
void PrepareFrameOpenGL (VideoFrame *, FrameScanType)
void PrepareFrameMem (VideoFrame *, FrameScanType)
void ShowXvMC (FrameScanType scan)
void ShowXVideo (FrameScanType scan)
void ShowPip (VideoFrame *frame, NuppelVideoPlayer *pipplayer)
 Composites PiP image onto a video frame.
virtual int DisplayOSD (VideoFrame *frame, OSD *osd, int stride=-1, int revision=-1)
 If the OSD has changed, this will convert the OSD buffer to the OSDSurface's color format.
void ResizeForVideo (uint width, uint height)
 Sets display parameters based on video resolution.
void InitDisplayMeasurements (uint width, uint height)
 Init display measurements based on database settings and actual screen parameters.
void InitColorKey (bool turnoffautopaint)
 Initializes color keying support used by XVideo output methods.
bool InitVideoBuffers (MythCodecID, bool use_xv, bool use_shm, bool use_opengl)
 Creates and initializes video buffers.
bool InitXvMC (MythCodecID)
 Creates and initializes video buffers.
bool InitXVideo (void)
 Creates and initializes video buffers.
bool InitOpenGL (void)
bool InitXShm (void)
 Creates and initializes video buffers.
bool InitXlib (void)
 Creates and initializes video buffers.
bool InitOSD (const QString &)
bool CheckOSDInit (void)
bool CreateXvMCBuffers (void)
bool CreateBuffers (VOSType subtype)
vector< void * > CreateXvMCSurfaces (uint num, bool surface_has_vld)
vector< unsigned char * > CreateShmImages (uint num, bool use_xv)
 Creates Shared Memory Images.
void CreatePauseFrame (VOSType subtype)
 Creates an extra frame for pause.
void CopyFrame (VideoFrame *to, const VideoFrame *from)
 Copies frame data from one VideoFrame to another.
void DeleteBuffers (VOSType subtype, bool delete_pause_frame)
bool InitSetupBuffers (void)
XvMCOSDGetAvailableOSD ()
void ReturnAvailableOSD (XvMCOSD *)
bool SetDeinterlacingEnabledOpenGL (bool enable)
bool SetupDeinterlaceOpenGL (bool interlaced, const QString &overridefilter)

Static Private Member Functions

static bool IsDisplaying (VideoFrame *frame)
static bool IsRendering (VideoFrame *frame)
static void SyncSurface (VideoFrame *frame, int past_future=0)
static void FlushSurface (VideoFrame *frame)

Private Attributes

MythCodecID myth_codec_id
VOSType video_output_subtype
DisplayResdisplay_res
QMutex global_lock
Window XJ_root
Window XJ_win
Window XJ_curwin
GC XJ_gc
Screen * XJ_screen
Display * XJ_disp
int XJ_screen_num
unsigned long XJ_white
unsigned long XJ_black
unsigned long XJ_letterbox_colour
int XJ_depth
int XJ_screenx
int XJ_screeny
int XJ_screenwidth
int XJ_screenheight
bool XJ_started
VideoFrame av_pause_frame
vector< XShmSegmentInfo * > XJ_shm_infos
vector< YUVInfoXJ_yuv_infos
XImage * XJ_non_xv_image
long long non_xv_frames_shown
int non_xv_show_frame
int non_xv_fps
int non_xv_av_format
time_t non_xv_stop_time
XvMCBufferSettingsxvmc_buf_attr
int xvmc_chroma
XvMCContext * xvmc_ctx
vector< void * > xvmc_surfs
QMutex xvmc_osd_lock
MythDeque< XvMCOSD * > xvmc_osd_available
XvMCSurfaceInfo xvmc_surf_info
XvMCTexturesxvmc_tex
int xv_port
int xv_hue_base
int xv_colorkey
bool xv_draw_colorkey
int xv_chroma
buffer_map_t xv_buffers
bool xv_need_bobdeint_repaint
QMap< PictureAttribute, int > xv_attribute_min
QMap< PictureAttribute, int > xv_attribute_max
QMutex gl_context_lock
OpenGLContextgl_context
OpenGLVideogl_videochain
OpenGLVideogl_pipchain
OpenGLVideogl_osdchain
bool gl_use_osd_opengl2
bool gl_pip_ready
bool gl_osd_ready
ChromaKeyOSDchroma_osd

Friends

class ChromaKeyOSD
class OpenGLVideoSync
class XvMCOSD

Constructor & Destructor Documentation

VideoOutputXv::VideoOutputXv ( MythCodecID  av_codec_id  ) 

Definition at line 100 of file videoout_xv.cpp.

VideoOutputXv::~VideoOutputXv (  ) 

Definition at line 143 of file videoout_xv.cpp.


Member Function Documentation

bool VideoOutputXv::Init ( int  width,
int  height,
float  aspect,
WId  winid,
int  winx,
int  winy,
int  winw,
int  winh,
WId  embedid = 0 
) [virtual]

Initializes class for video output.

Returns:
success or failure.

Reimplemented from VideoOutput.

Definition at line 1576 of file videoout_xv.cpp.

bool VideoOutputXv::SetDeinterlacingEnabled ( bool  enable  )  [virtual]

Attempts to enable/disable deinterlacing using existing deinterlace method when enabling.

Reimplemented from VideoOutput.

Definition at line 1704 of file videoout_xv.cpp.

Referenced by InitOpenGL().

bool VideoOutputXv::SetupDeinterlace ( bool  i,
const QString &  ovrf = "" 
) [virtual]

Attempts to enable or disable deinterlacing.

Returns:
true if successful, false otherwise.
Parameters:
overridefilter optional, explicitly use this nondefault deint filter

Reimplemented from VideoOutput.

Definition at line 1714 of file videoout_xv.cpp.

Referenced by SetDeinterlacingEnabledOpenGL().

bool VideoOutputXv::ApproveDeintFilter ( const QString &  filtername  )  const [virtual]

Approves all deinterlace filters, except ones which must be supported by a specific video output class.

Reimplemented from VideoOutput.

Definition at line 1846 of file videoout_xv.cpp.

void VideoOutputXv::ProcessFrame ( VideoFrame frame,
OSD osd,
FilterChain filterList,
NuppelVideoPlayer pipPlayer 
) [virtual]

Implements VideoOutput.

Definition at line 3762 of file videoout_xv.cpp.

void VideoOutputXv::PrepareFrame ( VideoFrame buffer,
FrameScanType  scan 
) [virtual]

Implements VideoOutput.

Definition at line 2806 of file videoout_xv.cpp.

void VideoOutputXv::DrawSlice ( VideoFrame frame,
int  x,
int  y,
int  w,
int  h 
) [virtual]

Informs video output of new data for frame, used for XvMC acceleration.

Reimplemented from VideoOutput.

Definition at line 3271 of file videoout_xv.cpp.

void VideoOutputXv::Show ( FrameScanType  scan  )  [virtual]

Implements VideoOutput.

Definition at line 3045 of file videoout_xv.cpp.

void VideoOutputXv::ClearAfterSeek ( void   )  [virtual]

Tells video output to toss decoded buffers due to a seek.

Reimplemented from VideoOutput.

Definition at line 2469 of file videoout_xv.cpp.

void VideoOutputXv::MoveResize ( void   )  [virtual]

performs all the calculations for video framing and any resizing.

First we apply playback over/underscanning and offsetting, then we letterbox settings, and finally we apply manual scale & move properties for "Zoom Mode".

See also:
Zoom(ZoomDirection), ToggleAdjustFill(int)

Reimplemented from VideoOutput.

Definition at line 208 of file videoout_xv.cpp.

Referenced by EmbedInWidget(), Init(), InputChanged(), and Zoom().

bool VideoOutputXv::InputChanged ( const QSize &  input_size,
float  aspect,
MythCodecID  myth_codec_id,
void *  codec_private 
) [virtual]

Tells video output to discard decoded frames and wait for new ones.

Bug:
We set the new width height and aspect ratio here, but we should do this based on the new video frames in Show().

Reimplemented from VideoOutput.

Definition at line 226 of file videoout_xv.cpp.

void VideoOutputXv::Zoom ( ZoomDirection  direction  )  [virtual]

Sets up zooming into to different parts of the video, the zoom is actually applied in MoveResize().

See also:
ToggleAdjustFill(AdjustFillMode)

Reimplemented from VideoOutput.

Definition at line 200 of file videoout_xv.cpp.

void VideoOutputXv::VideoAspectRatioChanged ( float  aspect  )  [virtual]

Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes.

Parameters:
aspect video aspect ratio to use

Reimplemented from VideoOutput.

Definition at line 3346 of file videoout_xv.cpp.

void VideoOutputXv::EmbedInWidget ( WId  wid,
int  x,
int  y,
int  w,
int  h 
) [virtual]

Tells video output to embed video in an existing window.

Parameters:
wid window to embed in.
x X location where to locate video
y Y location where to locate video
w width of video
h height of video
See also:
StopEmbedding()

Reimplemented from VideoOutput.

Definition at line 2378 of file videoout_xv.cpp.

void VideoOutputXv::StopEmbedding ( void   )  [virtual]

Tells video output to stop embedding video in an existing window.

See also:
EmbedInWidget(WId, int, int, int, int)

Reimplemented from VideoOutput.

Definition at line 2393 of file videoout_xv.cpp.

void VideoOutputXv::ResizeForGui ( void   )  [virtual]

Reimplemented from VideoOutput.

Definition at line 386 of file videoout_xv.cpp.

void VideoOutputXv::ResizeForVideo ( void   )  [virtual]

Reimplemented from VideoOutput.

Definition at line 381 of file videoout_xv.cpp.

Referenced by InitDisplayMeasurements(), and InputChanged().

void VideoOutputXv::DrawUnusedRects ( bool  sync = true  )  [virtual]

Draws non-video portions of the screen.

Parameters:
sync if set any queued up draws are sent immediately to the graphics context and we block until they have completed.

Implements VideoOutput.

Definition at line 3150 of file videoout_xv.cpp.

Referenced by Show().

void VideoOutputXv::UpdatePauseFrame ( void   )  [virtual]

Updates frame displayed when video is paused.

Implements VideoOutput.

Definition at line 3371 of file videoout_xv.cpp.

int VideoOutputXv::SetPictureAttribute ( PictureAttribute  attribute,
int  newValue 
) [virtual]

Sets a specified picture attribute.

Parameters:
attribute Picture attribute to set.
newValue Value to set attribute to.
Returns:
Set value if it succeeds, -1 if it does not.

Reimplemented from VideoOutput.

Definition at line 3781 of file videoout_xv.cpp.

void VideoOutputXv::InitPictureAttributes ( void   )  [virtual]

Reimplemented from VideoOutput.

Definition at line 3845 of file videoout_xv.cpp.

Referenced by InitSetupBuffers().

int VideoOutputXv::GetRefreshRate ( void   )  [virtual]

Monitor refresh time in microseconds.

This uses the XFree86 xf86vmode extension to query the mode line It then uses the mode line to guess at the refresh rate.

Bug:
This works for all user specified mode lines, but sometimes fails for autogenerated mode lines.
Returns:
integer approximation of monitor refresh time (microseconds)

Implements VideoOutput.

Definition at line 338 of file videoout_xv.cpp.

virtual bool VideoOutputXv::hasMCAcceleration ( void   )  const [inline, virtual]

Returns true iff Motion Compensation acceleration is available.

Reimplemented from VideoOutput.

Definition at line 97 of file videoout_xv.h.

virtual bool VideoOutputXv::hasIDCTAcceleration ( void   )  const [inline, virtual]

Returns true iff Inverse Discrete Cosine Transform acceleration is available.

Reimplemented from VideoOutput.

Definition at line 99 of file videoout_xv.h.

virtual bool VideoOutputXv::hasVLDAcceleration ( void   )  const [inline, virtual]

Returns true iff VLD acceleration is available.

Reimplemented from VideoOutput.

Definition at line 101 of file videoout_xv.h.

Referenced by DrawSlice(), and ShowXvMC().

void VideoOutputXv::CheckFrameStates ( void   )  [virtual]

Reimplemented from VideoOutput.

Definition at line 3883 of file videoout_xv.cpp.

Referenced by DiscardFrames(), DoneDisplayingFrame(), ProcessFrameXvMC(), ShowXvMC(), and UpdatePauseFrame().

QRect VideoOutputXv::GetPIPRect ( int  location,
NuppelVideoPlayer pipplayer = NULL 
) [virtual]

returns QRect of PIP based on PIPLocation

Reimplemented from VideoOutput.

Definition at line 4071 of file videoout_xv.cpp.

Referenced by ShowPip().

void VideoOutputXv::ShutdownVideoResize ( void   )  [virtual]

Reimplemented from VideoOutput.

Definition at line 4132 of file videoout_xv.cpp.

MythCodecID VideoOutputXv::GetBestSupportedCodec ( uint  width,
uint  height,
uint  osd_width,
uint  osd_height,
uint  stream_type,
int  xvmc_chroma,
bool  test_surface,
bool  force_xv 
) [static]

Returns:
MythCodecID for the best supported codec on the main display.

Definition at line 1263 of file videoout_xv.cpp.

Referenced by AvFormatDecoder::ScanStreams().

int VideoOutputXv::GrabSuitableXvPort ( Display *  disp,
Window  root,
MythCodecID  mcodecid,
uint  width,
uint  height,
int  xvmc_chroma = 0,
XvMCSurfaceInfo xvmc_surf_info = NULL,
QString *  adaptor_name = NULL 
) [static]

Internal function used to grab a XVideo port with the desired properties.

Returns:
port number if it succeeds, else -1.

Definition at line 568 of file videoout_xv.cpp.

Referenced by GetBestSupportedCodec(), InitXVideo(), and InitXvMC().

XvMCContext * VideoOutputXv::CreateXvMCContext ( Display *  disp,
int  port,
int  surf_type,
int  width,
int  height 
) [static]

Definition at line 1858 of file videoout_xv.cpp.

Referenced by CreateXvMCBuffers(), and GetBestSupportedCodec().

void VideoOutputXv::DeleteXvMCContext ( Display *  disp,
XvMCContext *&  ctx 
) [static]

Definition at line 1882 of file videoout_xv.cpp.

Referenced by DeleteBuffers(), and GetBestSupportedCodec().

QStringList VideoOutputXv::GetAllowedRenderers ( MythCodecID  myth_codec_id,
const QSize &  video_dim 
) [static]

Definition at line 4193 of file videoout_xv.cpp.

Referenced by VideoOutput::Create().

VOSType VideoOutputXv::VideoOutputSubType (  )  const [inline, private]

QRect VideoOutputXv::GetVisibleOSDBounds ( float &  visible_aspect,
float &  font_scaling,
float  themeaspect 
) const [private, virtual]

Reimplemented from VideoOutput.

Definition at line 298 of file videoout_xv.cpp.

QRect VideoOutputXv::GetTotalOSDBounds ( void   )  const [private, virtual]

Returns total OSD bounds.

Reimplemented from VideoOutput.

Definition at line 317 of file videoout_xv.cpp.

Referenced by DisplayOSD(), and InitOSD().

VideoFrame * VideoOutputXv::GetNextFreeFrame ( bool  allow_unsafe  )  [private]

Definition at line 2404 of file videoout_xv.cpp.

void VideoOutputXv::DiscardFrame ( VideoFrame frame  )  [private, virtual]

Frame is ready to be reused by decoder added to the done or available list.

Parameters:
frame to discard.

Reimplemented from VideoOutput.

Definition at line 2416 of file videoout_xv.cpp.

Referenced by DoneDisplayingFrame(), ProcessFrameXvMC(), ShowXvMC(), and UpdatePauseFrame().

void VideoOutputXv::DiscardFrames ( bool  kf  )  [private, virtual]

Releases all frames not being actively displayed from any queue onto the queue of frames ready for decoding onto.

Reimplemented from VideoOutput.

Definition at line 2492 of file videoout_xv.cpp.

Referenced by ClearAfterSeek(), and DeleteBuffers().

void VideoOutputXv::DoneDisplayingFrame ( void   )  [private, virtual]

This is used to tell this class that the NPV will not call Show() on this frame again.

If the frame is not referenced elsewhere or all frames referencing it are done rendering this removes last displayed frame from used queue and adds it to the available list. If the frame is still being used then it adds it to a special done displaying list that is checked when more frames are needed than in the available list.

Reimplemented from VideoOutput.

Definition at line 2582 of file videoout_xv.cpp.

void VideoOutputXv::ProcessFrameXvMC ( VideoFrame frame,
OSD osd 
) [private]

Definition at line 3462 of file videoout_xv.cpp.

Referenced by ProcessFrame().

void VideoOutputXv::ProcessFrameOpenGL ( VideoFrame frame,
OSD osd,
FilterChain filterList,
NuppelVideoPlayer pipPlayer 
) [private]

Definition at line 3662 of file videoout_xv.cpp.

Referenced by ProcessFrame().

void VideoOutputXv::ProcessFrameMem ( VideoFrame frame,
OSD osd,
FilterChain filterList,
NuppelVideoPlayer pipPlayer 
) [private]

Definition at line 3709 of file videoout_xv.cpp.

Referenced by ProcessFrame().

void VideoOutputXv::PrepareFrameXvMC ( VideoFrame frame,
FrameScanType  scan 
) [private]

Definition at line 2611 of file videoout_xv.cpp.

Referenced by CopyFrame(), and PrepareFrame().

void VideoOutputXv::PrepareFrameXv ( VideoFrame frame  )  [private]

Definition at line 2652 of file videoout_xv.cpp.

Referenced by PrepareFrame().

void VideoOutputXv::PrepareFrameOpenGL ( VideoFrame buffer,
FrameScanType  t 
) [private]

Definition at line 2670 of file videoout_xv.cpp.

Referenced by PrepareFrame().

void VideoOutputXv::PrepareFrameMem ( VideoFrame buffer,
FrameScanType   
) [private]

Definition at line 2706 of file videoout_xv.cpp.

Referenced by PrepareFrame().

void VideoOutputXv::ShowXvMC ( FrameScanType  scan  )  [private]

Definition at line 2903 of file videoout_xv.cpp.

Referenced by Show().

void VideoOutputXv::ShowXVideo ( FrameScanType  scan  )  [private]

Definition at line 3001 of file videoout_xv.cpp.

Referenced by Show().

void VideoOutputXv::ShowPip ( VideoFrame frame,
NuppelVideoPlayer pipplayer 
) [private, virtual]

Composites PiP image onto a video frame.

Note: This only works with memory backed VideoFrames, that is not XvMC.

Parameters:
frame Frame to composite PiP onto.
pipplayer Picture-in-Picture NVP.

Reimplemented from VideoOutput.

Definition at line 3072 of file videoout_xv.cpp.

Referenced by ProcessFrameMem(), and ProcessFrameOpenGL().

int VideoOutputXv::DisplayOSD ( VideoFrame frame,
OSD osd,
int  stride = -1,
int  revision = -1 
) [private, virtual]

If the OSD has changed, this will convert the OSD buffer to the OSDSurface's color format.

If the destination format is either IA44 or AI44 the osd is converted to greyscale.

Returns:
1 if changed, -1 on error and 0 otherwise

Reimplemented from VideoOutput.

Definition at line 4152 of file videoout_xv.cpp.

Referenced by ProcessFrameMem(), ProcessFrameOpenGL(), and ProcessFrameXvMC().

void VideoOutputXv::ResizeForVideo ( uint  width,
uint  height 
) [private]

Sets display parameters based on video resolution.

If we are using DisplayRes support we use the video size to determine the desired screen size and refresh rate. If we are also not using "GuiSizeForTV" we also resize the video output window.

Parameters:
width,height Resolution of the video we will be playing

Definition at line 403 of file videoout_xv.cpp.

void VideoOutputXv::InitDisplayMeasurements ( uint  width,
uint  height 
) [private]

Init display measurements based on database settings and actual screen parameters.

Definition at line 446 of file videoout_xv.cpp.

Referenced by Init().

void VideoOutputXv::InitColorKey ( bool  turnoffautopaint  )  [private]

Initializes color keying support used by XVideo output methods.

Parameters:
turnoffautopaint turn off or on XV_AUTOPAINT_COLORKEY property.

Definition at line 1638 of file videoout_xv.cpp.

Referenced by InitSetupBuffers().

bool VideoOutputXv::InitVideoBuffers ( MythCodecID  mcodecid,
bool  use_xv,
bool  use_shm,
bool  use_opengl 
) [private]

Creates and initializes video buffers.

Side Effects:
sets video_output_subtype if it succeeds.
Bug:
Extra buffers are pre-allocated here for XVMC_VLD due to a bug somewhere else, see comment in code.
Returns:
success or failure at creating any buffers.

Definition at line 855 of file videoout_xv.cpp.

Referenced by InitSetupBuffers().

bool VideoOutputXv::InitXvMC ( MythCodecID  mcodecid  )  [private]

Creates and initializes video buffers.

Side Effects:
sets video_output_subtype if it succeeds.
Returns:
success or failure at creating any buffers.

Definition at line 1014 of file videoout_xv.cpp.

Referenced by InitVideoBuffers().

bool VideoOutputXv::InitXVideo ( void   )  [private]

Creates and initializes video buffers.

Side Effects:
sets video_output_subtype if it succeeds.
Returns:
success or failure at creating any buffers.

Definition at line 1097 of file videoout_xv.cpp.

Referenced by InitVideoBuffers().

bool VideoOutputXv::InitOpenGL ( void   )  [private]

Definition at line 914 of file videoout_xv.cpp.

Referenced by InitVideoBuffers().

bool VideoOutputXv::InitXShm ( void   )  [private]

Creates and initializes video buffers.

Side Effects:
sets video_output_subtype if it succeeds.
Returns:
success or failure at creating any buffers.

Definition at line 1198 of file videoout_xv.cpp.

Referenced by InitVideoBuffers().

bool VideoOutputXv::InitXlib ( void   )  [private]

Creates and initializes video buffers.

Side Effects:
sets video_output_subtype if it succeeds.
Returns:
success or failure at creating any buffers.

Definition at line 1233 of file videoout_xv.cpp.

Referenced by InitVideoBuffers().

bool VideoOutputXv::InitOSD ( const QString &  osd_renderer  )  [private]

Definition at line 1369 of file videoout_xv.cpp.

Referenced by InitSetupBuffers().

bool VideoOutputXv::CheckOSDInit ( void   )  [private]

Definition at line 1443 of file videoout_xv.cpp.

Referenced by InitSetupBuffers().

bool VideoOutputXv::CreateXvMCBuffers ( void   )  [private]

Definition at line 1895 of file videoout_xv.cpp.

Referenced by CreateBuffers(), and InitXvMC().

bool VideoOutputXv::CreateBuffers ( VOSType  subtype  )  [private]

Definition at line 2171 of file videoout_xv.cpp.

Referenced by InitOpenGL(), InitXlib(), InitXShm(), InitXVideo(), and InputChanged().

vector< void * > VideoOutputXv::CreateXvMCSurfaces ( uint  num,
bool  surface_has_vld 
) [private]

Definition at line 1946 of file videoout_xv.cpp.

Referenced by CreateXvMCBuffers().

vector< unsigned char * > VideoOutputXv::CreateShmImages ( uint  num,
bool  use_xv 
) [private]

Creates Shared Memory Images.

Each XvImage/XImage created is added to xv_buffers, and shared memory info is added to XJ_shm_infos.

Parameters:
num number of buffers to create
use_xv use XvShmCreateImage instead of XShmCreateImage
Returns:
vector containing image data for each buffer created

Definition at line 2039 of file videoout_xv.cpp.

Referenced by CreateBuffers().

void VideoOutputXv::CreatePauseFrame ( VOSType  subtype  )  [private]

Creates an extra frame for pause.

This creates a pause frame by copies the scratch frame settings, a and allocating a databuffer, so a scratch must already exist. XvMC does not use this pause frame facility so this only creates a pause buffer for the other output methods.

Side Effects:
sets av_pause_frame.

Definition at line 816 of file videoout_xv.cpp.

Referenced by CreateBuffers().

void VideoOutputXv::CopyFrame ( VideoFrame to,
const VideoFrame from 
) [private]

Copies frame data from one VideoFrame to another.

Note: The frames must have the same width, height, and format.

Parameters:
to The destination frame.
from The source frame

Reimplemented from VideoOutput.

Definition at line 3353 of file videoout_xv.cpp.

Referenced by ProcessFrameMem(), ProcessFrameOpenGL(), and UpdatePauseFrame().

void VideoOutputXv::DeleteBuffers ( VOSType  subtype,
bool  delete_pause_frame 
) [private]

bool VideoOutputXv::InitSetupBuffers ( void   )  [private]

Definition at line 1501 of file videoout_xv.cpp.

Referenced by Init(), and InputChanged().

bool VideoOutputXv::IsDisplaying ( VideoFrame frame  )  [static, private]

Definition at line 3977 of file videoout_xv.cpp.

Referenced by CheckFrameStates(), and DiscardFrame().

bool VideoOutputXv::IsRendering ( VideoFrame frame  )  [static, private]

Definition at line 3999 of file videoout_xv.cpp.

Referenced by CheckFrameStates(), FlushSurface(), and SyncSurface().

void VideoOutputXv::SyncSurface ( VideoFrame frame,
int  past_future = 0 
) [static, private]

void VideoOutputXv::FlushSurface ( VideoFrame frame  )  [static, private]

Definition at line 4056 of file videoout_xv.cpp.

Referenced by DrawSlice().

XvMCOSD * VideoOutputXv::GetAvailableOSD (  )  [private]

Definition at line 3621 of file videoout_xv.cpp.

Referenced by ProcessFrameXvMC().

void VideoOutputXv::ReturnAvailableOSD ( XvMCOSD avail  )  [private]

Definition at line 3647 of file videoout_xv.cpp.

Referenced by ProcessFrameXvMC().

bool VideoOutputXv::SetDeinterlacingEnabledOpenGL ( bool  enable  )  [private]

Definition at line 1725 of file videoout_xv.cpp.

Referenced by SetDeinterlacingEnabled().

bool VideoOutputXv::SetupDeinterlaceOpenGL ( bool  interlaced,
const QString &  overridefilter 
) [private]

Definition at line 1767 of file videoout_xv.cpp.

Referenced by SetupDeinterlace().


Friends And Related Function Documentation

friend class ChromaKeyOSD [friend]

Definition at line 55 of file videoout_xv.h.

Referenced by InitOSD().

friend class OpenGLVideoSync [friend]

Definition at line 56 of file videoout_xv.h.

friend class XvMCOSD [friend]

Definition at line 57 of file videoout_xv.h.

Referenced by CreateXvMCBuffers().


Member Data Documentation

Definition at line 204 of file videoout_xv.h.

Referenced by InitSetupBuffers(), InitVideoBuffers(), and InputChanged().

QMutex VideoOutputXv::global_lock [private]

Window VideoOutputXv::XJ_root [private]

Definition at line 210 of file videoout_xv.h.

Referenced by Init(), InitXVideo(), and InitXvMC().

Window VideoOutputXv::XJ_win [private]

Window VideoOutputXv::XJ_curwin [private]

GC VideoOutputXv::XJ_gc [private]

Definition at line 213 of file videoout_xv.h.

Referenced by DrawUnusedRects(), Init(), PrepareFrameMem(), ShowXVideo(), and ~VideoOutputXv().

Screen* VideoOutputXv::XJ_screen [private]

Definition at line 214 of file videoout_xv.h.

Referenced by Init().

Display* VideoOutputXv::XJ_disp [private]

unsigned long VideoOutputXv::XJ_white [private]

Definition at line 217 of file videoout_xv.h.

Referenced by Init().

unsigned long VideoOutputXv::XJ_black [private]

Definition at line 218 of file videoout_xv.h.

Referenced by Init(), and ~VideoOutputXv().

unsigned long VideoOutputXv::XJ_letterbox_colour [private]

Definition at line 219 of file videoout_xv.h.

Referenced by DrawUnusedRects(), and Init().

int VideoOutputXv::XJ_depth [private]

Definition at line 221 of file videoout_xv.h.

Referenced by InitDisplayMeasurements().

Definition at line 222 of file videoout_xv.h.

Referenced by InitDisplayMeasurements().

Definition at line 223 of file videoout_xv.h.

Referenced by InitDisplayMeasurements().

Definition at line 224 of file videoout_xv.h.

Referenced by InitDisplayMeasurements().

Definition at line 225 of file videoout_xv.h.

Referenced by GetRefreshRate(), Init(), and ~VideoOutputXv().

vector<XShmSegmentInfo*> VideoOutputXv::XJ_shm_infos [private]

Definition at line 229 of file videoout_xv.h.

Referenced by CreateShmImages(), and DeleteBuffers().

Definition at line 230 of file videoout_xv.h.

Referenced by CreateBuffers(), CreateShmImages(), and DeleteBuffers().

XImage* VideoOutputXv::XJ_non_xv_image [private]

Definition at line 233 of file videoout_xv.h.

Referenced by CreateBuffers(), DeleteBuffers(), and PrepareFrameMem().

Definition at line 234 of file videoout_xv.h.

Referenced by PrepareFrameMem().

Definition at line 235 of file videoout_xv.h.

Referenced by PrepareFrameMem().

Definition at line 236 of file videoout_xv.h.

Referenced by PrepareFrameMem().

Definition at line 237 of file videoout_xv.h.

Referenced by CreateBuffers(), and PrepareFrameMem().

Definition at line 238 of file videoout_xv.h.

Referenced by PrepareFrameMem().

Definition at line 242 of file videoout_xv.h.

Referenced by CreateXvMCSurfaces(), and InitXvMC().

XvMCContext* VideoOutputXv::xvmc_ctx [private]

vector<void*> VideoOutputXv::xvmc_surfs [private]

Definition at line 244 of file videoout_xv.h.

Referenced by ClearAfterSeek(), CreateXvMCBuffers(), and DeleteBuffers().

QMutex VideoOutputXv::xvmc_osd_lock [private]

Definition at line 248 of file videoout_xv.h.

Referenced by CreateXvMCBuffers(), and InitXvMC().

int VideoOutputXv::xv_port [private]

Definition at line 256 of file videoout_xv.h.

Referenced by InitXVideo(), InitXvMC(), and SetPictureAttribute().

Definition at line 257 of file videoout_xv.h.

Referenced by CheckOSDInit(), DrawUnusedRects(), InitColorKey(), and ChromaKeyOSD::Reinit().

Definition at line 258 of file videoout_xv.h.

Referenced by DrawUnusedRects(), and InitColorKey().

int VideoOutputXv::xv_chroma [private]

Definition at line 259 of file videoout_xv.h.

Referenced by CreatePauseFrame(), CreateShmImages(), InitXVideo(), and InputChanged().

Definition at line 261 of file videoout_xv.h.

Referenced by DrawUnusedRects(), SetDeinterlacingEnabled(), and Show().

Definition at line 262 of file videoout_xv.h.

Referenced by InitPictureAttributes(), and SetPictureAttribute().

Definition at line 263 of file videoout_xv.h.

Referenced by InitPictureAttributes(), and SetPictureAttribute().

Definition at line 269 of file videoout_xv.h.

Referenced by DeleteBuffers(), PrepareFrameOpenGL(), and ShowPip().

Definition at line 272 of file videoout_xv.h.

Referenced by DeleteBuffers(), PrepareFrameOpenGL(), and ShowPip().

Definition at line 273 of file videoout_xv.h.

Referenced by DeleteBuffers(), DisplayOSD(), and PrepareFrameOpenGL().


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

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