VideoOutputQuartz Class Reference

#include <videoout_quartz.h>

Inheritance diagram for VideoOutputQuartz:

VideoOutput

List of all members.


Detailed Description

Implementation of Quartz (Mac OS X windowing system) video output.

Definition at line 9 of file videoout_quartz.h.


Public Member Functions

 VideoOutputQuartz (MythCodecID av_codec_id, void *codec_priv)
 ~VideoOutputQuartz ()
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 SetVideoFrameRate (float playback_fps)
void PrepareFrame (VideoFrame *buffer, FrameScanType t)
 If we are using DVDV hardware acceleration, decodes the frame.
void Show (FrameScanType)
 Display the frame, using either DVDV hardware acceleration, or possibly several UI output types.
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 VideoAspectRatioChanged (float aspect)
 Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes.
void MoveResize (void)
 performs all the calculations for video framing and any resizing.
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)
 Draw OSD, apply filters and deinterlacing, copy frame buffer if using QuickTime to decode.
void SetDVDVDecoder (DVDV *dvdvdec)

Static Public Member Functions

static QStringList GetAllowedRenderers (MythCodecID myth_codec_id, const QSize &video_dim)
static MythCodecID GetBestSupportedCodec (uint width, uint height, uint osd_width, uint osd_height, uint stream_type, uint fourcc)

Private Member Functions

void Exit (void)
bool CreateQuartzBuffers (void)
void DeleteQuartzBuffers (void)

Private Attributes

bool Started
QuartzDatadata
VideoFrame pauseFrame
MythCodecID myth_codec_id

Constructor & Destructor Documentation

VideoOutputQuartz::VideoOutputQuartz ( MythCodecID  av_codec_id,
void *  codec_priv 
)

Definition at line 1080 of file videoout_quartz.cpp.

VideoOutputQuartz::~VideoOutputQuartz (  ) 

Definition at line 1089 of file videoout_quartz.cpp.


Member Function Documentation

bool VideoOutputQuartz::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 1203 of file videoout_quartz.cpp.

void VideoOutputQuartz::SetVideoFrameRate ( float  playback_fps  )  [virtual]

Reimplemented from VideoOutput.

Definition at line 1391 of file videoout_quartz.cpp.

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

If we are using DVDV hardware acceleration, decodes the frame.

Otherwise, just makes sure we have a valid frame to show.

Implements VideoOutput.

Definition at line 1617 of file videoout_quartz.cpp.

void VideoOutputQuartz::Show ( FrameScanType  t  )  [virtual]

Display the frame, using either DVDV hardware acceleration, or possibly several UI output types.

See also:
VideoOutputQuartzView

Implements VideoOutput.

Definition at line 1634 of file videoout_quartz.cpp.

bool VideoOutputQuartz::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 1133 of file videoout_quartz.cpp.

void VideoOutputQuartz::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 1100 of file videoout_quartz.cpp.

void VideoOutputQuartz::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 1120 of file videoout_quartz.cpp.

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

void VideoOutputQuartz::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 1112 of file videoout_quartz.cpp.

void VideoOutputQuartz::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 1550 of file videoout_quartz.cpp.

void VideoOutputQuartz::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 1581 of file videoout_quartz.cpp.

int VideoOutputQuartz::GetRefreshRate ( void   )  [virtual]

Returns current display's frame refresh period in microseconds.

e.g. 1000000 / frame_rate_in_Hz

Implements VideoOutput.

Definition at line 1195 of file videoout_quartz.cpp.

void VideoOutputQuartz::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 1653 of file videoout_quartz.cpp.

void VideoOutputQuartz::UpdatePauseFrame ( void   )  [virtual]

Updates frame displayed when video is paused.

Implements VideoOutput.

Definition at line 1657 of file videoout_quartz.cpp.

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

Draw OSD, apply filters and deinterlacing, copy frame buffer if using QuickTime to decode.

Implements VideoOutput.

Definition at line 1677 of file videoout_quartz.cpp.

void VideoOutputQuartz::SetDVDVDecoder ( DVDV dvdvdec  ) 

Definition at line 1396 of file videoout_quartz.cpp.

Referenced by VideoOutputQuartz().

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

Definition at line 1744 of file videoout_quartz.cpp.

Referenced by VideoOutput::Create(), and CreateQuartzBuffers().

MythCodecID VideoOutputQuartz::GetBestSupportedCodec ( uint  width,
uint  height,
uint  osd_width,
uint  osd_height,
uint  stream_type,
uint  fourcc 
) [static]

Definition at line 1763 of file videoout_quartz.cpp.

Referenced by AvFormatDecoder::ScanStreams().

void VideoOutputQuartz::Exit ( void   )  [private]

Definition at line 1502 of file videoout_quartz.cpp.

Referenced by ~VideoOutputQuartz().

bool VideoOutputQuartz::CreateQuartzBuffers ( void   )  [private]

Definition at line 1422 of file videoout_quartz.cpp.

Referenced by Init(), and InputChanged().

void VideoOutputQuartz::DeleteQuartzBuffers ( void   )  [private]

Definition at line 1525 of file videoout_quartz.cpp.

Referenced by Exit(), and InputChanged().


Member Data Documentation

Definition at line 56 of file videoout_quartz.h.

Referenced by Exit(), and Init().

Definition at line 59 of file videoout_quartz.h.

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


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