VideoOutputVDPAU Class Reference

#include <videoout_vdpau.h>

Inheritance diagram for VideoOutputVDPAU:
VideoOutput

List of all members.

Public Member Functions

 VideoOutputVDPAU ()
 ~VideoOutputVDPAU ()
bool Init (int width, int height, float aspect, WId winid, const QRect &win_rect, MythCodecID codec_id)
bool SetDeinterlacingEnabled (bool interlaced)
 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 bobdeint filter for XVideo and otherwise defers to VideoOutput::ApproveDeintFilter(const QString&).
void ProcessFrame (VideoFrame *frame, OSD *osd, FilterChain *filterList, const PIPMap &pipPlayers, FrameScanType scan)
void PrepareFrame (VideoFrame *, FrameScanType, OSD *osd)
void DrawSlice (VideoFrame *, int x, int y, int w, int h)
 Informs video output of new data for frame, used for hardware accelerated decoding.
void Show (FrameScanType)
void ClearAfterSeek (void)
 Tells video output to toss decoded buffers due to a seek.
bool InputChanged (const QSize &input_size, float aspect, MythCodecID av_codec_id, void *codec_private, bool &aspect_only)
 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 (const QRect &rect)
 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 MoveResizeWindow (QRect new_rect)
void DrawUnusedRects (bool sync=true)
 Draws non-video portions of the screen.
void UpdatePauseFrame (int64_t &disp_timecode)
 Updates frame displayed when video is paused.
int SetPictureAttribute (PictureAttribute attribute, int newValue)
 Sets a specified picture attribute.
void InitPictureAttributes (void)
virtual bool IsPIPSupported (void) const
virtual bool IsPBPSupported (void) const
virtual bool NeedExtraAudioDecode (void) const
virtual bool hasHWAcceleration (void) const
 Return true if HW Acceleration is running.
virtual MythPainterGetOSDPainter (void)
virtual bool GetScreenShot (int width=0, int height=0, QString filename="")
virtual bool CanVisualise (AudioPlayer *audio, MythRender *render)
virtual bool SetupVisualisation (AudioPlayer *audio, MythRender *render, const QString &name)
virtual QStringList GetVisualiserList (void)
virtual void ClearDummyFrame (VideoFrame *frame)
 Clears the frame to black.

Static Public Member Functions

static void GetRenderOptions (render_opts &opts)
static QStringList GetAllowedRenderers (MythCodecID myth_codec_id, const QSize &video_dim)
static MythCodecID GetBestSupportedCodec (uint width, uint height, const QString &decoder, uint stream_type, bool no_acceleration)

Private Member Functions

virtual bool hasFullScreenOSD (void) const
void TearDown (void)
bool InitRender (void)
void DeleteRender (void)
bool InitBuffers (void)
bool CreateVideoSurfaces (uint num)
void ClaimVideoSurfaces (void)
void DeleteVideoSurfaces (void)
void DeleteBuffers (void)
void RestoreDisplay (void)
void UpdateReferenceFrames (VideoFrame *frame)
bool FrameIsInUse (VideoFrame *frame)
void ClearReferenceFrames (void)
void DiscardFrame (VideoFrame *)
 Releases frame from any queue onto the queue of frames ready for decoding onto.
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 (VideoFrame *frame)
 Releases frame returned from GetLastShownFrame() onto the queue of frames ready for decoding onto.
void CheckFrameStates (void)
virtual void ShowPIP (VideoFrame *frame, MythPlayer *pipplayer, PIPLocation loc)
 Composites PiP image onto a video frame.
virtual void RemovePIP (MythPlayer *pipplayer)
bool InitPIPLayer (QSize size)
void DeinitPIPS (void)
void DeinitPIPLayer (void)
void ParseOptions (void)

Private Attributes

Window m_win
MythRenderVDPAUm_render
uint m_decoder_buffer_size
uint m_process_buffer_size
QVector< uintm_video_surfaces
QVector< uintm_reference_frames
uint m_pause_surface
bool m_need_deintrefs
uint m_video_mixer
uint m_mixer_features
bool m_checked_surface_ownership
bool m_checked_output_surfaces
uint m_decoder
int m_pix_fmt
QMutex m_lock
uint m_pip_layer
uint m_pip_surface
bool m_pip_ready
QMap< MythPlayer *, vdpauPIPm_pips
MythVDPAUPainterm_osd_painter
bool m_skip_chroma
float m_denoise
float m_sharpen
int m_colorspace

Detailed Description

Definition at line 18 of file videoout_vdpau.h.


Constructor & Destructor Documentation

VideoOutputVDPAU::VideoOutputVDPAU (  ) 

Definition at line 54 of file videoout_vdpau.cpp.

VideoOutputVDPAU::~VideoOutputVDPAU (  ) 

