00001 #ifndef VIDEOOUT_QUARTZ_H_
00002 #define VIDEOOUT_QUARTZ_H_
00003
00004 struct QuartzData;
00005
00006 #include "videooutbase.h"
00007
00008 class VideoOutputQuartz : public VideoOutput
00009 {
00010 public:
00011 static void GetRenderOptions(render_opts &opts, QStringList &cpudeints);
00012 VideoOutputQuartz();
00013 ~VideoOutputQuartz();
00014
00015 bool Init(int width, int height, float aspect, WId winid,
00016 const QRect &win_rect, MythCodecID codec_id);
00017
00018 void ProcessFrame(VideoFrame *frame, OSD *osd,
00019 FilterChain *filterList,
00020 const PIPMap &pipPlayers,
00021 FrameScanType scan);
00022 void PrepareFrame(VideoFrame *buffer, FrameScanType t, OSD *osd);
00023 void Show(FrameScanType);
00024
00025 void SetVideoFrameRate(float playback_fps);
00026 void ToggleAspectOverride(AspectOverrideMode aspectMode);
00027 bool InputChanged(const QSize &input_size,
00028 float aspect,
00029 MythCodecID av_codec_id,
00030 void *codec_private,
00031 bool &aspect_only);
00032 void VideoAspectRatioChanged(float aspect);
00033 void MoveResize(void);
00034 void Zoom(ZoomDirection direction);
00035 void ToggleAdjustFill(AdjustFillMode adjustFill);
00036
00037 void EmbedInWidget(const QRect &rect);
00038 void StopEmbedding(void);
00039
00040 void MoveResizeWindow(QRect new_rect) {;}
00041 void DrawUnusedRects(bool sync = true);
00042
00043 void UpdatePauseFrame(int64_t &disp_timecode);
00044
00045 void ResizeForGui(void);
00046 void ResizeForVideo(uint width = 0, uint height = 0);
00047
00048 static QStringList GetAllowedRenderers(MythCodecID myth_codec_id,
00049 const QSize &video_dim);
00050
00051 static MythCodecID GetBestSupportedCodec(
00052 uint width, uint height,
00053 uint osd_width, uint osd_height,
00054 uint stream_type, uint fourcc);
00055 virtual bool NeedExtraAudioDecode(void) const
00056 { return !codec_is_std(video_codec_id); }
00057
00058 private:
00059 void Exit(void);
00060 bool CreateQuartzBuffers(void);
00061 void DeleteQuartzBuffers(void);
00062
00063 bool Started;
00064 QuartzData *data;
00065 VideoFrame pauseFrame;
00066 };
00067
00068 #endif