Ticket #7269: playgroup2a.diff
| File playgroup2a.diff, 4.3 KB (added by , 17 years ago) |
|---|
-
libs/libmythtv/playgroup.cpp
6 6 #include <iostream> 7 7 #include "playgroup.h" 8 8 #include "programinfo.h" 9 #include "videoouttypes.h" 9 10 10 11 // A parameter associated with the profile itself 11 12 class PlayGroupDBStorage : public SimpleDBStorage … … 125 126 } 126 127 }; 127 128 129 class AspectOverrideModeSetting : public ComboBoxSetting, public PlayGroupDBStorage 130 { 131 public: 132 AspectOverrideModeSetting(const PlayGroup& _parent) : 133 ComboBoxSetting(this), 134 PlayGroupDBStorage(this, _parent, "aspectoverridemode") 135 { 136 setLabel(QObject::tr("Aspect Ratio")); 137 setHelpText(QObject::tr("Change the default Aspect Ratio. ")); 138 } 139 140 void Load(void) 141 { 142 for (int j = kAspect_Off; j < kAspect_END; j++) 143 { 144 // swap 14:9 and 16:9 145 int i = ((kAspect_14_9 == j) ? kAspect_16_9 : 146 ((kAspect_16_9 == j) ? kAspect_14_9 : j)); 147 148 addSelection(toString((AspectOverrideMode) i), QString("%1").arg(i)); 149 } 150 151 PlayGroupDBStorage::Load(); 152 } 153 154 }; 155 156 class AdjustFillModeSetting : public ComboBoxSetting, public PlayGroupDBStorage 157 { 158 public: 159 AdjustFillModeSetting(const PlayGroup& _parent) : 160 ComboBoxSetting(this), 161 PlayGroupDBStorage(this, _parent, "adjustfillmode") 162 { 163 setLabel(QObject::tr("Fill Mode")); 164 setHelpText(QObject::tr("Change the default Fill Modeo. ")); 165 } 166 167 void Load(void) 168 { 169 for (int i = kAdjustFill_Off; i < kAdjustFill_END; i++) 170 { 171 addSelection(toString((AdjustFillMode) i), QString("%1").arg(i)); 172 } 173 174 PlayGroupDBStorage::Load(); 175 } 176 177 }; 178 179 128 180 PlayGroup::PlayGroup(QString _name) 129 181 : name(_name) 130 182 { … … 136 188 cgroup->addChild(new SkipBack(*this)); 137 189 cgroup->addChild(new JumpMinutes(*this)); 138 190 cgroup->addChild(new TimeStretch(*this)); 191 cgroup->addChild(new AspectOverrideModeSetting(*this)); 192 cgroup->addChild(new AdjustFillModeSetting(*this)); 139 193 140 194 addChild(cgroup); 141 195 }; -
libs/libmythtv/playercontext.cpp
44 44 // DB values 45 45 fftime(0), rewtime(0), 46 46 jumptime(0), ts_normal(1.0f), ts_alt(1.5f), 47 overrideMode(kAspect_Off), adjustFillMode(kAdjustFill_Off), 47 48 // locks 48 49 playingInfoLock(QMutex::Recursive), deleteNVPLock(QMutex::Recursive), 49 50 stateLock(QMutex::Recursive), … … 915 916 jumptime = PlayGroup::GetSetting(group, "jump", 10); 916 917 ts_normal = PlayGroup::GetSetting(group, "timestretch", 100) * 0.01f; 917 918 ts_alt = (ts_normal == 1.0f) ? 1.5f : 1.0f; 919 overrideMode = (AspectOverrideMode) PlayGroup::GetSetting(group, "aspectoverridemode", kAspect_Off); 920 adjustFillMode = (AdjustFillMode) PlayGroup::GetSetting(group, "adjustfillmode", kAdjustFill_Off); 918 921 } 919 922 920 923 void PlayerContext::SetPseudoLiveTV( -
libs/libmythtv/tv_play.cpp
5141 5141 { 5142 5142 ctx->StartOSD(this); 5143 5143 SetSpeedChangeTimer(25, __LINE__); 5144 5145 if (ctx->nvp) { 5146 ctx->nvp->ToggleAspectOverride(ctx->overrideMode); 5147 ctx->nvp->ToggleAdjustFill(ctx->adjustFillMode); 5148 } 5144 5149 } 5145 5150 5151 5146 5152 VERBOSE(VB_IMPORTANT, LOC + QString("StartPlayer(%1, %2, %3) -- end %4") 5147 5153 .arg(find_player_index(ctx)).arg(StateToString(desiredState)) 5148 5154 .arg((wantPiP) ? "PiP" : "main").arg((ok) ? "ok" : "error")); -
libs/libmythtv/playercontext.h
181 181 */ 182 182 float ts_normal; 183 183 float ts_alt; 184 AspectOverrideMode overrideMode; 185 AdjustFillMode adjustFillMode; 184 186 185 187 mutable QMutex playingInfoLock; 186 188 mutable QMutex deleteNVPLock;
