VideoOutputNullVDPAU Class Reference

A dummy video class that uses VDPAU to decode video frames. More...

#include <videoout_nullvdpau.h>

Inheritance diagram for VideoOutputNullVDPAU:
VideoOutput

List of all members.

Public Member Functions

 VideoOutputNullVDPAU ()
 ~VideoOutputNullVDPAU ()
virtual bool Init (int width, int height, float aspect, WId winid, const QRect &win_rect, MythCodecID codec_id)
virtual 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.
virtual bool SetupDeinterlace (bool, const QString &ovrf="")
 Attempts to enable or disable deinterlacing.
virtual bool SetDeinterlacingEnabled (bool)
 Attempts to enable/disable deinterlacing using existing deinterlace method when enabling.
virtual bool ApproveDeintFilter (const QString &filtername) const
 Approves bobdeint filter for XVideo and otherwise defers to VideoOutput::ApproveDeintFilter(const QString&).
virtual void ClearAfterSeek (void)
 Tells video output to toss decoded buffers due to a seek.
virtual void ReleaseFrame (VideoFrame *frame)
 Releases a frame from the ready for decoding queue onto the queue of frames ready for display.
virtual void ProcessFrame (VideoFrame *frame, OSD *osd, FilterChain *filterList, const PIPMap &pipPlayers, FrameScanType scan)
virtual void PrepareFrame (VideoFrame *buffer, FrameScanType, OSD *osd)
virtual void Show (FrameScanType)
virtual void Zoom (ZoomDirection direction)
 Sets up zooming into to different parts of the video, the zoom is actually applied in MoveResize().
virtual void EmbedInWidget (const QRect &rect)
 Tells video output to embed video in an existing window.
virtual void StopEmbedding (void)
 Tells video output to stop embedding video in an existing window.
virtual void DrawUnusedRects (bool sync=true)
 Draws non-video portions of the screen.
virtual void UpdatePauseFrame (int64_t &disp_timecode)
 Updates frame displayed when video is paused.
virtual void MoveResizeWindow (QRect)
virtual bool CanVisualise (AudioPlayer *audio, MythRender *render)
virtual bool SetupVisualisation (AudioPlayer *audio, MythRender *render, const QString &name)
virtual MythPainterGetOSDPainter (void)
virtual void DrawSlice (VideoFrame *frame, int x, int y, int w, int h)
 Informs video output of new data for frame, used for hardware accelerated decoding.
virtual VideoFrameGetLastDecodedFrame (void)
virtual VideoFrameGetLastShownFrame (void)
 Returns frame from the head of the ready to be displayed queue, if StartDisplayingFrame has been called.
virtual void DoneDisplayingFrame (VideoFrame *frame)
 Releases frame returned from GetLastShownFrame() onto the queue of frames ready for decoding onto.

Static Public Member Functions

static void GetRenderOptions (render_opts &opts)
static QStringList GetAllowedRenderers (MythCodecID myth_codec_id)

Private Member Functions

