VideoOutputDX Class Reference

#include <videoout_dx.h>

Inheritance diagram for VideoOutputDX:

VideoOutput

List of all members.


Detailed Description

Definition at line 17 of file videoout_dx.h.


Public Member Functions

 VideoOutputDX ()
 ~VideoOutputDX ()
bool Init (int width, int height, float aspect, WId winid, int winx, int winy, int winw, int winh, WId embedid=0)
 Performs most of the initialization for VideoOutput.
void PrepareFrame (VideoFrame *buffer, FrameScanType)
void Show (FrameScanType)
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 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.
int GetRefreshRate (void)
 Returns current display's frame refresh period in microseconds.
void DrawUnusedRects (bool sync=true)
 Draws non-video portions of the screen.
void UpdatePauseFrame (void)
 Updates frame displayed when video is paused.
void ProcessFrame (VideoFrame *frame, OSD *osd, FilterChain *filterList, NuppelVideoPlayer *pipPlayer)
void MoveResize (void)
 performs all the calculations for video framing and any resizing.
int SetPictureAttribute (PictureAttribute attribute, int newValue)
 Sets a specified picture attribute.
float GetDisplayAspect (void) const
 Returns current display aspect ratio.
void WaitForVSync (void)

Static Public Member Functions

static QStringList GetAllowedRenderers (MythCodecID myth_codec_id, const QSize &video_dim)

Private Member Functions