Definition at line 72 of file videoout_vdpau.cpp.


Member Function Documentation

void VideoOutputVDPAU::GetRenderOptions ( render_opts opts  )  [static]

Reimplemented from VideoOutput.

Definition at line 29 of file videoout_vdpau.cpp.

bool VideoOutputVDPAU::Init ( int  width,
int  height,
float  aspect,
WId  winid,
const QRect &  win_rect,
MythCodecID  codec_id 
) [virtual]

Reimplemented from VideoOutput.

Definition at line 88 of file videoout_vdpau.cpp.

Referenced by InputChanged().

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

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

Reimplemented from VideoOutput.

Definition at line 309 of file videoout_vdpau.cpp.

bool VideoOutputVDPAU::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 318 of file videoout_vdpau.cpp.

Referenced by SetDeinterlacingEnabled().

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

Approves bobdeint filter for XVideo and otherwise defers to VideoOutput::ApproveDeintFilter(const QString&).

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

Returns:
whether current video output supports a specific filter.

Reimplemented from VideoOutput.

Definition at line 373 of file videoout_vdpau.cpp.

void VideoOutputVDPAU::ProcessFrame ( VideoFrame frame,
OSD osd,
FilterChain filterList,
const PIPMap pipPlayers,
FrameScanType  scan 
) [virtual]

Implements VideoOutput.

Definition at line 378 of file videoout_vdpau.cpp.

void VideoOutputVDPAU::PrepareFrame ( VideoFrame frame,
FrameScanType  scan,
OSD osd 
) [virtual]

Implements VideoOutput.

Definition at line 405 of file videoout_vdpau.cpp.

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

Informs video output of new data for frame, used for hardware accelerated decoding.

Reimplemented from VideoOutput.

Definition at line 553 of file videoout_vdpau.cpp.

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

Implements VideoOutput.

Definition at line 686 of file videoout_vdpau.cpp.

void VideoOutputVDPAU::ClearAfterSeek ( void   )  [virtual]

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

Reimplemented from VideoOutput.

Definition at line 699 of file videoout_vdpau.cpp.