void TearDown (void)
bool InitRender (void)
void DeleteRender (void)
bool InitBuffers (void)
void DeleteBuffers (void)
bool InitShadowBuffers (void)
void DeleteShadowBuffers (void)
bool CreateVideoSurfaces (uint num)
void DeleteVideoSurfaces (void)
void ClaimVideoSurfaces (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 CheckFrameStates (void)
bool BufferSizeCheck (void)

Private Attributes

MythRenderVDPAUm_render
QMutex m_lock
uint m_decoder
int m_pix_fmt
uint m_decoder_buffer_size
QVector< uintm_video_surfaces
bool m_checked_surface_ownership
VideoBuffersm_shadowBuffers
QSize m_surfaceSize

Detailed Description

A dummy video class that uses VDPAU to decode video frames.

The normal VDPAU frames are held in vbuffers and a 'shadow' set of buffers is held in m_shadowBuffers. These are allocated a buffer in main memory.

GetNextFreeFrame() will always return a pointer to a GPU backed buffer.

ReleaseFrame() musted be called with a pointer to a GPU buffer and when invoked (i.e. once decoding is finished) the contents of the GPU buffer are copied to the main memory buffer.

GetLastDecodedFrame() and GetLastShownFrame() will always return a pointer to the frame in main memory.

DoneDisplayingFrame() and DiscardFrame() can be called with either version of the frame.

All buffer state tracking is handled in the main vbuffers object.

Definition at line 30 of file videoout_nullvdpau.h.


Constructor & Destructor Documentation

VideoOutputNullVDPAU::VideoOutputNullVDPAU (  ) 

Definition at line 26 of file videoout_nullvdpau.cpp.

VideoOutputNullVDPAU::~VideoOutputNullVDPAU (  ) 

Definition at line 34 of file videoout_nullvdpau.cpp.


Member Function Documentation

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

Reimplemented from VideoOutput.

Definition at line 8 of file videoout_nullvdpau.cpp.

QStringList VideoOutputNullVDPAU::GetAllowedRenderers ( MythCodecID  myth_codec_id  )  [static]

Definition at line 555 of file videoout_nullvdpau.cpp.

Referenced by VideoOutput::Create().

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

Reimplemented from VideoOutput.

Definition at line 47 of file videoout_nullvdpau.cpp.

Referenced by InputChanged().

bool VideoOutputNullVDPAU::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 519 of file videoout_nullvdpau.cpp.

virtual bool VideoOutputNullVDPAU::SetupDeinterlace ( bool  i,
const QString &  ovrf = "" 
) [inline, 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 45 of file videoout_nullvdpau.h.

virtual bool VideoOutputNullVDPAU::SetDeinterlacingEnabled ( bool  enable  )  [inline, virtual]

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

Reimplemented from VideoOutput.

Definition at line 46 of file videoout_nullvdpau.h.

virtual bool VideoOutputNullVDPAU::ApproveDeintFilter ( const QString &  filtername  )  const [inline, 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 47 of file videoout_nullvdpau.h.

void VideoOutputNullVDPAU::ClearAfterSeek ( void   )  [virtual]

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

Reimplemented from VideoOutput.

Definition at line 375 of file videoout_nullvdpau.cpp.

void VideoOutputNullVDPAU::ReleaseFrame ( VideoFrame frame  )  [virtual]

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

Reimplemented from VideoOutput.

Definition at line 470 of file videoout_nullvdpau.cpp.

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

Implements VideoOutput.

Definition at line 50 of file videoout_nullvdpau.h.

virtual void VideoOutputNullVDPAU::PrepareFrame ( VideoFrame buffer,
FrameScanType  ,
OSD osd 
) [inline, virtual]

Implements VideoOutput.

Definition at line 54 of file videoout_nullvdpau.h.

virtual void VideoOutputNullVDPAU::Show ( FrameScanType   )  [inline, virtual]

Implements VideoOutput.

Definition at line 56 of file videoout_nullvdpau.h.

virtual void VideoOutputNullVDPAU::Zoom ( ZoomDirection  direction  )  [inline, 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 58 of file videoout_nullvdpau.h.

virtual void VideoOutputNullVDPAU::EmbedInWidget ( const QRect &  rect  )  [inline, virtual]

Tells video output to embed video in an existing window.

See also:
StopEmbedding()

Reimplemented from VideoOutput.

Definition at line 59 of file videoout_nullvdpau.h.

virtual void VideoOutputNullVDPAU::StopEmbedding ( void   )  [inline, virtual]

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

See also:
EmbedInWidget(const QRect&)

Reimplemented from VideoOutput.

Definition at line 60 of file videoout_nullvdpau.h.

virtual void VideoOutputNullVDPAU::DrawUnusedRects ( bool  sync = true  )  [inline, 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 61 of file videoout_nullvdpau.h.

virtual void VideoOutputNullVDPAU::UpdatePauseFrame ( int64_t disp_timecode  )  [inline, virtual]

Updates frame displayed when video is paused.

Implements VideoOutput.

Definition at line 62 of file videoout_nullvdpau.h.

virtual void VideoOutputNullVDPAU::MoveResizeWindow ( QRect   )  [inline, virtual]

Implements VideoOutput.

Definition at line 63 of file videoout_nullvdpau.h.

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

Reimplemented from VideoOutput.

Definition at line 64 of file videoout_nullvdpau.h.

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

Reimplemented from VideoOutput.

Definition at line 66 of file videoout_nullvdpau.h.

virtual MythPainter* VideoOutputNullVDPAU::GetOSDPainter ( void   )  [inline, virtual]

Reimplemented from VideoOutput.

Definition at line 68 of file videoout_nullvdpau.h.

void VideoOutputNullVDPAU::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 229 of file videoout_nullvdpau.cpp.

VideoFrame * VideoOutputNullVDPAU::GetLastDecodedFrame ( void   )  [virtual]
Bug:
not implemented correctly. vpos is not updated.

Reimplemented from VideoOutput.

Definition at line 383 of file videoout_nullvdpau.cpp.

VideoFrame * VideoOutputNullVDPAU::GetLastShownFrame ( void   )  [virtual]

Returns frame from the head of the ready to be displayed queue, if StartDisplayingFrame has been called.

Reimplemented from VideoOutput.

Definition at line 397 of file videoout_nullvdpau.cpp.

void VideoOutputNullVDPAU::DoneDisplayingFrame ( VideoFrame frame  )  [virtual]

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

Reimplemented from VideoOutput.

Definition at line 440 of file videoout_nullvdpau.cpp.

void VideoOutputNullVDPAU::TearDown ( void   )  [private]

Definition at line 40 of file videoout_nullvdpau.cpp.

Referenced by InputChanged(), and ~VideoOutputNullVDPAU().

bool VideoOutputNullVDPAU::InitRender ( void   )  [private]

Definition at line 69 of file videoout_nullvdpau.cpp.

Referenced by Init().

void VideoOutputNullVDPAU::DeleteRender ( void   )  [private]

Definition at line 79 of file videoout_nullvdpau.cpp.

Referenced by TearDown().

bool VideoOutputNullVDPAU::InitBuffers ( void   )  [private]

Definition at line 94 of file videoout_nullvdpau.cpp.

Referenced by Init().

void VideoOutputNullVDPAU::DeleteBuffers ( void   )  [private]

Definition at line 124 of file videoout_nullvdpau.cpp.

Referenced by InitBuffers(), and TearDown().

bool VideoOutputNullVDPAU::InitShadowBuffers ( void   )  [private]

Definition at line 134 of file videoout_nullvdpau.cpp.

Referenced by Init().

void VideoOutputNullVDPAU::DeleteShadowBuffers ( void   )  [private]

Definition at line 171 of file videoout_nullvdpau.cpp.

Referenced by InitShadowBuffers(), and TearDown().

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

Definition at line 183 of file videoout_nullvdpau.cpp.

Referenced by InitBuffers().

void VideoOutputNullVDPAU::DeleteVideoSurfaces ( void   )  [private]

Definition at line 207 of file videoout_nullvdpau.cpp.

Referenced by DeleteBuffers().

void VideoOutputNullVDPAU::ClaimVideoSurfaces ( void   )  [private]

Definition at line 217 of file videoout_nullvdpau.cpp.

Referenced by DrawSlice().

void VideoOutputNullVDPAU::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 411 of file videoout_nullvdpau.cpp.

Referenced by DoneDisplayingFrame().

void VideoOutputNullVDPAU::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 563 of file videoout_nullvdpau.cpp.

Referenced by ClearAfterSeek(), and DeleteBuffers().

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

Reimplemented from VideoOutput.

Definition at line 574 of file videoout_nullvdpau.cpp.

Referenced by DiscardFrames(), and DoneDisplayingFrame().

bool VideoOutputNullVDPAU::BufferSizeCheck ( void   )  [private]

Member Data Documentation

QMutex VideoOutputNullVDPAU::m_lock [private]

Definition at line 94 of file videoout_nullvdpau.h.

Referenced by DeleteRender(), and DrawSlice().

Definition at line 95 of file videoout_nullvdpau.h.

Referenced by DeleteRender(), and DrawSlice().

Definition at line 96 of file videoout_nullvdpau.h.

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

Definition at line 98 of file videoout_nullvdpau.h.

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

Definition at line 100 of file videoout_nullvdpau.h.

Referenced by DrawSlice(), and InitShadowBuffers().


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