Implementation of Quartz (Mac OS X windowing system) video output. More...
#include <videoout_quartz.h>
Public Member Functions | |
| VideoOutputQuartz () | |
| ~VideoOutputQuartz () | |
| bool | Init (int width, int height, float aspect, WId winid, const QRect &win_rect, MythCodecID codec_id) |
| void | ProcessFrame (VideoFrame *frame, OSD *osd, FilterChain *filterList, const PIPMap &pipPlayers, FrameScanType scan) |
| Draw OSD, apply filters and deinterlacing, copy frame buffer if using QuickTime to decode. | |
| void | PrepareFrame (VideoFrame *buffer, FrameScanType t, OSD *osd) |
| Makes sure we have a valid frame to show. | |
| void | Show (FrameScanType) |
| Display the frame. | |
| void | SetVideoFrameRate (float playback_fps) |
| void | ToggleAspectOverride (AspectOverrideMode aspectMode) |
| Enforce different aspect ration than detected, then calls VideoAspectRatioChanged(float) to apply them. | |
| 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 | 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 | ToggleAdjustFill (AdjustFillMode adjustFill) |
| Sets up letterboxing for various standard video frame and monitor dimensions, then calls MoveResize() to apply them. | |
| 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. | |
| void | ResizeForGui (void) |
| Subclassed so we can hide the QuickTime drawn layer and show the GUI. | |
| void | ResizeForVideo (uint width=0, uint height=0) |
| Subclassed so we can redisplay the QuickTime layer after ResizeForGui(). | |
| virtual bool | NeedExtraAudioDecode (void) const |
Static Public Member Functions | |
| static void | GetRenderOptions (render_opts &opts, QStringList &cpudeints) |
| 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 |
| QuartzData * | data |
| VideoFrame | pauseFrame |
Implementation of Quartz (Mac OS X windowing system) video output.
Definition at line 8 of file videoout_quartz.h.
| VideoOutputQuartz::VideoOutputQuartz | ( | ) |
Definition at line 1109 of file videoout_quartz.cpp.
| VideoOutputQuartz::~VideoOutputQuartz | ( | ) |
Definition at line 1115 of file videoout_quartz.cpp.
| void VideoOutputQuartz::GetRenderOptions | ( | render_opts & | opts, | |
| QStringList & | cpudeints | |||
| ) | [static] |
Definition at line 1088 of file videoout_quartz.cpp.
| bool VideoOutputQuartz::Init | ( | int | width, | |
| int | height, | |||
| float | aspect, | |||
| WId | winid, | |||
| const QRect & | win_rect, | |||
| MythCodecID | codec_id | |||
| ) | [virtual] |
Reimplemented from VideoOutput.
Definition at line 1231 of file videoout_quartz.cpp.
| void VideoOutputQuartz::ProcessFrame | ( | VideoFrame * | frame, | |
| OSD * | osd, | |||
| FilterChain * | filterList, | |||
| const PIPMap & | pipPlayers, | |||
| FrameScanType | scan | |||
| ) | [virtual] |
Draw OSD, apply filters and deinterlacing, copy frame buffer if using QuickTime to decode.
Implements VideoOutput.
Definition at line 1673 of file videoout_quartz.cpp.
| void VideoOutputQuartz::PrepareFrame | ( | VideoFrame * | buffer, | |
| FrameScanType | t, | |||
| OSD * | osd | |||
| ) | [virtual] |
Makes sure we have a valid frame to show.
Implements VideoOutput.
Definition at line 1622 of file videoout_quartz.cpp.
| void VideoOutputQuartz::Show | ( | FrameScanType | t | ) | [virtual] |
Display the frame.
Implements VideoOutput.
Definition at line 1636 of file videoout_quartz.cpp.
| void VideoOutputQuartz::SetVideoFrameRate | ( | float | playback_fps | ) | [virtual] |
Reimplemented from VideoOutput.
Definition at line 1412 of file videoout_quartz.cpp.
| void VideoOutputQuartz::ToggleAspectOverride | ( | AspectOverrideMode | aspectOverrideMode | ) | [virtual] |
Enforce different aspect ration than detected, then calls VideoAspectRatioChanged(float) to apply them.
Reimplemented from VideoOutput.
Definition at line 1173 of file videoout_quartz.cpp.
| bool VideoOutputQuartz::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.
Reimplemented from VideoOutput.
Definition at line 1179 of file videoout_quartz.cpp.
| void VideoOutputQuartz::VideoAspectRatioChanged | ( | float | aspect | ) | [virtual] |
Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes.
| aspect | video aspect ratio to use |
Reimplemented from VideoOutput.
Definition at line 1126 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".
Reimplemented from VideoOutput.
Definition at line 1158 of file videoout_quartz.cpp.
Referenced by Init(), InputChanged(), ToggleAspectOverride(), 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().
Reimplemented from VideoOutput.
Definition at line 1139 of file videoout_quartz.cpp.
| void VideoOutputQuartz::ToggleAdjustFill | ( | AdjustFillMode | adjustFillMode | ) | [virtual] |
Sets up letterboxing for various standard video frame and monitor dimensions, then calls MoveResize() to apply them.
Reimplemented from VideoOutput.
Definition at line 1148 of file videoout_quartz.cpp.
| void VideoOutputQuartz::EmbedInWidget | ( | const QRect & | rect | ) | [virtual] |
Tells video output to embed video in an existing window.
Reimplemented from VideoOutput.
Definition at line 1559 of file videoout_quartz.cpp.
| void VideoOutputQuartz::StopEmbedding | ( | void | ) | [virtual] |
Tells video output to stop embedding video in an existing window.
Reimplemented from VideoOutput.
Definition at line 1592 of file videoout_quartz.cpp.
| void VideoOutputQuartz::MoveResizeWindow | ( | QRect | new_rect | ) | [inline, virtual] |
Implements VideoOutput.
Definition at line 40 of file videoout_quartz.h.
| void VideoOutputQuartz::DrawUnusedRects | ( | bool | sync = true |
) | [virtual] |
Draws non-video portions of the screen.
| 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 1647 of file videoout_quartz.cpp.
| void VideoOutputQuartz::UpdatePauseFrame | ( | int64_t & | disp_timecode | ) | [virtual] |
Updates frame displayed when video is paused.
Implements VideoOutput.
Definition at line 1651 of file videoout_quartz.cpp.
| void VideoOutputQuartz::ResizeForGui | ( | void | ) | [virtual] |
Subclassed so we can hide the QuickTime drawn layer and show the GUI.
Reimplemented from VideoOutput.
Definition at line 1723 of file videoout_quartz.cpp.
Subclassed so we can redisplay the QuickTime layer after ResizeForGui().
Reimplemented from VideoOutput.
Definition at line 1735 of file videoout_quartz.cpp.
| QStringList VideoOutputQuartz::GetAllowedRenderers | ( | MythCodecID | myth_codec_id, | |
| const QSize & | video_dim | |||
| ) | [static] |
Definition at line 1749 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 1764 of file videoout_quartz.cpp.
| virtual bool VideoOutputQuartz::NeedExtraAudioDecode | ( | void | ) | const [inline, virtual] |
Reimplemented from VideoOutput.
Definition at line 55 of file videoout_quartz.h.
| void VideoOutputQuartz::Exit | ( | void | ) | [private] |
Definition at line 1511 of file videoout_quartz.cpp.
Referenced by ~VideoOutputQuartz().
| bool VideoOutputQuartz::CreateQuartzBuffers | ( | void | ) | [private] |
Definition at line 1430 of file videoout_quartz.cpp.
Referenced by Init(), and InputChanged().
| void VideoOutputQuartz::DeleteQuartzBuffers | ( | void | ) | [private] |
Definition at line 1534 of file videoout_quartz.cpp.
Referenced by Exit(), and InputChanged().
bool VideoOutputQuartz::Started [private] |
Definition at line 63 of file videoout_quartz.h.
QuartzData* VideoOutputQuartz::data [private] |
Definition at line 64 of file videoout_quartz.h.
Referenced by CreateQuartzBuffers(), DeleteQuartzBuffers(), EmbedInWidget(), Exit(), Init(), InputChanged(), MoveResize(), ProcessFrame(), ResizeForGui(), ResizeForVideo(), Show(), StopEmbedding(), ToggleAdjustFill(), VideoAspectRatioChanged(), and ~VideoOutputQuartz().
VideoFrame VideoOutputQuartz::pauseFrame [private] |
Definition at line 65 of file videoout_quartz.h.
Referenced by CreateQuartzBuffers(), DeleteQuartzBuffers(), ProcessFrame(), UpdatePauseFrame(), and VideoOutputQuartz().
1.6.3