void Exit (void)
 HMONITOR (WINAPI *MonitorFromWindow)(HWND
 BOOL (WINAPI *GetMonitorInfo)(HMONITOR
void MakeSurface ()
int DirectXInitDDraw ()
int DirectXCreateDisplay ()
int DirectXCreateClipper ()
int DirectXCreateSurface (LPDIRECTDRAWSURFACE2 *pp_surface_final, DWORD i_chroma, bool b_overlay, int i_backbuffers)
void DirectXCloseDDraw ()
void DirectXCloseDisplay ()
void DirectXCloseSurface ()
void DirectXGetDDrawCaps ()
DWORD DirectXFindColorkey (uint32_t i_color)
int DirectXUpdateOverlay ()
int DirectXLockSurface (void **picbuf, int *stride)
int DirectXUnlockSurface ()
int NewPicture ()

Private Attributes

bool XJ_started
VideoFrame pauseFrame
HWND wnd
LPDIRECTDRAW2 ddobject
LPDIRECTDRAWSURFACE2 display
LPDIRECTDRAWCLIPPER clipper
LPDIRECTDRAWCOLORCONTROL ccontrol
HINSTANCE ddraw_dll
HMONITOR monitor
GUIDdisplay_driver
 DWORD
 LPMONITORINFO
RECT rect_display
LPDIRECTDRAWSURFACE2 front_surface
LPDIRECTDRAWSURFACE2 back_surface
DWORD chroma
int XJ_width
int XJ_height
int colorkey
int rgb_colorkey
bool using_overlay
bool overlay_3buf
bool use_sysmem
int outputpictures

Constructor & Destructor Documentation

VideoOutputDX::VideoOutputDX ( void   ) 

Definition at line 39 of file videoout_dx.cpp.

VideoOutputDX::~VideoOutputDX (  ) 

Definition at line 78 of file videoout_dx.cpp.


Member Function Documentation

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

Performs most of the initialization for VideoOutput.

Returns:
true if successful, false otherwise.

Reimplemented from VideoOutput.

Definition at line 160 of file videoout_dx.cpp.

void VideoOutputDX::PrepareFrame ( VideoFrame buffer,
FrameScanType  t 
) [virtual]

Implements VideoOutput.

Definition at line 244 of file videoout_dx.cpp.

void VideoOutputDX::Show ( FrameScanType   )  [virtual]

Implements VideoOutput.

Definition at line 323 of file videoout_dx.cpp.

bool VideoOutputDX::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 104 of file videoout_dx.cpp.

void VideoOutputDX::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 91 of file videoout_dx.cpp.

void VideoOutputDX::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 227 of file videoout_dx.cpp.

void VideoOutputDX::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 236 of file videoout_dx.cpp.

int VideoOutputDX::GetRefreshRate ( void   )  [virtual]

Returns current display's frame refresh period in microseconds.

e.g. 1000000 / frame_rate_in_Hz

Implements VideoOutput.

Definition at line 138 of file videoout_dx.cpp.

void VideoOutputDX::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 435 of file videoout_dx.cpp.

void VideoOutputDX::UpdatePauseFrame ( void   )  [virtual]

Updates frame displayed when video is paused.

Implements VideoOutput.

Definition at line 439 of file videoout_dx.cpp.

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

Implements VideoOutput.

Definition at line 449 of file videoout_dx.cpp.

void VideoOutputDX::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 97 of file videoout_dx.cpp.

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

int VideoOutputDX::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 475 of file videoout_dx.cpp.

float VideoOutputDX::GetDisplayAspect ( void   )  const [virtual]

Returns current display aspect ratio.

Reimplemented from VideoOutput.

Definition at line 525 of file videoout_dx.cpp.

void VideoOutputDX::WaitForVSync ( void   ) 

Definition at line 152 of file videoout_dx.cpp.

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

Definition at line 1503 of file videoout_dx.cpp.

Referenced by VideoOutput::Create().

void VideoOutputDX::Exit ( void   )  [private]

Definition at line 217 of file videoout_dx.cpp.

Referenced by ~VideoOutputDX().

VideoOutputDX::HMONITOR ( WINAPI *  MonitorFromWindow  )  [private]

Referenced by VideoOutputDX().

VideoOutputDX::BOOL ( WINAPI *  GetMonitorInfo  )  [private]

void VideoOutputDX::MakeSurface (  )  [private]

Definition at line 549 of file videoout_dx.cpp.

Referenced by Init(), and InputChanged().

int VideoOutputDX::DirectXInitDDraw (  )  [private]

Definition at line 600 of file videoout_dx.cpp.

Referenced by Init().

int VideoOutputDX::DirectXCreateDisplay (  )  [private]

Definition at line 757 of file videoout_dx.cpp.

Referenced by Init().

int VideoOutputDX::DirectXCreateClipper (  )  [private]

Definition at line 710 of file videoout_dx.cpp.

Referenced by DirectXCreateDisplay().

int VideoOutputDX::DirectXCreateSurface ( LPDIRECTDRAWSURFACE2 *  pp_surface_final,
DWORD  i_chroma,
bool  b_overlay,
int  i_backbuffers 
) [private]

Definition at line 821 of file videoout_dx.cpp.

Referenced by NewPicture().

void VideoOutputDX::DirectXCloseDDraw (  )  [private]

Definition at line 949 of file videoout_dx.cpp.

Referenced by ~VideoOutputDX().

void VideoOutputDX::DirectXCloseDisplay (  )  [private]

Definition at line 978 of file videoout_dx.cpp.

Referenced by ~VideoOutputDX().

void VideoOutputDX::DirectXCloseSurface (  )  [private]

Definition at line 1003 of file videoout_dx.cpp.

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

void VideoOutputDX::DirectXGetDDrawCaps (  )  [private]

Definition at line 1202 of file videoout_dx.cpp.

Referenced by DirectXInitDDraw().

DWORD VideoOutputDX::DirectXFindColorkey ( uint32_t  i_color  )  [private]

Definition at line 1255 of file videoout_dx.cpp.

Referenced by DirectXCreateDisplay().

int VideoOutputDX::DirectXUpdateOverlay (  )  [private]

Definition at line 1329 of file videoout_dx.cpp.

Referenced by DirectXCreateSurface(), MoveResize(), NewPicture(), and Show().

int VideoOutputDX::DirectXLockSurface ( void **  picbuf,
int *  stride 
) [private]

Definition at line 1436 of file videoout_dx.cpp.

Referenced by DirectXCreateSurface(), NewPicture(), and PrepareFrame().

int VideoOutputDX::DirectXUnlockSurface (  )  [private]

Definition at line 1494 of file videoout_dx.cpp.

Referenced by DirectXCreateSurface(), NewPicture(), and PrepareFrame().

int VideoOutputDX::NewPicture (  )  [private]

Definition at line 1026 of file videoout_dx.cpp.

Referenced by MakeSurface().


Member Data Documentation

Definition at line 59 of file videoout_dx.h.

Referenced by Exit(), Init(), and VideoOutputDX().

HWND VideoOutputDX::wnd [private]

LPDIRECTDRAW2 VideoOutputDX::ddobject [private]

LPDIRECTDRAWSURFACE2 VideoOutputDX::display [private]

LPDIRECTDRAWCLIPPER VideoOutputDX::clipper [private]

Definition at line 68 of file videoout_dx.h.

Referenced by DirectXCloseDisplay(), DirectXCreateClipper(), and VideoOutputDX().

LPDIRECTDRAWCOLORCONTROL VideoOutputDX::ccontrol [private]

HINSTANCE VideoOutputDX::ddraw_dll [private]

Definition at line 70 of file videoout_dx.h.

Referenced by DirectXCloseDDraw(), and DirectXInitDDraw().

HMONITOR VideoOutputDX::monitor [private]

Definition at line 73 of file videoout_dx.h.

Referenced by DirectXCloseDDraw(), DirectXInitDDraw(), and VideoOutputDX().

Definition at line 74 of file videoout_dx.h.

Referenced by DirectXCloseDDraw(), DirectXInitDDraw(), and VideoOutputDX().

Definition at line 75 of file videoout_dx.h.

Referenced by DirectXUpdateOverlay(), GetRefreshRate(), NewPicture(), and VideoOutputDX().

Definition at line 76 of file videoout_dx.h.

Referenced by VideoOutputDX().

Definition at line 78 of file videoout_dx.h.

Referenced by DirectXInitDDraw().

LPDIRECTDRAWSURFACE2 VideoOutputDX::front_surface [private]

LPDIRECTDRAWSURFACE2 VideoOutputDX::back_surface [private]

Definition at line 83 of file videoout_dx.h.

Referenced by MakeSurface(), NewPicture(), and PrepareFrame().

int VideoOutputDX::XJ_width [private]

int VideoOutputDX::XJ_height [private]

Definition at line 85 of file videoout_dx.h.

Referenced by DirectXCreateSurface(), Init(), InputChanged(), PrepareFrame(), and Show().

int VideoOutputDX::colorkey [private]

Definition at line 87 of file videoout_dx.h.

Referenced by DirectXCreateDisplay(), and DirectXUpdateOverlay().

Definition at line 88 of file videoout_dx.h.

Referenced by DirectXCreateDisplay().

Definition at line 91 of file videoout_dx.h.

Referenced by NewPicture(), and VideoOutputDX().

Definition at line 93 of file videoout_dx.h.

Referenced by DirectXCreateSurface(), MakeSurface(), and VideoOutputDX().

Definition at line 95 of file videoout_dx.h.

Referenced by Init(), MakeSurface(), and NewPicture().


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