From 9ef1df6d1721775c625ff9689bbf90d95a8d056e Mon Sep 17 00:00:00 2001
From: chris@ <chris@>
Date: Tue, 1 Jun 2010 23:35:25 +0200
Subject: [PATCH 3/5] fixing embed video on osx quartz renderer part2
Fix aspect override option.
I don't have a clue about libmyth* API documentation
but the only chance to catch a change of the video aspect is
to hook VideoOutput::ToggleAspectOverride()
---
mythtv/libs/libmythtv/videoout_quartz.cpp | 9 +++++++--
mythtv/libs/libmythtv/videoout_quartz.h | 1 +
mythtv/libs/libmythtv/videooutbase.h | 2 +-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/mythtv/libs/libmythtv/videoout_quartz.cpp b/mythtv/libs/libmythtv/videoout_quartz.cpp
index 78e8f15..2292ef4 100644
a
|
b
|
VideoOutputQuartz::~VideoOutputQuartz()
|
1084 | 1084 | |
1085 | 1085 | void VideoOutputQuartz::VideoAspectRatioChanged(float aspect) |
1086 | 1086 | { |
1087 | | //VERBOSE(VB_PLAYBACK, (LOC + "VideoAspectRatioChanged(aspect=%1) [was %2]") |
1088 | | // .arg(aspect).arg(data->srcAspect)); |
| 1087 | VERBOSE(VB_PLAYBACK, (LOC + "VideoAspectRatioChanged(aspect=%1) [was %2]") |
| 1088 | .arg(aspect).arg(data->srcAspect)); |
1089 | 1089 | VERBOSE(VB_PLAYBACK, "QU: VideoAspectRatioChanged"); |
1090 | 1090 | |
1091 | 1091 | VideoOutput::VideoAspectRatioChanged(aspect); |
… |
… |
void VideoOutputQuartz::MoveResize(void)
|
1133 | 1133 | } |
1134 | 1134 | } |
1135 | 1135 | |
| 1136 | void VideoOutputQuartz::ToggleAspectOverride(AspectOverrideMode aspectMode) { |
| 1137 | VideoOutput::ToggleAspectOverride(aspectMode); |
| 1138 | MoveResize(); |
| 1139 | } |
| 1140 | |
1136 | 1141 | bool VideoOutputQuartz::InputChanged(const QSize &input_size, |
1137 | 1142 | float aspect, |
1138 | 1143 | MythCodecID av_codec_id, |
diff --git a/mythtv/libs/libmythtv/videoout_quartz.h b/mythtv/libs/libmythtv/videoout_quartz.h
index 911852d..6ed8da6 100644
a
|
b
|
class VideoOutputQuartz : public VideoOutput
|
31 | 31 | bool &aspect_only); |
32 | 32 | void VideoAspectRatioChanged(float aspect); |
33 | 33 | void MoveResize(void); |
| 34 | void ToggleAspectOverride(AspectOverrideMode aspectMode); |
34 | 35 | void Zoom(ZoomDirection direction); |
35 | 36 | void ToggleAdjustFill(AdjustFillMode adjustFill); |
36 | 37 | |
diff --git a/mythtv/libs/libmythtv/videooutbase.h b/mythtv/libs/libmythtv/videooutbase.h
index 8455f27..43c8d24 100644
a
|
b
|
class VideoOutput
|
110 | 110 | /// \brief Returns current aspect override mode |
111 | 111 | /// \sa ToggleAspectOverride(AspectOverrideMode) |
112 | 112 | AspectOverrideMode GetAspectOverride(void) const; |
113 | | void ToggleAspectOverride( |
| 113 | virtual void ToggleAspectOverride( |
114 | 114 | AspectOverrideMode aspectOverrideMode = kAspect_Toggle); |
115 | 115 | |
116 | 116 | /// \brief Returns current adjust fill mode |