bool VideoOutputVDPAU::InputChanged ( const QSize &  input_size,
float  aspect,
MythCodecID  myth_codec_id,
void *  codec_private,
bool aspect_only 
) [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 707 of file videoout_vdpau.cpp.

void VideoOutputVDPAU::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 765 of file videoout_vdpau.cpp.

void VideoOutputVDPAU::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 772 of file videoout_vdpau.cpp.

Referenced by InputChanged().

void VideoOutputVDPAU::EmbedInWidget ( const QRect &  rect  )  [virtual]

Tells video output to embed video in an existing window.

See also:
StopEmbedding()

Reimplemented from VideoOutput.

Definition at line 778 of file videoout_vdpau.cpp.

Referenced by InputChanged().

void VideoOutputVDPAU::StopEmbedding ( void   )  [virtual]

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

See also:
EmbedInWidget(const QRect&)

Reimplemented from VideoOutput.

Definition at line 789 of file videoout_vdpau.cpp.

Referenced by InputChanged().

void VideoOutputVDPAU::MoveResizeWindow ( QRect  new_rect  )  [virtual]

Implements VideoOutput.

Definition at line 798 of file videoout_vdpau.cpp.

void VideoOutputVDPAU::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 806 of file videoout_vdpau.cpp.

Referenced by Show().

void VideoOutputVDPAU::UpdatePauseFrame ( int64_t disp_timecode  )  [virtual]

Updates frame displayed when video is paused.

Implements VideoOutput.

Definition at line 820 of file videoout_vdpau.cpp.

int VideoOutputVDPAU::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 892 of file videoout_vdpau.cpp.

void VideoOutputVDPAU::InitPictureAttributes ( void   )  [virtual]

Reimplemented from VideoOutput.

Definition at line 859 of file videoout_vdpau.cpp.

Referenced by Init().

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

Definition at line 906 of file videoout_vdpau.cpp.

Referenced by VideoOutput::Create().

MythCodecID VideoOutputVDPAU::GetBestSupportedCodec ( uint  width,
uint  height,
const QString &  decoder,
uint  stream_type,
bool  no_acceleration 
) [static]

Definition at line 920 of file videoout_vdpau.cpp.

Referenced by AvFormatDecoder::ScanStreams().

virtual bool VideoOutputVDPAU::IsPIPSupported ( void   )  const [inline, virtual]

Reimplemented from VideoOutput.

Definition at line 57 of file videoout_vdpau.h.

virtual bool VideoOutputVDPAU::IsPBPSupported ( void   )  const [inline, virtual]

Reimplemented from VideoOutput.

Definition at line 58 of file videoout_vdpau.h.

virtual bool VideoOutputVDPAU::NeedExtraAudioDecode ( void   )  const [inline, virtual]

Reimplemented from VideoOutput.

Definition at line 59 of file videoout_vdpau.h.

virtual bool VideoOutputVDPAU::hasHWAcceleration ( void   )  const [inline, virtual]

Return true if HW Acceleration is running.

Reimplemented from VideoOutput.

Definition at line 61 of file videoout_vdpau.h.

MythPainter * VideoOutputVDPAU::GetOSDPainter ( void   )  [virtual]

Reimplemented from VideoOutput.

Definition at line 1293 of file videoout_vdpau.cpp.

bool VideoOutputVDPAU::GetScreenShot ( int  width = 0,
int  height = 0,
QString  filename = "" 
) [virtual]

Reimplemented from VideoOutput.

Definition at line 1298 of file videoout_vdpau.cpp.

virtual bool VideoOutputVDPAU::CanVisualise ( AudioPlayer audio,
MythRender render 
) [inline, virtual]

Reimplemented from VideoOutput.

Definition at line 67 of file videoout_vdpau.h.

virtual bool VideoOutputVDPAU::SetupVisualisation ( AudioPlayer audio,
MythRender render,
const QString &  name 
) [inline, virtual]

Reimplemented from VideoOutput.

Definition at line 69 of file videoout_vdpau.h.

QStringList VideoOutputVDPAU::GetVisualiserList ( void   )  [virtual]

Reimplemented from VideoOutput.

Definition at line 1305 of file videoout_vdpau.cpp.

void VideoOutputVDPAU::ClearDummyFrame ( VideoFrame frame  )  [virtual]

Clears the frame to black.

Subclasses may choose to mark the frame as a dummy and act appropriately

Reimplemented from VideoOutput.

Definition at line 393 of file videoout_vdpau.cpp.

virtual bool VideoOutputVDPAU::hasFullScreenOSD ( void   )  const [inline, private, virtual]

Reimplemented from VideoOutput.

Definition at line 76 of file videoout_vdpau.h.

void VideoOutputVDPAU::TearDown ( void   )  [private]

Definition at line 78 of file videoout_vdpau.cpp.

Referenced by Init(), InputChanged(), and ~VideoOutputVDPAU().

bool VideoOutputVDPAU::InitRender ( void   )  [private]

Definition at line 124 of file videoout_vdpau.cpp.

Referenced by Init().

void VideoOutputVDPAU::DeleteRender ( void   )  [private]

Definition at line 152 of file videoout_vdpau.cpp.

Referenced by TearDown().

bool VideoOutputVDPAU::InitBuffers ( void   )  [private]

Definition at line 174 of file videoout_vdpau.cpp.

Referenced by Init().

bool VideoOutputVDPAU::CreateVideoSurfaces ( uint  num  )  [private]

Definition at line 244 of file videoout_vdpau.cpp.

Referenced by InitBuffers().

void VideoOutputVDPAU::ClaimVideoSurfaces ( void   )  [private]

Definition at line 542 of file videoout_vdpau.cpp.

Referenced by DrawSlice(), and ProcessFrame().

void VideoOutputVDPAU::DeleteVideoSurfaces ( void   )  [private]

Definition at line 269 of file videoout_vdpau.cpp.

Referenced by DeleteBuffers().

void VideoOutputVDPAU::DeleteBuffers ( void   )  [private]

Definition at line 279 of file videoout_vdpau.cpp.

Referenced by InitBuffers(), and TearDown().

void VideoOutputVDPAU::RestoreDisplay ( void   )  [private]

Definition at line 292 of file videoout_vdpau.cpp.

Referenced by TearDown().

void VideoOutputVDPAU::UpdateReferenceFrames ( VideoFrame frame  )  [private]

Definition at line 938 of file videoout_vdpau.cpp.

Referenced by PrepareFrame().

bool VideoOutputVDPAU::FrameIsInUse ( VideoFrame frame  )  [private]

Definition at line 955 of file videoout_vdpau.cpp.

Referenced by CheckFrameStates(), and DiscardFrame().

void VideoOutputVDPAU::ClearReferenceFrames ( void   )  [private]

Definition at line 967 of file videoout_vdpau.cpp.

Referenced by DiscardFrames(), PrepareFrame(), and SetupDeinterlace().

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

Releases frame from any queue onto the queue of frames ready for decoding onto.

Reimplemented from VideoOutput.

Definition at line 974 of file videoout_vdpau.cpp.

Referenced by DoneDisplayingFrame().

void VideoOutputVDPAU::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 989 of file videoout_vdpau.cpp.

Referenced by ClearAfterSeek(), and DeleteBuffers().

void VideoOutputVDPAU::DoneDisplayingFrame ( VideoFrame frame  )  [private, virtual]

Releases frame returned from GetLastShownFrame() onto the queue of frames ready for decoding onto.

Reimplemented from VideoOutput.

Definition at line 1002 of file videoout_vdpau.cpp.

void VideoOutputVDPAU::CheckFrameStates ( void   )  [private, virtual]

Reimplemented from VideoOutput.

Definition at line 1011 of file videoout_vdpau.cpp.

Referenced by DiscardFrames(), DoneDisplayingFrame(), and Show().

void VideoOutputVDPAU::ShowPIP ( VideoFrame frame,
MythPlayer pipplayer,
PIPLocation  loc 
) [private, virtual]

Composites PiP image onto a video frame.

Note: This only works with memory backed VideoFrames.

Parameters:
frame Frame to composite PiP onto.
pipplayer Picture-in-Picture Player.
loc Location of this PiP on the frame.

Reimplemented from VideoOutput.

Definition at line 1087 of file videoout_vdpau.cpp.

void VideoOutputVDPAU::RemovePIP ( MythPlayer pipplayer  )  [private, virtual]

Reimplemented from VideoOutput.

Definition at line 1179 of file videoout_vdpau.cpp.

Referenced by DeinitPIPS(), and ShowPIP().

bool VideoOutputVDPAU::InitPIPLayer ( QSize  size  )  [private]

Definition at line 1042 of file videoout_vdpau.cpp.

Referenced by ShowPIP().

void VideoOutputVDPAU::DeinitPIPS ( void   )  [private]

Definition at line 1056 of file videoout_vdpau.cpp.

Referenced by TearDown().

void VideoOutputVDPAU::DeinitPIPLayer ( void   )  [private]

Definition at line 1067 of file videoout_vdpau.cpp.

Referenced by RemovePIP(), and TearDown().

void VideoOutputVDPAU::ParseOptions ( void   )  [private]

Definition at line 1197 of file videoout_vdpau.cpp.

Referenced by Init().


Member Data Documentation

Window VideoOutputVDPAU::m_win [private]

Definition at line 102 of file videoout_vdpau.h.

Referenced by Init(), InitRender(), and InputChanged().

Definition at line 105 of file videoout_vdpau.h.

Referenced by DrawSlice(), InitBuffers(), and ParseOptions().

Definition at line 106 of file videoout_vdpau.h.

Referenced by DrawSlice(), InitBuffers(), and ParseOptions().

Definition at line 109 of file videoout_vdpau.h.

Referenced by InitBuffers(), PrepareFrame(), and UpdatePauseFrame().

Definition at line 110 of file videoout_vdpau.h.

Referenced by PrepareFrame(), and SetupDeinterlace().

Definition at line 112 of file videoout_vdpau.h.

Referenced by InitBuffers(), and ParseOptions().

Definition at line 113 of file videoout_vdpau.h.

Referenced by ClaimVideoSurfaces(), DeleteBuffers(), DrawSlice(), and ProcessFrame().

Definition at line 114 of file videoout_vdpau.h.

Referenced by DeleteRender(), and PrepareFrame().

Definition at line 116 of file videoout_vdpau.h.

Referenced by DeleteRender(), DrawSlice(), and PrepareFrame().

Definition at line 117 of file videoout_vdpau.h.

Referenced by DeleteRender(), and DrawSlice().

QMutex VideoOutputVDPAU::m_lock [private]

Definition at line 121 of file videoout_vdpau.h.

Referenced by DeinitPIPLayer(), InitPIPLayer(), and PrepareFrame().

Definition at line 122 of file videoout_vdpau.h.

Referenced by DeinitPIPLayer(), InitPIPLayer(), and ShowPIP().

Definition at line 123 of file videoout_vdpau.h.

Referenced by DeinitPIPLayer(), DeinitPIPS(), PrepareFrame(), ProcessFrame(), and ShowPIP().

Definition at line 124 of file videoout_vdpau.h.

Referenced by DeinitPIPS(), RemovePIP(), and ShowPIP().

Definition at line 126 of file videoout_vdpau.h.

Referenced by DeleteRender(), GetOSDPainter(), InitRender(), and PrepareFrame().

Definition at line 128 of file videoout_vdpau.h.

Referenced by InitBuffers(), and ParseOptions().

float VideoOutputVDPAU::m_denoise [private]

Definition at line 129 of file videoout_vdpau.h.

Referenced by InitBuffers(), and ParseOptions().

float VideoOutputVDPAU::m_sharpen [private]

Definition at line 130 of file videoout_vdpau.h.

Referenced by InitBuffers(), and ParseOptions().

Definition at line 131 of file videoout_vdpau.h.

Referenced by InitPictureAttributes(), and ParseOptions().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon May 28 06:42:32 2012 for MythTV by  doxygen 1.6.3